Extract syntax highlighting properties from tree-sitter highlight queries

This commit is contained in:
Nate Butler 2023-07-27 12:25:53 -04:00
parent 46dd717857
commit 85f193dd09
16 changed files with 424 additions and 365 deletions

View file

@ -158,7 +158,7 @@
[
"{"
"}"
] @constructor)
] @method.constructor)
;; Functions
@ -195,4 +195,4 @@
(number) @number
(string) @string
(string) @string

View file

@ -47,8 +47,8 @@
((name) @constant.builtin
(#match? @constant.builtin "^__[A-Z][A-Z\d_]+__$"))
((name) @constructor
(#match? @constructor "^[A-Z]"))
((name) @method.constructor
(#match? @method.constructor "^[A-Z]"))
((name) @variable.builtin
(#eq? @variable.builtin "this"))

View file

@ -43,8 +43,8 @@
; Special identifiers
((identifier) @constructor
(#match? @constructor "^[A-Z]"))
((identifier) @method.constructor
(#match? @method.constructor "^[A-Z]"))
((identifier) @type
(#match? @type "^[A-Z]"))
@ -218,4 +218,4 @@
"type"
"readonly"
"override"
] @keyword
] @keyword