/** * Lexer class for tokenizing RobinPath code */ /** * Token kinds for RobinPath language * Using const object instead of enum for better compatibility */ export declare const TokenKind: { readonly STRING: "STRING"; readonly NUMBER: "NUMBER"; readonly BOOLEAN: "BOOLEAN"; readonly NULL: "NULL"; readonly IDENTIFIER: "IDENTIFIER"; readonly VARIABLE: "VARIABLE"; readonly KEYWORD: "KEYWORD"; readonly ASSIGN: "ASSIGN"; readonly PLUS: "PLUS"; readonly MINUS: "MINUS"; readonly MULTIPLY: "MULTIPLY"; readonly DIVIDE: "DIVIDE"; readonly MODULO: "MODULO"; readonly EQ: "EQ"; readonly NE: "NE"; readonly GT: "GT"; readonly LT: "LT"; readonly GTE: "GTE"; readonly LTE: "LTE"; readonly AND: "AND"; readonly OR: "OR"; readonly NOT: "NOT"; readonly LPAREN: "LPAREN"; readonly RPAREN: "RPAREN"; readonly LBRACKET: "LBRACKET"; readonly RBRACKET: "RBRACKET"; readonly LBRACE: "LBRACE"; readonly RBRACE: "RBRACE"; readonly COMMA: "COMMA"; readonly COLON: "COLON"; readonly DOT: "DOT"; readonly DECORATOR: "DECORATOR"; readonly COMMENT: "COMMENT"; readonly NEWLINE: "NEWLINE"; readonly EOF: "EOF"; readonly SUBEXPRESSION_OPEN: "SUBEXPRESSION_OPEN"; }; export type TokenKind = typeof TokenKind[keyof typeof TokenKind]; /** * List of RobinPath keywords */ export declare const KEYWORDS: Set; /** * A single token in the source code */ export interface Token { kind: TokenKind; text: string; line: number; column: number; value?: any; isContinuation?: boolean; } /** * Position information for error reporting */ export interface SourcePosition { line: number; column: number; } export declare class Lexer { /** * Tokenize entire source code into Token objects * This is the new token-stream based approach * * @param source - Full source code (multi-line) * @returns Array of tokens with position information */ static tokenizeFull(source: string): Token[]; /** * Legacy tokenize method - kept for backward compatibility * Tokenizes a single line into string tokens * * @param line - A single line of code * @returns Array of string tokens */ static tokenize(line: string): string[]; }