Skip to content

fix(lexer): don't merge ( into an operator's token - #10

Merged
aurelleb merged 2 commits into
vicinaehq:mainfrom
vMohammad24:fix/lexer-paren
Sep 18, 2026
Merged

aurelleb merged 2 commits into
vicinaehq:mainfrom
vMohammad24:fix/lexer-paren

Conversation

@vMohammad24

Copy link
Copy Markdown
Contributor

an operator following ( was getting swallowing the parenthesis into one invalid token (e.x: 2*(3) lexed as 2 + "*(" which doesnt match any operator alias so it just gives up (on strict) or returns invalid values.

examples on what this fixes are in the corpus tests, including:

2*(3) = 6 (was 2)

5*(3+4) = 35 (was 9)

2**(3) = 8 (was 2)

vMohammad24 and others added 2 commits September 18, 2026 22:15
(cherry picked from commit 80b67cffb323937a58ee0b569820a939b9e7f4ac)
@aurelleb
aurelleb merged commit 7379178 into vicinaehq:main Sep 18, 2026
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.

2 participants