merge ParserTerminal with InputHandler

- quick'n dirty merge of classes - ParserTerminal is subclass of InputHandler
- basic fallback handlers implemented
- test regressions due to multiple changes in EscapeSequenceParser
- runtime down to 2.3s
- TODO: fix tests, implement DCS functions, full merge of classes
This commit is contained in:
Jörg Breitbart
2018-04-29 19:10:47 +02:00
parent 9d2bbd199c
commit 2d77fcf2fb
3 changed files with 193 additions and 137 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
* @license MIT
*/
import { CharData, IInputHandler, IInputHandlingTerminal } from './Types';
import { CharData, IInputHandler } from './Types';
import { C0 } from './EscapeSequences';
import { DEFAULT_CHARSET } from './Charsets';
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX } from './Buffer';
@@ -19,7 +19,7 @@ import { wcwidth } from './CharWidth';
* each function's header comment.
*/
export class InputHandler implements IInputHandler {
constructor(private _terminal: IInputHandlingTerminal) { }
constructor(protected _terminal: any) { }
public addChar(char: string, code: number): void {
// if (char >= ' ') {