Add some operators and match classes (with regex)

This commit is contained in:
Akin Sowemimo 2020-07-22 23:25:02 +01:00 committed by Stephan Seitz
parent 1611998ca9
commit 2ae63525dc

View file

@ -13,12 +13,42 @@
(marker_annotation (marker_annotation
name: (identifier) @attribute) name: (identifier) @attribute)
; TODO: operators ; Operators
[ [
"@" "@"
"=>"
".."
"??"
"=="
"?"
":"
"&&"
"%"
"<"
">"
">="
"<="
"||"
(is_operator)
(prefix_operator)
(equality_operator)
(additive_operator) (additive_operator)
] @operator ] @operator
; TODO: delimiers/punctuation
; Delimiters
"." @punctuation.delimiter
"," @punctuation.delimiter
";" @punctuation.delimiter
"(" @punctuation.bracket
")" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
"[" @punctuation.bracket
"]" @punctuation.bracket
; Types ; Types
@ -48,8 +78,8 @@
; Variables ; Variables
((identifier) @constant ((identifier) @type
(#match? @constant "^_*[A-Z][A-Z\d_]+")) (#match? @type "^[A-Z]"))
(this) @constant.builtin (this) @constant.builtin
@ -86,13 +116,18 @@
"extends" "extends"
"final" "final"
"implements" "implements"
"is"
"as" "as"
"mixin" "mixin"
"external" "external"
"new" "new"
"return" "return"
"static" "static"
"required"
"var"
"const"
"async"
"await"
; "rethrow"
] @keyword ] @keyword
;TODO: var, async, await ;TODO: var, async, await
; "rethrow" @keyword ; "rethrow" @keyword