import { Ast, Constant, Token } from "../../language"; import { ParseContext, ParseError } from ".."; import { LexerSnapshot } from "../../lexer"; import { ParseState } from "./parseState"; export declare function newState(lexerSnapshot: LexerSnapshot, overrides?: Partial): ParseState; export declare function applyState(state: ParseState, update: ParseState): Promise; export declare function copyState(state: ParseState): Promise; export declare function startContext(state: ParseState, nodeKind: T["kind"]): ParseContext.Node; export declare function startContextAsParent(state: ParseState, nodeKind: T["kind"], existingNodeId: number, correlationId: number | undefined): ParseContext.Node; export declare function endContext(state: ParseState, astNode: T): void; export declare function deleteContext(state: ParseState, nodeId?: number): void; export declare function incrementAttributeCounter(state: ParseState): void; export declare function isTokenKind(state: ParseState, tokenKind: Token.TokenKind, tokenIndex: number): boolean; export declare function isNextTokenKind(state: ParseState, tokenKind: Token.TokenKind): boolean; export declare function isOnTokenKind(state: ParseState, tokenKind: Token.TokenKind, tokenIndex?: number): boolean; export declare function isOnConstantKind(state: ParseState, constantKind: Constant.TConstant): boolean; export declare function isOnGeneralizedIdentifierStart(state: ParseState, tokenIndex?: number): boolean; export declare function isRecursivePrimaryExpressionNext(state: ParseState, tokenIndexStart?: number): boolean; export declare function assertGetContextNodeMetadata(state: ParseState): ContextNodeMetadata; export declare function assertGetTokenAt(state: ParseState, tokenIndex: number): Token.Token; export declare function testCsvContinuationLetExpression(state: ParseState): ParseError.ExpectedCsvContinuationError | undefined; export declare function testCsvContinuationDanglingComma(state: ParseState, tokenKind: Token.TokenKind): ParseError.ExpectedCsvContinuationError | undefined; export declare function testClosingTokenKind(state: ParseState, expectedTokenKind: Token.TokenKind): ParseError.ExpectedClosingTokenKind | undefined; export declare function testIsOnTokenKind(state: ParseState, expectedTokenKind: Token.TokenKind): ParseError.ExpectedTokenKindError | undefined; export declare function testIsOnAnyTokenKind(state: ParseState, expectedAnyTokenKinds: ReadonlyArray): ParseError.ExpectedAnyTokenKindError | undefined; export declare function assertNoMoreTokens(state: ParseState): void; export declare function assertNoOpenContext(state: ParseState): void; export declare function assertIsDoneParsing(state: ParseState): void; export declare function unterminatedBracketError(state: ParseState): ParseError.UnterminatedSequence; export declare function unterminatedParenthesesError(state: ParseState): ParseError.UnterminatedSequence; export declare function currentTokenWithColumnNumber(state: ParseState): ParseError.TokenWithColumnNumber | undefined; export declare function tokenWithColumnNumber(state: ParseState, tokenIndex: number): ParseError.TokenWithColumnNumber | undefined; interface ContextNodeMetadata { readonly id: number; readonly attributeIndex: number | undefined; readonly tokenRange: Token.TokenRange; } export {};