Migrate jqhtml slot syntax from <#name> to <Slot:name>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-24 03:43:45 +00:00
parent 22df126977
commit 881425bed6
35 changed files with 124 additions and 122 deletions

View File

@@ -430,13 +430,13 @@ export class Lexer {
return;
}
// Check for slot tags (v2)
if (this.match_sequence('</#')) {
this.add_token(TokenType.SLOT_END, '</#', start, this.position);
if (this.match_sequence('</Slot:')) {
this.add_token(TokenType.SLOT_END, '</Slot:', start, this.position);
this.scan_slot_name();
return;
}
if (this.match_sequence('<#')) {
this.add_token(TokenType.SLOT_START, '<#', start, this.position);
if (this.match_sequence('<Slot:')) {
this.add_token(TokenType.SLOT_START, '<Slot:', start, this.position);
this.scan_slot_name();
return;
}
@@ -504,8 +504,8 @@ export class Lexer {
}
// Peek ahead for special sequences
if (this.peek_ahead(1) === '%' ||
this.peek_ahead(1) === '#' || // Slot start
this.peek_ahead(1) === '/' && this.peek_ahead(2) === '#' || // Slot end
this.peek_sequence_at(1, 'Slot:') || // Slot start
this.peek_sequence_at(1, '/Slot:') || // Slot end
this.peek_ahead(1) === 'D' && this.peek_sequence_at(1, 'Define:') ||
this.peek_ahead(1) === '/' && this.peek_sequence_at(1, '/Define:')) {
break;