-
-
Notifications
You must be signed in to change notification settings - Fork 477
Closed
Labels
E-EasyEasyEasybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerslexerIssues surrounding the lexerIssues surrounding the lexer
Milestone
Description
Describe the bug
In #397, we modified NaN to be lexed as a number, and not as an identifier. This fixed the most common case of using NaN, that wouldn't work before, but it won't work for Number.NaN, among others.
To Reproduce
This now fails:
Number.NaN;Expected behavior
This should produce NaN, since it's almost the same case, but it produces a parsing error.
Additional context
We will need to add the associated constant to the "Global" object and to the "Number" for this to work, and make sure that an identifier in the global scope tries to access the constant in the global object.
Metadata
Metadata
Assignees
Labels
E-EasyEasyEasybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerslexerIssues surrounding the lexerIssues surrounding the lexer