import { ObjectValue, ThrowCompletion } from '../index.mts'; import type { ErrorObject } from '../intrinsics/Error.mts'; import { Token } from './tokens.mts'; import type { Location, Position } from './ParseNode.mts'; export type Locatable = TokenData | Position | Location | { readonly location: Location; }; export declare const isDecimalDigit: (c: string) => "" | boolean; export declare const isHexDigit: (c: string) => "" | boolean; export declare const isWhitespace: (c: string) => "" | boolean; export declare const isLineTerminator: (c: string | number) => boolean; export declare const isIdentifierStart: (c: string) => "" | boolean; export declare const isIdentifierPart: (c: string) => "" | boolean; export declare class TokenData { readonly type: Token; readonly startIndex: number; readonly endIndex: number; readonly line: number; readonly column: number; readonly hadLineTerminatorBefore: boolean; readonly name: string; readonly value: string | number | bigint | boolean | null; readonly escaped: boolean; constructor({ type, startIndex, endIndex, line, column, hadLineTerminatorBefore, name, value, escaped }: Pick); valueAsString(): string; valueAsNumeric(): number | bigint; valueAsBoolean(): boolean; } export declare abstract class Lexer { protected abstract readonly source: string; protected abstract readonly decoratingSource?: string; protected currentToken: TokenData; protected peekToken: TokenData; protected peekAheadToken: TokenData | undefined; protected position: number; protected get debug(): string; protected line: number; protected columnOffset: number; protected scannedValue: string | number | Token | bigint | boolean; protected lineTerminatorBeforeNextToken: boolean; protected positionForNextToken: number; protected lineForNextToken: number; protected columnForNextToken: number; protected escapeIndex: number; protected abstract readonly specifier?: string; earlyErrors: Set; decorateSyntaxError(error: Pick, location: number | Locatable): void; static decorateSyntaxErrorWithScriptId(error: ObjectValue, scriptId: string | undefined): void; addEarlyError({ Value: error }: ThrowCompletion, location?: Locatable): ErrorObject; abstract isStrictMode(): boolean; raise(error: ThrowCompletion, context?: number | Locatable): never; unexpected(location?: number | Locatable): never; advance(): TokenData; next(): TokenData; peek(): TokenData; peekAhead(): TokenData; matches(token: string | Token, peek: TokenData): boolean; test(token: string | Token): boolean; testAhead(token: string | Token): boolean; eat(token: string | Token): boolean; expect(token: string | Token): TokenData; skipSpace(): void; skipHashbangComment(): void; skipLineComment(): void; skipBlockComment(): void; nextToken(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103; scanNumber(): 88 | 90; scanString(char: string): 89; scanEscapeSequence(): string; scanCodePoint(): number; scanHex(length: number): number; scanIdentifierOrKeyword(isPrivate?: boolean): 49 | 50 | 51 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 102 | 103; scanRegularExpressionBody(): void; scanRegularExpressionFlags(): void; } //# sourceMappingURL=Lexer.d.mts.map