-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
The recent change in #17 to ban infix tokens runs afoul of an ASI hazard that results in different semantics between throw
expressions and ThrowStatement for the +
, -
, /
, and /=
tokens:
a ?? throw b // <- ASI inserts semicolon
+ c // <- prefix '+'
// vs
throw b // <- no ASI
+ c
a ?? throw b // <- ASI inserts semicolon
- c // <- prefix '-'
// vs
throw b // <- no ASI
- c
a ?? throw b // <- ASI inserts semicolon
/ c/d // <- regexp literal
// vs
throw b // <- no ASI
/ c/d
a = throw b // <- ASI inserts semicolon
/=c/d // <- regexp literal
// vs
throw b // <- no ASI
/=c/d
Metadata
Metadata
Assignees
Labels
No labels