UNPKG

1 kBTypeScriptView Raw
1import { ContextualKeyword } from "../tokenizer/keywords";
2import { TokenType } from "../tokenizer/types";
3export declare function isContextual(contextualKeyword: ContextualKeyword): boolean;
4export declare function isLookaheadContextual(contextualKeyword: ContextualKeyword): boolean;
5export declare function eatContextual(contextualKeyword: ContextualKeyword): boolean;
6export declare function expectContextual(contextualKeyword: ContextualKeyword): void;
7export declare function canInsertSemicolon(): boolean;
8export declare function hasPrecedingLineBreak(): boolean;
9export declare function isLineTerminator(): boolean;
10export declare function semicolon(): void;
11export declare function expect(type: TokenType): void;
12/**
13 * Transition the parser to an error state. All code needs to be written to naturally unwind in this
14 * state, which allows us to backtrack without exceptions and without error plumbing everywhere.
15 */
16export declare function unexpected(message?: string, pos?: number): void;