-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[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
1 parent
bec152c
commit 9803e11
Showing
2 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters