import { ASTAssignmentStatement, ASTBaseBlockWithScope } from '../parser/ast'; import { ParserStateSnapshot } from '../parser/state'; import { ErrorCode, ParserException } from '../types/errors'; import { ParserShape } from '../types/parser'; import { Range } from '../types/range'; export interface ParserSnapshot { stateSnapshot: ParserStateSnapshot; outerScopesLength: number; iteratorStackLength: number; currentScope: ASTBaseBlockWithScope; currentScopeNamespacesLength: number; currentScopeDefinitionsLength: number; currentScopeReturnsLength: number; currentAssignment: ASTAssignmentStatement; backpatchesLength: number; pendingBodyLength: number; } type ParserConstructor = new (...args: any[]) => T; export default function UnsafeParserMixin>(Base: T): { new (...args: any[]): { statementErrors: Error[]; raise(message: string, range: Range, code?: ErrorCode, hint?: string): ParserException; parseStatement(): void; tryToRecover(snapshot: ParserSnapshot): void; finishRemainingScopes(): void; token: import("../lexer/token").Token | null; previousToken: import("../lexer/token").Token | null; state: import("../parser/state").ParserState; outerScopes: ASTBaseBlockWithScope[]; iteratorStack: (import("../parser/ast").ASTForGenericStatement | import("../parser/ast").ASTWhileStatement)[]; lineRegistry: import("..").LineRegistry; currentScope: ASTBaseBlockWithScope; currentAssignment: ASTAssignmentStatement; backpatches: import("..").Stack; errors: Error[]; lexer: any; getState(): import("../parser/state").ParserState; next(): void; }; } & T; export {};