float literal and identifier parsed incorrectly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, rust
- Domain
- compilers
Research direction
Run the reported JavaScript inputs and compare the actual results with the expected syntax errors. Trace how the lexer or parser handles an integer immediately followed by an identifier, including the whitespace case, and consider the issue complete when all three examples produce the stated outputs.
Written by the indexing model from the issue text.
Description
Inputs:
let x = 3; 3x
3 x
5y
Expected Outputs:
Syntax Error: Invalid or Unexpected token
Syntax Error: Unexpected identifier 'x'
Syntax Error: Invalid or Unexpected token
Actual Outputs:
3
3
ReferenceError: y is not defined
It seems that (integer)(identifier) is getting parsed as (integer), (identifier), effectively disposing the integer. None of these should pass the lexing stage, except in the case where there is whitespace between the two (both are valid tokens individually)
- Dominant language
- Rust
- Stars
- 54
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from y21/dash
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
`parseInt(x, undefined)` and `parseInt(x, null)` should be treated as if they were `parseInt(x, 10)` Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
-
AST
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
A-rt bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100