Please sign in to comment.
[[FIX]] Correct interpretation of ASI (#3045)
Previously, the following operators were incorrectly interpreted as "infix" operators: - `++` - `--` - `yield` The internal `isInfix` function tended to obscure this error because it identified "infix" tokens via a boolean logic expression that acted as a blacklist. This expression was difficult to understand and hostile to future extensions for new language features (because future tokens could be mistakenly implemented as "infix" operators). Update all "infix" operator token definitions to explicitly define the `infix` property, obviating the need for the internal `isInfix` function. Ensure that the aforementioned tokens are not interpreted as "infix" operators, This corrects the behavior of the internal `isEndOfExpr` function, which is appreciable when linting code that relies on automatic semicolon insertion.
- Loading branch information...
Showing with 55 additions and 9 deletions.