-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JavaScript] Clean up class member code (#3850)
Inspired by improvements from #3848. Consolidate the code handling class members (fields and methods) into a more coherent and stack-based approach. - Handle “backtrackable” elements (modifiers, accessor keywords, async) in a self-contained way in the `method-declaration` stack. - As a side benefit of the above, remove the duplicate get/set/async code that was needed due to sublimehq/sublime_text#3494. - Also expand function scopes to include modifiers. - Explicitly handle semicolons in class field declarations, letting us mark extraneous semicolons `punctuation.terminator.statement.empty.js` like in statement contexts. (This has proved useful for testing in the past.) - Remove `static-block-body`, which can be replaced with the regular `block` context. - Various minor improvements. Co-authored-by: deathaxe <[email protected]>
- Loading branch information
Showing
3 changed files
with
100 additions
and
110 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
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