dash icon indicating copy to clipboard operation
dash copied to clipboard

float literal and identifier parsed incorrectly

Open trueharuu opened this issue 2 years ago • 1 comments

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)

trueharuu avatar Apr 24 '23 17:04 trueharuu

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

FnControlOption avatar Mar 30 '24 03:03 FnControlOption