Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

':' is tokenized as an OPERATOR rather than a CONSTANT #15

Open
Derek-Jones opened this issue Oct 11, 2024 · 2 comments
Open

':' is tokenized as an OPERATOR rather than a CONSTANT #15

Derek-Jones opened this issue Oct 11, 2024 · 2 comments

Comments

@Derek-Jones
Copy link

The character constant ':' is tokenized as an OPERATOR rather than a CONSTANT. The same incorrect behavior also occurs for the string literal ":"

x == '(' && y == ':' && z == ":" :

(x, TokenType.IDENTIFIER, (1, 1))
(==, TokenType.OPERATOR, (1, 3))
(', TokenType.SPECIAL_SYMBOL, (1, 6))
((, TokenType.CONSTANT, (1, 7))
(', TokenType.SPECIAL_SYMBOL, (1, 8))
(&&, TokenType.OPERATOR, (1, 10))
(y, TokenType.IDENTIFIER, (1, 13))
(==, TokenType.OPERATOR, (1, 15))
(', TokenType.SPECIAL_SYMBOL, (1, 18))
(:, TokenType.OPERATOR, (1, 19))
(', TokenType.SPECIAL_SYMBOL, (1, 20))
(&&, TokenType.OPERATOR, (1, 22))
(z, TokenType.IDENTIFIER, (1, 25))
(==, TokenType.OPERATOR, (1, 27))
(", TokenType.SPECIAL_SYMBOL, (1, 30))
(:, TokenType.OPERATOR, (1, 31))
(", TokenType.SPECIAL_SYMBOL, (1, 32))
(:, TokenType.OPERATOR, (1, 34))
@Dec1mo
Copy link
Collaborator

Dec1mo commented Oct 13, 2024

Thanks for informing us this bug, Derek.
Unfortunately, we no longer maintain this repository. But we do welcome contributions, so you might make a PR to fix this error. Cheers!

@ngocbh
Copy link
Member

ngocbh commented Oct 30, 2024

@tranvien98 do you wanna take a look at this? I'm gonna release a new version soon. Hopefully we can get it fixed as well.

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

No branches or pull requests

3 participants