mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(ecma): convert eligible @keyword.operators
This commit is contained in:
parent
56022e0b05
commit
bee003b880
3 changed files with 11 additions and 8 deletions
|
|
@ -256,7 +256,7 @@
|
|||
(binary_expression "/" @operator)
|
||||
(ternary_expression ["?" ":"] @conditional.ternary)
|
||||
(unary_expression ["!" "~" "-" "+"] @operator)
|
||||
(unary_expression ["delete" "void" "typeof"] @keyword.operator)
|
||||
(unary_expression ["delete" "void"] @keyword.operator)
|
||||
|
||||
[
|
||||
"("
|
||||
|
|
@ -305,13 +305,10 @@
|
|||
"export"
|
||||
"extends"
|
||||
"get"
|
||||
"in"
|
||||
"instanceof"
|
||||
"let"
|
||||
"set"
|
||||
"static"
|
||||
"target"
|
||||
"typeof"
|
||||
"var"
|
||||
"with"
|
||||
] @keyword
|
||||
|
|
@ -333,6 +330,9 @@
|
|||
[
|
||||
"new"
|
||||
"delete"
|
||||
"in"
|
||||
"instanceof"
|
||||
"typeof"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
|
|
|
|||
|
|
@ -6,17 +6,20 @@
|
|||
"export"
|
||||
"implements"
|
||||
"interface"
|
||||
"keyof"
|
||||
"type"
|
||||
"namespace"
|
||||
"override"
|
||||
"satisfies"
|
||||
"module"
|
||||
"infer"
|
||||
"is"
|
||||
] @keyword
|
||||
|
||||
(as_expression "as" @keyword)
|
||||
[
|
||||
"keyof"
|
||||
"satisfies"
|
||||
] @keyword.operator
|
||||
|
||||
(as_expression "as" @keyword.operator)
|
||||
|
||||
[
|
||||
"abstract"
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ export { foo as bar };
|
|||
// ^ include
|
||||
|
||||
const n = 5 as number;
|
||||
// ^ keyword
|
||||
// ^ keyword.operator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue