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

float literal and identifier parsed incorrectly #57

Open
trueharuu opened this issue Apr 24, 2023 · 1 comment
Open

float literal and identifier parsed incorrectly #57

trueharuu opened this issue Apr 24, 2023 · 1 comment
Labels
A-parser bug Something isn't working

Comments

@trueharuu
Copy link
Contributor

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)

@y21 y21 added bug Something isn't working A-parser labels Apr 24, 2023
@FnControlOption
Copy link

  • 3x and 5y -> dash_lexer
  • 3 x (space between) -> dash_parser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants