/** * Cutting a condition into tokens, in CEL's lexical rules and no further. * * Everything refused here is refused because CEL would read it differently or * because the subset leaves it out, and the message says which: a node id with * a dash is subtraction in CEL, so it is refused where it is written rather * than read as arithmetic a real CEL library would evaluate. */ /** One token, with where it sits in the source so a message can quote it. */ export type Token = { readonly kind: "name" | "number" | "string" | "op" | "end"; readonly text: string; /** A number's or a string's value, unescaped. */ readonly value?: number | string; readonly start: number; readonly end: number; }; /** A condition that is not in the language. Thrown inside the module, returned as a problem at its door. */ export declare class SyntaxFault extends Error { } /** Whether a word can name something a condition reads. */ export declare function isReserved(word: string): boolean; /** The tokens of `source`, ending with one `end` token. Throws `SyntaxFault`. */ export declare function tokenize(source: string): Token[]; //# sourceMappingURL=tokens.d.ts.map