Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
123 lines
3.6 KiB
TypeScript
123 lines
3.6 KiB
TypeScript
export declare enum TokenType {
|
|
TEXT = "TEXT",
|
|
EXPRESSION_START = "EXPRESSION_START",// <%=
|
|
EXPRESSION_UNESCAPED = "EXPRESSION_UNESCAPED",// <%!=
|
|
CODE_START = "CODE_START",// <%
|
|
TAG_END = "TAG_END",// %>
|
|
COMMENT = "COMMENT",// <%-- comment --%>
|
|
DEFINE_START = "DEFINE_START",// <Define:
|
|
DEFINE_END = "DEFINE_END",// </Define:
|
|
COMPONENT_NAME = "COMPONENT_NAME",
|
|
SLOT_START = "SLOT_START",// <#
|
|
SLOT_END = "SLOT_END",// </#
|
|
SLOT_NAME = "SLOT_NAME",
|
|
TAG_OPEN = "TAG_OPEN",// <tagname or <ComponentName
|
|
TAG_CLOSE = "TAG_CLOSE",// </tagname or </ComponentName
|
|
TAG_NAME = "TAG_NAME",// The tag/component name
|
|
SELF_CLOSING = "SELF_CLOSING",// />
|
|
ATTR_NAME = "ATTR_NAME",// $property or regular
|
|
ATTR_VALUE = "ATTR_VALUE",
|
|
COLON = "COLON",
|
|
SEMICOLON = "SEMICOLON",
|
|
GT = "GT",// >
|
|
LT = "LT",// <
|
|
SLASH = "SLASH",// /
|
|
EQUALS = "EQUALS",// =
|
|
QUOTE = "QUOTE",// " or '
|
|
EOF = "EOF",
|
|
NEWLINE = "NEWLINE",
|
|
WHITESPACE = "WHITESPACE",
|
|
JAVASCRIPT = "JAVASCRIPT"
|
|
}
|
|
export interface SourceLocation {
|
|
start: {
|
|
line: number;
|
|
column: number;
|
|
offset: number;
|
|
};
|
|
end: {
|
|
line: number;
|
|
column: number;
|
|
offset: number;
|
|
};
|
|
}
|
|
export interface Token {
|
|
type: TokenType;
|
|
value: string;
|
|
line: number;
|
|
column: number;
|
|
start: number;
|
|
end: number;
|
|
loc?: SourceLocation;
|
|
}
|
|
export declare class Lexer {
|
|
private input;
|
|
private position;
|
|
private line;
|
|
private column;
|
|
private tokens;
|
|
private savedPosition;
|
|
constructor(input: string);
|
|
/**
|
|
* Save current position for later token creation
|
|
*/
|
|
private savePosition;
|
|
/**
|
|
* Get saved position or current position
|
|
*/
|
|
private getSavedPosition;
|
|
/**
|
|
* Replace <%-- comment --%> with equivalent number of newlines
|
|
* This ensures line mapping stays accurate while removing comment content
|
|
*/
|
|
private preprocessComments;
|
|
/**
|
|
* Replace HTML comments (<!-- -->) that appear OUTSIDE of <Define> tags
|
|
* This strips documentation comments before component definitions
|
|
* HTML comments INSIDE <Define> tags are preserved in the output
|
|
*/
|
|
private preprocessHTMLComments;
|
|
/**
|
|
* Preprocess code blocks and expressions
|
|
* - Insert comment markers for empty lines in code blocks
|
|
* - Collapse multi-line expressions to single line with trailing newlines
|
|
* This ensures 1:1 line mapping in generated code
|
|
*/
|
|
private preprocessCodeBlocks;
|
|
/**
|
|
* Find the closing %> tag, properly handling strings and comments
|
|
*/
|
|
private findClosingTag;
|
|
tokenize(): Token[];
|
|
private scan_next;
|
|
private scan_text;
|
|
private scan_code_block;
|
|
private scan_comment;
|
|
private scan_html_comment;
|
|
private scan_expression;
|
|
private scan_javascript;
|
|
private scan_component_name;
|
|
private scan_slot_name;
|
|
private match_sequence;
|
|
private match_keyword;
|
|
private peek_sequence;
|
|
private peek_sequence_at;
|
|
private skip_whitespace;
|
|
private current_char;
|
|
private peek_ahead;
|
|
private advance;
|
|
private add_token;
|
|
private is_tag_name_char;
|
|
private is_tag_name_continue_char;
|
|
private scan_opening_tag;
|
|
private scan_closing_tag;
|
|
private scan_attributes;
|
|
private is_attribute_start_char;
|
|
private scan_attribute;
|
|
private scan_attribute_value;
|
|
private validate_unquoted_value;
|
|
private get_current_attribute_context;
|
|
private value_contains_interpolation;
|
|
private scan_interpolated_attribute_value;
|
|
}
|
|
//# sourceMappingURL=lexer.d.ts.map
|