-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree-sitter rolling fixes, 1.117 edition #974
Changes from 1 commit
da1912d
5472e32
5ea9adf
6d36685
3d70f62
8e9e05d
4ff4a8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,16 +18,16 @@ | |||||
(identifier) @variable.other.assignment.import.namespace._LANG_) | ||||||
|
||||||
; The "*" in `export * from 'bar'` | ||||||
(export_statement "*" @variable.other.assignment.export.all.js) | ||||||
(export_statement "*" @variable.other.assignment.export.all._LANG_) | ||||||
|
||||||
; The "*" in `export * as Foo from 'bar'` | ||||||
(export_statement | ||||||
(namespace_export "*" @variable.other.assignment.export.all.js)) | ||||||
(namespace_export "*" @variable.other.assignment.export.all._LANG_)) | ||||||
|
||||||
; The "*" in `export * as Foo from 'bar'` | ||||||
(export_statement | ||||||
(namespace_export | ||||||
(identifier) @variable.other.assignment.export.alias.js)) | ||||||
(identifier) @variable.other.assignment.export.alias._LANG_)) | ||||||
|
||||||
; The "Foo" in `export { Foo }` | ||||||
(export_specifier | ||||||
|
@@ -51,7 +51,7 @@ | |||||
; ========= | ||||||
|
||||||
(this) @variable.language.this._LANG_ | ||||||
(super) @variable.language.super._LANG_._LANG_x | ||||||
(super) @variable.language.super._LANG_ | ||||||
|
||||||
(required_parameter | ||||||
pattern: (identifier) @variable.parameter.with-default._LANG_ | ||||||
|
@@ -345,7 +345,7 @@ | |||||
|
||||||
"=>" @storage.type.arrow._LANG_ | ||||||
|
||||||
; TODO: If I allow scopes like `storage.type.string._LANG_`, I will make a lot of | ||||||
; TODO: If I allow scopes like `storage.type.string.ts`, I will make a lot of | ||||||
; text look like strings by accident. This really needs to be fixed in syntax | ||||||
; themes. | ||||||
; | ||||||
|
@@ -764,10 +764,10 @@ | |||||
) @meta.embedded.line.interpolation._LANG_ | ||||||
|
||||||
(string | ||||||
(escape_sequence) @constant.character.escape.js) | ||||||
(escape_sequence) @constant.character.escape._LANG_) | ||||||
|
||||||
(template_string | ||||||
(escape_sequence) @constant.character.escape.js) | ||||||
(escape_sequence) @constant.character.escape._LANG_) | ||||||
|
||||||
|
||||||
; CONSTANTS | ||||||
|
@@ -817,16 +817,16 @@ | |||||
; REGEX | ||||||
; ===== | ||||||
|
||||||
(regex) @string.regexp.js | ||||||
(regex) @string.regexp._LANG_ | ||||||
(regex | ||||||
"/" @punctuation.definition.string.begin.js | ||||||
"/" @punctuation.definition.string.begin._LANG_ | ||||||
(#is? test.first)) | ||||||
|
||||||
(regex | ||||||
"/" @punctuation.definition.string.end.js | ||||||
"/" @punctuation.definition.string.end._LANG_ | ||||||
(#is? test.last)) | ||||||
|
||||||
(regex_flags) @keyword.other.js | ||||||
(regex_flags) @keyword.other._LANG_ | ||||||
|
||||||
|
||||||
; OPERATORS | ||||||
|
@@ -837,26 +837,28 @@ | |||||
|
||||||
"=" @keyword.operator.assignment._LANG_ | ||||||
(non_null_expression "!" @keyword.operator.non-null._LANG_) | ||||||
(unary_expression"!" @keyword.operator.unary._LANG_) | ||||||
(unary_expression "!" @keyword.operator.unary._LANG_) | ||||||
|
||||||
[ | ||||||
"&&=" | ||||||
"||=" | ||||||
"??=" | ||||||
"+=" | ||||||
"-=" | ||||||
"*=" | ||||||
"**=" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
"/=" | ||||||
"%=" | ||||||
"^=" | ||||||
"&=" | ||||||
"|=" | ||||||
"<<=" | ||||||
">>=" | ||||||
">>>=" | ||||||
"&=" | ||||||
"^=" | ||||||
"|=" | ||||||
"??=" | ||||||
"||=" | ||||||
] @keyword.operator.assignment.compound._LANG_ | ||||||
|
||||||
(binary_expression | ||||||
["+" "-" "*" "/" "%"] @keyword.operator.arithmetic._LANG_) | ||||||
["/" "+" "-" "*" "**" "%"] @keyword.operator.arithmetic._LANG_) | ||||||
|
||||||
(unary_expression ["+" "-"] @keyword.operator.unary._LANG_) | ||||||
|
||||||
|
@@ -866,15 +868,14 @@ | |||||
"===" | ||||||
"!=" | ||||||
"!==" | ||||||
">=" | ||||||
"<=" | ||||||
">" | ||||||
"<" | ||||||
] @keyword.operator.comparison._LANG_ | ||||||
) | ||||||
|
||||||
["++" "--"] @keyword.operator.increment._LANG_ | ||||||
|
||||||
(binary_expression | ||||||
[">=" "<=" ">" "<"] @keyword.operator.relational._LANG_) | ||||||
|
||||||
[ | ||||||
"&&" | ||||||
"||" | ||||||
|
@@ -902,6 +903,20 @@ | |||||
"." @keyword.operator.accessor._LANG_ | ||||||
"?." @keyword.operator.accessor.optional-chaining._LANG_ | ||||||
|
||||||
; Optional chaining is illegal… | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unsure of the factuality of this comment, perhaps
Suggested change
/s (as in, just kidding!) Ah, I understand now, from reading the corresponding comment fragments below! So, there are specific contexts in which optional chaining is illegal. Got it. Definitely never mind this, then... |
||||||
|
||||||
; …on the left-hand side of an assignment. | ||||||
(assignment_expression | ||||||
left: (_) @_IGNORE_ | ||||||
(#set! prohibitsOptionalChaining true)) | ||||||
|
||||||
; …within a `new` expression. | ||||||
(new_expression | ||||||
constructor: (_) @_IGNORE_ | ||||||
(#set! prohibitsOptionalChaining true)) | ||||||
|
||||||
((optional_chain) @invalid.illegal.optional-chain._LANG_ | ||||||
(#is? test.descendantOfNodeWithData prohibitsOptionalChaining)) | ||||||
|
||||||
(ternary_expression | ||||||
["?" ":"] @keyword.operator.ternary._LANG_ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I Learned...
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND_assignment