interface for subparser stack saves

This commit is contained in:
Jörg Breitbart
2021-03-17 22:39:09 +01:00
parent 8e7cdd2587
commit 869c11f1d8
4 changed files with 34 additions and 20 deletions
+9 -7
View File
@@ -253,6 +253,15 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
protected _escHandlerFb: EscFallbackHandlerType;
protected _errorHandlerFb: (state: IParsingState) => IParsingState;
// parser stack save for async handler support
protected _parseStack: IParserStackState = {
state: ParserStackType.NONE,
handlers: [],
handlerPos: 0,
transition: 0,
chunkPos: 0
};
constructor(
protected readonly _transitions: TransitionTable = VT500_TRANSITION_TABLE
) {
@@ -456,13 +465,6 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
/**
* Async parse support.
*/
protected _parseStack: IParserStackState = {
state: ParserStackType.NONE,
handlers: [],
handlerPos: 0,
transition: 0,
chunkPos: 0
};
protected _preserveStack(
state: ParserStackType,
handlers: ResumableHandlersType,