/** Coerces a property key into a numeric index */ type ToIndex = T extends number ? ToIndex<`${T}`> : T extends `${bigint}` ? T extends `${infer I extends number}` ? I : never : never; type ReplaceType = T extends U ? V : T; type TokenDefinition = readonly [name: string, value: string | null, precedence?: number]; type TokenArrayToEnumLike = { readonly [I in ToIndex as A[I][0]]: I; }; type TokenArrayToElementArray = { readonly [P in keyof A]: ReplaceType; }; type TokenArrayToKeywordsArray = readonly { readonly [I in ToIndex]: A[I][1] extends Lowercase ? A[I][1] : never; }[ToIndex][]; type KeywordsArrayToEnumLike = { readonly [P in A[number]]: (typeof Token)[Uppercase

& keyof typeof Token]; }; export declare const RawTokens: readonly [readonly ["TEMPLATE", "`"], readonly ["PERIOD", "."], readonly ["LBRACK", "["], readonly ["OPTIONAL", "?."], readonly ["LPAREN", "("], readonly ["RPAREN", ")"], readonly ["RBRACK", "]"], readonly ["LBRACE", "{"], readonly ["COLON", ":"], readonly ["ELLIPSIS", "..."], readonly ["CONDITIONAL", "?"], readonly ["SEMICOLON", ";"], readonly ["RBRACE", "}"], readonly ["EOS", "EOS"], readonly ["ARROW", "=>"], readonly ["ASSIGN", "=", 2], readonly ["ASSIGN_NULLISH", "??", 3], readonly ["ASSIGN_OR", "||", 4], readonly ["ASSIGN_AND", "&&", 5], readonly ["ASSIGN_BIT_OR", "|", 6], readonly ["ASSIGN_BIT_XOR", "^", 7], readonly ["ASSIGN_BIT_AND", "&", 8], readonly ["ASSIGN_SHL", "<<", 11], readonly ["ASSIGN_SAR", ">>", 11], readonly ["ASSIGN_SHR", ">>>", 11], readonly ["ASSIGN_MUL", "*", 13], readonly ["ASSIGN_DIV", "/", 13], readonly ["ASSIGN_MOD", "%", 13], readonly ["ASSIGN_EXP", "**", 14], readonly ["ASSIGN_ADD", "+", 12], readonly ["ASSIGN_SUB", "-", 12], readonly ["COMMA", ",", 1], readonly ["NULLISH", "??", 3], readonly ["OR", "||", 4], readonly ["AND", "&&", 5], readonly ["BIT_OR", "|", 6], readonly ["BIT_XOR", "^", 7], readonly ["BIT_AND", "&", 8], readonly ["SHL", "<<", 11], readonly ["SAR", ">>", 11], readonly ["SHR", ">>>", 11], readonly ["MUL", "*", 13], readonly ["DIV", "/", 13], readonly ["MOD", "%", 13], readonly ["EXP", "**", 14], readonly ["ADD", "+", 12], readonly ["SUB", "-", 12], readonly ["NOT", "!"], readonly ["BIT_NOT", "~"], readonly ["DELETE", "delete"], readonly ["TYPEOF", "typeof"], readonly ["VOID", "void"], readonly ["INC", "++"], readonly ["DEC", "--"], readonly ["EQ", "==", 9], readonly ["EQ_STRICT", "===", 9], readonly ["NE", "!=", 9], readonly ["NE_STRICT", "!==", 9], readonly ["LT", "<", 10], readonly ["GT", ">", 10], readonly ["LTE", "<=", 10], readonly ["GTE", ">=", 10], readonly ["INSTANCEOF", "instanceof", 10], readonly ["IN", "in", 10], readonly ["BREAK", "break"], readonly ["CASE", "case"], readonly ["CATCH", "catch"], readonly ["CONTINUE", "continue"], readonly ["DEBUGGER", "debugger"], readonly ["DEFAULT", "default"], readonly ["DO", "do"], readonly ["ELSE", "else"], readonly ["FINALLY", "finally"], readonly ["FOR", "for"], readonly ["FUNCTION", "function"], readonly ["IF", "if"], readonly ["NEW", "new"], readonly ["RETURN", "return"], readonly ["SWITCH", "switch"], readonly ["THROW", "throw"], readonly ["TRY", "try"], readonly ["VAR", "var"], readonly ["WHILE", "while"], readonly ["WITH", "with"], readonly ["THIS", "this"], readonly ["NULL", "null"], readonly ["TRUE", "true"], readonly ["FALSE", "false"], readonly ["NUMBER", null], readonly ["STRING", null], readonly ["BIGINT", null], readonly ["SUPER", "super"], readonly ["IDENTIFIER", null], readonly ["AWAIT", "await"], readonly ["YIELD", "yield"], readonly ["CLASS", "class"], readonly ["CONST", "const"], readonly ["EXPORT", "export"], readonly ["EXTENDS", "extends"], readonly ["IMPORT", "import"], readonly ["PRIVATE_IDENTIFIER", null], readonly ["AT", "@"], readonly ["ENUM", "enum"], readonly ["ESCAPED_KEYWORD", null]]; export declare const Token: TokenArrayToEnumLike; export type Token = (typeof Token)[keyof typeof Token]; export declare const TokenNames: TokenArrayToElementArray; export declare const TokenValues: TokenArrayToElementArray; export declare const TokenPrecedence: TokenArrayToElementArray; declare const Keywords: TokenArrayToKeywordsArray; export declare const KeywordLookup: KeywordsArrayToEnumLike; export declare const isAutomaticSemicolon: (t: number) => boolean; export declare const isMember: (t: number) => boolean; export declare const isPropertyOrCall: (t: number) => boolean; export declare const isKeyword: (t: number) => t is (typeof KeywordLookup)[keyof typeof KeywordLookup]; export declare const isKeywordRaw: (s: string) => s is keyof typeof KeywordLookup; export declare const isReservedWordStrict: (s: string) => boolean; export {}; //# sourceMappingURL=tokens.d.mts.map