Skip to content

Simplify Lexer by removing the lexer state#34

Merged
marcoroth merged 1 commit intomainfrom
lexer-simplification
Feb 16, 2025
Merged

Simplify Lexer by removing the lexer state#34
marcoroth merged 1 commit intomainfrom
lexer-simplification

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Feb 16, 2025

This pull request simplifies the lexer by removing its state, as I think the parser should handle most of what the lexer has been doing thus far.

I think the lexer is now much easier to understand and maintain.

With that, we also added new tokens such as TOKEN_IDENTIFIER, TOKEN_LT, TOKEN_SLASH, TOKEN_EQUALS, TOKEN_QUOTE, TOKEN_DASH, TOKEN_UNDERSCORE, TOKEN_EXCLAMATION, TOKEN_COLON, TOKEN_PERCENT, and TOKEN_ERROR and removed the ones we don't need anymore.

I also added a bunch of new tests and updated the old ones to match the new tokens. With this pull request we are now passing all tests without any skips!

@marcoroth marcoroth merged commit 444969f into main Feb 16, 2025
3 checks passed
@marcoroth marcoroth deleted the lexer-simplification branch February 16, 2025 02:09
This was referenced Feb 16, 2025
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