Skip to content

Add basic ERB support to Lexer and refactor Lexer#20

Merged
marcoroth merged 13 commits intomainfrom
lexer-rework
Feb 11, 2025
Merged

Add basic ERB support to Lexer and refactor Lexer#20
marcoroth merged 13 commits intomainfrom
lexer-rework

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Feb 11, 2025

This pull request includes significant changes to the lexer and token handling in the codebase. The changes focus on improving the handling of HTML and ERB tokens by updating the lexer states and token types, and adding new tests to ensure the correct functionality.

Lexer and Token Handling Improvements:

Test Updates:

ERB Support

Right now this pull request only supports basic ERB Tags in the DATA state, which works for basic scenarios. We need to probably introduce a stack-based approach to be able to detect ERB interpolation inside HTML Tags, HTML Attributes, HTML Comments and more.

@marcoroth marcoroth changed the title Add ERB support to Lexer and refactor Lexer Add basic ERB support to Lexer and refactor Lexer Feb 11, 2025
@marcoroth marcoroth merged commit e5171a5 into main Feb 11, 2025
4 checks passed
@marcoroth marcoroth deleted the lexer-rework branch February 11, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant