feat(ecma): convert eligible @keyword.operators

This commit is contained in:
Ananda Umamil 2023-06-04 11:04:40 +07:00 committed by GitHub
parent 56022e0b05
commit bee003b880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View file

@ -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
[

View file

@ -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"

View file

@ -5,4 +5,4 @@ export { foo as bar };
// ^ include
const n = 5 as number;
// ^ keyword
// ^ keyword.operator