mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: more @keyword.type captures
This commit is contained in:
parent
f0a1a13316
commit
f58cae6c22
74 changed files with 395 additions and 239 deletions
|
|
@ -168,7 +168,7 @@ As languages differ quite a lot, here is a set of captures available to you when
|
||||||
@keyword.function ; keywords that define a function (e.g. `func` in Go, `def` in Python)
|
@keyword.function ; keywords that define a function (e.g. `func` in Go, `def` in Python)
|
||||||
@keyword.operator ; operators that are English words (e.g. `and` / `or`)
|
@keyword.operator ; operators that are English words (e.g. `and` / `or`)
|
||||||
@keyword.import ; keywords for including modules (e.g. `import` / `from` in Python)
|
@keyword.import ; keywords for including modules (e.g. `import` / `from` in Python)
|
||||||
@keyword.type ; keywords describing composite types (e.g. `struct`, `enum`)
|
@keyword.type ; keywords describing namespaces and composite types (e.g. `struct`, `enum`)
|
||||||
@keyword.modifier ; keywords modifying other constructs (e.g. `const`, `static`, `public`)
|
@keyword.modifier ; keywords modifying other constructs (e.g. `const`, `static`, `public`)
|
||||||
@keyword.repeat ; keywords related to loops (e.g. `for` / `while`)
|
@keyword.repeat ; keywords related to loops (e.g. `for` / `while`)
|
||||||
@keyword.return ; keywords like `return` and `yield`
|
@keyword.return ; keywords like `return` and `yield`
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
"private"
|
"private"
|
||||||
"protected"
|
"protected"
|
||||||
"range"
|
"range"
|
||||||
"record"
|
|
||||||
"separate"
|
"separate"
|
||||||
"subtype"
|
"subtype"
|
||||||
"synchronized"
|
"synchronized"
|
||||||
|
|
@ -50,6 +49,8 @@
|
||||||
"when"
|
"when"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"record" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"aliased"
|
"aliased"
|
||||||
"constant"
|
"constant"
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,10 @@
|
||||||
"infix"
|
"infix"
|
||||||
"infixl"
|
"infixl"
|
||||||
"infixr"
|
"infixr"
|
||||||
"record"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"record" @keyword.type
|
||||||
|
|
||||||
;(expr
|
;(expr
|
||||||
; f_name: (atom) @function)
|
; f_name: (atom) @function)
|
||||||
; Brackets
|
; Brackets
|
||||||
|
|
|
||||||
|
|
@ -227,17 +227,14 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"abstract"
|
"abstract"
|
||||||
"class"
|
|
||||||
"continue"
|
"continue"
|
||||||
"default"
|
"default"
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"final"
|
"final"
|
||||||
"get"
|
"get"
|
||||||
"global"
|
"global"
|
||||||
"implements"
|
"implements"
|
||||||
"instanceof"
|
"instanceof"
|
||||||
"interface"
|
|
||||||
"on"
|
"on"
|
||||||
"private"
|
"private"
|
||||||
"protected"
|
"protected"
|
||||||
|
|
@ -254,4 +251,10 @@
|
||||||
"inherited_sharing"
|
"inherited_sharing"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"interface"
|
||||||
|
"class"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"System.runAs" @function.builtin
|
"System.runAs" @function.builtin
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,18 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"default"
|
"default"
|
||||||
"enum"
|
|
||||||
"struct"
|
|
||||||
"typedef"
|
|
||||||
"union"
|
|
||||||
"goto"
|
"goto"
|
||||||
"asm"
|
"asm"
|
||||||
"__asm__"
|
"__asm__"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"typedef"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"sizeof"
|
"sizeof"
|
||||||
"offsetof"
|
"offsetof"
|
||||||
|
|
|
||||||
|
|
@ -403,18 +403,10 @@
|
||||||
"implicit"
|
"implicit"
|
||||||
"explicit"
|
"explicit"
|
||||||
"override"
|
"override"
|
||||||
"class"
|
|
||||||
"delegate"
|
|
||||||
"enum"
|
|
||||||
"interface"
|
|
||||||
"namespace"
|
|
||||||
"struct"
|
|
||||||
"get"
|
"get"
|
||||||
"set"
|
"set"
|
||||||
"init"
|
"init"
|
||||||
"where"
|
"where"
|
||||||
"record"
|
|
||||||
"event"
|
|
||||||
"add"
|
"add"
|
||||||
"remove"
|
"remove"
|
||||||
"checked"
|
"checked"
|
||||||
|
|
@ -423,6 +415,17 @@
|
||||||
"alias"
|
"alias"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"record"
|
||||||
|
"class"
|
||||||
|
"struct"
|
||||||
|
"interface"
|
||||||
|
"namespace"
|
||||||
|
"event"
|
||||||
|
"delegate"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,6 @@
|
||||||
[
|
[
|
||||||
; 0.x
|
; 0.x
|
||||||
"using"
|
"using"
|
||||||
"namespace"
|
|
||||||
"struct"
|
|
||||||
"let"
|
"let"
|
||||||
"const"
|
"const"
|
||||||
"local"
|
"local"
|
||||||
|
|
@ -109,16 +107,21 @@
|
||||||
"call"
|
"call"
|
||||||
"nondet"
|
"nondet"
|
||||||
; 1.0
|
; 1.0
|
||||||
"type"
|
|
||||||
"impl"
|
"impl"
|
||||||
"implicits"
|
"implicits"
|
||||||
"of"
|
"of"
|
||||||
"ref"
|
"ref"
|
||||||
"mut"
|
"mut"
|
||||||
"trait"
|
|
||||||
"enum"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"struct"
|
||||||
|
"enum"
|
||||||
|
"namespace"
|
||||||
|
"type"
|
||||||
|
"trait"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"func"
|
"func"
|
||||||
"fn"
|
"fn"
|
||||||
|
|
|
||||||
|
|
@ -15,16 +15,17 @@
|
||||||
(import_path) @string.special.path
|
(import_path) @string.special.path
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
"extends" @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
"annotation"
|
|
||||||
"enum"
|
|
||||||
"group"
|
|
||||||
"interface"
|
|
||||||
"struct"
|
"struct"
|
||||||
|
"interface"
|
||||||
"union"
|
"union"
|
||||||
"extends"
|
"enum"
|
||||||
|
"annotation"
|
||||||
|
"group"
|
||||||
"namespace"
|
"namespace"
|
||||||
] @keyword
|
] @keyword.type
|
||||||
|
|
||||||
; Builtins
|
; Builtins
|
||||||
"const" @keyword.modifier
|
"const" @keyword.modifier
|
||||||
|
|
|
||||||
|
|
@ -202,20 +202,23 @@
|
||||||
] @keyword.exception
|
] @keyword.exception
|
||||||
|
|
||||||
[
|
[
|
||||||
"class"
|
|
||||||
"decltype"
|
"decltype"
|
||||||
"explicit"
|
"explicit"
|
||||||
"friend"
|
"friend"
|
||||||
"namespace"
|
|
||||||
"override"
|
"override"
|
||||||
"template"
|
|
||||||
"typename"
|
|
||||||
"using"
|
"using"
|
||||||
"concept"
|
|
||||||
"requires"
|
"requires"
|
||||||
"constexpr"
|
"constexpr"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"namespace"
|
||||||
|
"template"
|
||||||
|
"typename"
|
||||||
|
"concept"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"co_await"
|
"co_await"
|
||||||
"co_yield"
|
"co_yield"
|
||||||
|
|
|
||||||
|
|
@ -196,10 +196,7 @@
|
||||||
(case_builtin)
|
(case_builtin)
|
||||||
"late"
|
"late"
|
||||||
"required"
|
"required"
|
||||||
"extension"
|
|
||||||
"on"
|
"on"
|
||||||
"class"
|
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"in"
|
"in"
|
||||||
"is"
|
"is"
|
||||||
|
|
@ -208,6 +205,12 @@
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"enum"
|
||||||
|
"extension"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"return" @keyword.return
|
"return" @keyword.return
|
||||||
|
|
||||||
; Built in identifiers:
|
; Built in identifiers:
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,6 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"break"
|
"break"
|
||||||
"class"
|
|
||||||
"const"
|
"const"
|
||||||
"debugger"
|
"debugger"
|
||||||
"export"
|
"export"
|
||||||
|
|
@ -352,6 +351,8 @@
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,19 @@
|
||||||
|
|
||||||
(doc_comment) @comment.documentation @spell
|
(doc_comment) @comment.documentation @spell
|
||||||
|
|
||||||
"method" @keyword.function
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"service"
|
"service"
|
||||||
"errors"
|
"errors"
|
||||||
"data"
|
] @keyword
|
||||||
|
|
||||||
|
"method" @keyword.function
|
||||||
|
|
||||||
|
[
|
||||||
"enum"
|
"enum"
|
||||||
"extern"
|
"data"
|
||||||
] @type.builtin
|
] @keyword.type
|
||||||
|
|
||||||
|
"extern" @keyword.modifier
|
||||||
|
|
||||||
(type) @type.builtin
|
(type) @type.builtin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
"closed"
|
"closed"
|
||||||
"compose"
|
"compose"
|
||||||
"const"
|
"const"
|
||||||
"enum"
|
|
||||||
"error"
|
"error"
|
||||||
"flexible"
|
"flexible"
|
||||||
"library"
|
"library"
|
||||||
|
|
@ -15,16 +14,20 @@
|
||||||
"overlay"
|
"overlay"
|
||||||
"protocol"
|
"protocol"
|
||||||
"reserved"
|
"reserved"
|
||||||
"resource"
|
|
||||||
"service"
|
|
||||||
"strict"
|
"strict"
|
||||||
"struct"
|
|
||||||
"table"
|
|
||||||
"type"
|
|
||||||
"union"
|
|
||||||
"using"
|
"using"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"table"
|
||||||
|
"union"
|
||||||
|
"resource"
|
||||||
|
"service"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
(primitives_type) @type.builtin
|
(primitives_type) @type.builtin
|
||||||
|
|
||||||
(builtin_complex_type) @type.builtin
|
(builtin_complex_type) @type.builtin
|
||||||
|
|
|
||||||
|
|
@ -49,28 +49,18 @@
|
||||||
"attributes"
|
"attributes"
|
||||||
"associate"
|
"associate"
|
||||||
"block"
|
"block"
|
||||||
"class"
|
|
||||||
"classis"
|
"classis"
|
||||||
"contains"
|
"contains"
|
||||||
"default"
|
"default"
|
||||||
"dimension"
|
"dimension"
|
||||||
"endassociate"
|
"endassociate"
|
||||||
"endenum"
|
|
||||||
"endinterface"
|
|
||||||
"endmodule"
|
|
||||||
"endselect"
|
"endselect"
|
||||||
"endsubmodule"
|
|
||||||
"endtype"
|
|
||||||
"enum"
|
|
||||||
"enumerator"
|
"enumerator"
|
||||||
"equivalence"
|
"equivalence"
|
||||||
"extends"
|
"extends"
|
||||||
"goto"
|
"goto"
|
||||||
"interface"
|
|
||||||
"intrinsic"
|
"intrinsic"
|
||||||
"non_intrinsic"
|
"non_intrinsic"
|
||||||
"module"
|
|
||||||
"submodule"
|
|
||||||
"namelist"
|
"namelist"
|
||||||
"parameter"
|
"parameter"
|
||||||
"quiet"
|
"quiet"
|
||||||
|
|
@ -82,10 +72,23 @@
|
||||||
"sequence"
|
"sequence"
|
||||||
"stop"
|
"stop"
|
||||||
"target"
|
"target"
|
||||||
"type"
|
|
||||||
"typeis"
|
"typeis"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"enum"
|
||||||
|
"endenum"
|
||||||
|
"type"
|
||||||
|
"endtype"
|
||||||
|
"module"
|
||||||
|
"endmodule"
|
||||||
|
"submodule"
|
||||||
|
"endsubmodule"
|
||||||
|
"interface"
|
||||||
|
"endinterface"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
(default) @keyword
|
(default) @keyword
|
||||||
|
|
||||||
; Types
|
; Types
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
(source_file) @string.special.url)
|
(source_file) @string.special.url)
|
||||||
|
|
||||||
(namespace_declaration
|
(namespace_declaration
|
||||||
"namespace" @keyword
|
"namespace" @keyword.type
|
||||||
(alias_namespace) @module)
|
(alias_namespace) @module)
|
||||||
|
|
||||||
(type
|
(type
|
||||||
|
|
|
||||||
|
|
@ -210,11 +210,9 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"pass"
|
"pass"
|
||||||
"class"
|
|
||||||
"class_name"
|
"class_name"
|
||||||
"extends"
|
"extends"
|
||||||
"signal"
|
"signal"
|
||||||
"enum"
|
|
||||||
"var"
|
"var"
|
||||||
"onready"
|
"onready"
|
||||||
"export"
|
"export"
|
||||||
|
|
@ -227,6 +225,11 @@
|
||||||
"puppetsync"
|
"puppetsync"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"func" @keyword.function
|
"func" @keyword.function
|
||||||
|
|
||||||
"return" @keyword.return
|
"return" @keyword.return
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@
|
||||||
"const"
|
"const"
|
||||||
"varying"
|
"varying"
|
||||||
"uniform"
|
"uniform"
|
||||||
"struct"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"struct" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
(precision_qualifier)
|
(precision_qualifier)
|
||||||
(interpolation_qualifier)
|
(interpolation_qualifier)
|
||||||
|
|
|
||||||
|
|
@ -102,15 +102,18 @@
|
||||||
"default"
|
"default"
|
||||||
"defer"
|
"defer"
|
||||||
"goto"
|
"goto"
|
||||||
"interface"
|
|
||||||
"range"
|
"range"
|
||||||
"select"
|
"select"
|
||||||
"struct"
|
|
||||||
"type"
|
|
||||||
"var"
|
"var"
|
||||||
"fallthrough"
|
"fallthrough"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"type"
|
||||||
|
"struct"
|
||||||
|
"interface"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"func" @keyword.function
|
"func" @keyword.function
|
||||||
|
|
||||||
"return" @keyword.return
|
"return" @keyword.return
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,6 @@
|
||||||
"subscription"
|
"subscription"
|
||||||
"fragment"
|
"fragment"
|
||||||
"scalar"
|
"scalar"
|
||||||
"type"
|
|
||||||
"interface"
|
|
||||||
"union"
|
|
||||||
"enum"
|
|
||||||
"input"
|
"input"
|
||||||
"extend"
|
"extend"
|
||||||
"directive"
|
"directive"
|
||||||
|
|
@ -136,6 +132,13 @@
|
||||||
"implements"
|
"implements"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"union"
|
||||||
|
"type"
|
||||||
|
"interface"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
; Punctuation
|
; Punctuation
|
||||||
;------------
|
;------------
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
[
|
[
|
||||||
"!instanceof"
|
"!instanceof"
|
||||||
"assert"
|
"assert"
|
||||||
"class"
|
|
||||||
"extends"
|
"extends"
|
||||||
"instanceof"
|
"instanceof"
|
||||||
"package"
|
"package"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"!in"
|
"!in"
|
||||||
"as"
|
"as"
|
||||||
|
|
|
||||||
|
|
@ -22,18 +22,21 @@
|
||||||
"function" @keyword.function
|
"function" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
"type"
|
|
||||||
"interface"
|
|
||||||
"implements"
|
"implements"
|
||||||
"class"
|
|
||||||
"using"
|
"using"
|
||||||
"namespace"
|
|
||||||
"attribute"
|
"attribute"
|
||||||
"const"
|
"const"
|
||||||
"extends"
|
"extends"
|
||||||
"insteadof"
|
"insteadof"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"type"
|
||||||
|
"interface"
|
||||||
|
"namespace"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -41,14 +41,17 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"def"
|
"def"
|
||||||
"enum"
|
|
||||||
"export"
|
"export"
|
||||||
"let"
|
"let"
|
||||||
"struct"
|
|
||||||
"type"
|
|
||||||
"union"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"fn" @keyword.function
|
"fn" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -168,20 +168,23 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"assert"
|
"assert"
|
||||||
"class"
|
|
||||||
"record"
|
|
||||||
"default"
|
"default"
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"implements"
|
"implements"
|
||||||
"instanceof"
|
"instanceof"
|
||||||
"interface"
|
|
||||||
"@interface"
|
"@interface"
|
||||||
"permits"
|
"permits"
|
||||||
"to"
|
"to"
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"record"
|
||||||
|
"class"
|
||||||
|
"enum"
|
||||||
|
"interface"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
(synchronized_statement
|
(synchronized_statement
|
||||||
"synchronized" @keyword)
|
"synchronized" @keyword)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@
|
||||||
[
|
[
|
||||||
"struct"
|
"struct"
|
||||||
"end"
|
"end"
|
||||||
] @keyword)
|
] @keyword.type)
|
||||||
|
|
||||||
(macro_definition
|
(macro_definition
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -242,12 +242,15 @@
|
||||||
[
|
[
|
||||||
"val"
|
"val"
|
||||||
"var"
|
"var"
|
||||||
|
; "typeof" ; NOTE: It is reserved for future use
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
"enum"
|
"enum"
|
||||||
"class"
|
"class"
|
||||||
"object"
|
"object"
|
||||||
"interface"
|
"interface"
|
||||||
; "typeof" ; NOTE: It is reserved for future use
|
] @keyword.type
|
||||||
] @keyword
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"return"
|
"return"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
|
"grammar" @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
"enum"
|
|
||||||
"extern"
|
|
||||||
"grammar"
|
|
||||||
"match"
|
|
||||||
"type"
|
"type"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
|
[
|
||||||
"pub"
|
"pub"
|
||||||
] @keyword
|
"extern"
|
||||||
|
] @keyword.modifier
|
||||||
|
|
||||||
[
|
[
|
||||||
"match"
|
"match"
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,15 @@
|
||||||
"let"
|
"let"
|
||||||
"mapping"
|
"mapping"
|
||||||
"program"
|
"program"
|
||||||
"record"
|
|
||||||
"self"
|
"self"
|
||||||
"struct"
|
|
||||||
"then"
|
"then"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"record"
|
||||||
|
"struct"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"in" @keyword.operator
|
"in" @keyword.operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"arguments"
|
"arguments"
|
||||||
"classdef"
|
|
||||||
"end"
|
"end"
|
||||||
"enumeration"
|
|
||||||
"events"
|
"events"
|
||||||
"global"
|
"global"
|
||||||
"methods"
|
"methods"
|
||||||
|
|
@ -15,6 +13,14 @@
|
||||||
"properties"
|
"properties"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"enumeration" @keyword.type
|
||||||
|
|
||||||
|
(class_definition
|
||||||
|
[
|
||||||
|
"classdef"
|
||||||
|
"end"
|
||||||
|
] @keyword.type)
|
||||||
|
|
||||||
; Conditionals
|
; Conditionals
|
||||||
(if_statement
|
(if_statement
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,6 @@
|
||||||
"const"
|
"const"
|
||||||
"let"
|
"let"
|
||||||
"var"
|
"var"
|
||||||
"type"
|
|
||||||
"concept"
|
"concept"
|
||||||
"asm"
|
"asm"
|
||||||
"bind"
|
"bind"
|
||||||
|
|
@ -416,14 +415,18 @@
|
||||||
"do"
|
"do"
|
||||||
"mixin"
|
"mixin"
|
||||||
"static"
|
"static"
|
||||||
"object"
|
|
||||||
"tuple"
|
"tuple"
|
||||||
"enum"
|
|
||||||
"block"
|
"block"
|
||||||
"using"
|
"using"
|
||||||
"discard"
|
"discard"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"object"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
; @keyword.function ; keywords that define a function (e.g. `func` in Go, `def` in Python)
|
; @keyword.function ; keywords that define a function (e.g. `func` in Go, `def` in Python)
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(class_declaration
|
(class_declaration
|
||||||
"@" @keyword
|
"@" @keyword.type
|
||||||
"class" @keyword) ; I hate Obj-C for allowing "@ class" :)
|
"class" @keyword.type) ; I hate Obj-C for allowing "@ class" :)
|
||||||
|
|
||||||
(method_definition
|
(method_definition
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,6 @@
|
||||||
"as"
|
"as"
|
||||||
"assert"
|
"assert"
|
||||||
"begin"
|
"begin"
|
||||||
"class"
|
|
||||||
"constraint"
|
"constraint"
|
||||||
"end"
|
"end"
|
||||||
"external"
|
"external"
|
||||||
|
|
@ -132,16 +131,20 @@
|
||||||
"method"
|
"method"
|
||||||
"module"
|
"module"
|
||||||
"new"
|
"new"
|
||||||
"object"
|
|
||||||
"of"
|
"of"
|
||||||
"sig"
|
"sig"
|
||||||
"struct"
|
|
||||||
"type"
|
|
||||||
"val"
|
"val"
|
||||||
"when"
|
"when"
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"object"
|
||||||
|
"class"
|
||||||
|
"struct"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"lazy"
|
"lazy"
|
||||||
"mutable"
|
"mutable"
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@
|
||||||
[
|
[
|
||||||
"foreign"
|
"foreign"
|
||||||
"using"
|
"using"
|
||||||
"struct"
|
|
||||||
"enum"
|
|
||||||
"union"
|
|
||||||
"defer"
|
"defer"
|
||||||
"cast"
|
"cast"
|
||||||
"transmute"
|
"transmute"
|
||||||
|
|
@ -24,9 +21,15 @@
|
||||||
"map"
|
"map"
|
||||||
"bit_set"
|
"bit_set"
|
||||||
"matrix"
|
"matrix"
|
||||||
"bit_field"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"struct"
|
||||||
|
"enum"
|
||||||
|
"union"
|
||||||
|
"bit_field"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"proc" @keyword.function
|
"proc" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -13,26 +13,29 @@
|
||||||
] @keyword.function
|
] @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
"class"
|
|
||||||
"clone"
|
"clone"
|
||||||
"declare"
|
"declare"
|
||||||
"default"
|
"default"
|
||||||
"echo"
|
"echo"
|
||||||
"enddeclare"
|
"enddeclare"
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"global"
|
"global"
|
||||||
"goto"
|
"goto"
|
||||||
"implements"
|
"implements"
|
||||||
"insteadof"
|
"insteadof"
|
||||||
"interface"
|
|
||||||
"print"
|
"print"
|
||||||
"namespace"
|
|
||||||
"new"
|
"new"
|
||||||
"trait"
|
|
||||||
"unset"
|
"unset"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"class"
|
||||||
|
"interface"
|
||||||
|
"namespace"
|
||||||
|
"trait"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"abstract"
|
"abstract"
|
||||||
"const"
|
"const"
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,7 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"type"
|
|
||||||
"actor"
|
|
||||||
"class"
|
|
||||||
"primitive"
|
"primitive"
|
||||||
"interface"
|
|
||||||
"trait"
|
|
||||||
"struct"
|
|
||||||
"embed"
|
"embed"
|
||||||
"let"
|
"let"
|
||||||
"var"
|
"var"
|
||||||
|
|
@ -21,6 +15,15 @@
|
||||||
"where"
|
"where"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"struct"
|
||||||
|
"type"
|
||||||
|
"interface"
|
||||||
|
"trait"
|
||||||
|
"actor"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"fun" @keyword.function
|
"fun" @keyword.function
|
||||||
|
|
||||||
"be" @keyword.coroutine
|
"be" @keyword.coroutine
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,16 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"datasource"
|
"datasource"
|
||||||
"enum"
|
|
||||||
"generator"
|
"generator"
|
||||||
"model"
|
"model"
|
||||||
"type"
|
|
||||||
"view"
|
"view"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"type"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
(comment) @comment @spell
|
(comment) @comment @spell
|
||||||
|
|
||||||
(developer_comment) @comment.documentation @spell
|
(developer_comment) @comment.documentation @spell
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
[
|
[
|
||||||
"enum"
|
|
||||||
"extend"
|
"extend"
|
||||||
"extensions"
|
"extensions"
|
||||||
"message"
|
|
||||||
"oneof"
|
"oneof"
|
||||||
"option"
|
"option"
|
||||||
"reserved"
|
"reserved"
|
||||||
"service"
|
|
||||||
"syntax"
|
"syntax"
|
||||||
"to"
|
"to"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"service"
|
||||||
|
"message"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"rpc" @keyword.function
|
"rpc" @keyword.function
|
||||||
|
|
||||||
"returns" @keyword.return
|
"returns" @keyword.return
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,17 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"class"
|
|
||||||
"inherits"
|
"inherits"
|
||||||
"node"
|
"node"
|
||||||
"type"
|
|
||||||
"tag"
|
"tag"
|
||||||
"require"
|
"require"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"type"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"define"
|
"define"
|
||||||
"function"
|
"function"
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,10 @@
|
||||||
(where)
|
(where)
|
||||||
"let"
|
"let"
|
||||||
"in"
|
"in"
|
||||||
"class"
|
|
||||||
"instance"
|
"instance"
|
||||||
"derive"
|
"derive"
|
||||||
"foreign"
|
"foreign"
|
||||||
"data"
|
"data"
|
||||||
"newtype"
|
|
||||||
"type"
|
|
||||||
"as"
|
"as"
|
||||||
"hiding"
|
"hiding"
|
||||||
"do"
|
"do"
|
||||||
|
|
@ -108,6 +105,12 @@
|
||||||
"infixr"
|
"infixr"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"type"
|
||||||
|
"newtype"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
(class_instance
|
(class_instance
|
||||||
"else" @keyword)
|
"else" @keyword)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,6 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"assert"
|
"assert"
|
||||||
"class"
|
|
||||||
"exec"
|
"exec"
|
||||||
"global"
|
"global"
|
||||||
"nonlocal"
|
"nonlocal"
|
||||||
|
|
@ -308,9 +307,13 @@
|
||||||
"print"
|
"print"
|
||||||
"with"
|
"with"
|
||||||
"as"
|
"as"
|
||||||
"type"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"type"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
[
|
[
|
||||||
"as"
|
"as"
|
||||||
"by"
|
"by"
|
||||||
"class"
|
|
||||||
"extends"
|
"extends"
|
||||||
"from"
|
"from"
|
||||||
"implies"
|
"implies"
|
||||||
"in"
|
"in"
|
||||||
"module"
|
"module"
|
||||||
"newtype"
|
|
||||||
"order"
|
"order"
|
||||||
"select"
|
"select"
|
||||||
"where"
|
"where"
|
||||||
|
|
@ -16,6 +14,11 @@
|
||||||
(specialId)
|
(specialId)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"newtype"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"and"
|
"and"
|
||||||
"not"
|
"not"
|
||||||
|
|
|
||||||
|
|
@ -102,13 +102,16 @@
|
||||||
"property"
|
"property"
|
||||||
"signal"
|
"signal"
|
||||||
"declare"
|
"declare"
|
||||||
"enum"
|
|
||||||
"export"
|
"export"
|
||||||
"implements"
|
"implements"
|
||||||
"interface"
|
|
||||||
"namespace"
|
|
||||||
"type"
|
|
||||||
"override"
|
"override"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"interface"
|
||||||
|
"type"
|
||||||
|
"enum"
|
||||||
|
"namespace"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"keyof" @keyword.operator
|
"keyof" @keyword.operator
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,7 @@
|
||||||
[
|
[
|
||||||
"use"
|
"use"
|
||||||
"as"
|
"as"
|
||||||
"class"
|
|
||||||
"module"
|
"module"
|
||||||
"interface"
|
|
||||||
"type"
|
|
||||||
"def"
|
"def"
|
||||||
"attr_reader"
|
"attr_reader"
|
||||||
"attr_writer"
|
"attr_writer"
|
||||||
|
|
@ -28,6 +25,18 @@
|
||||||
"alias"
|
"alias"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"interface"
|
||||||
|
"type"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
|
(class_decl
|
||||||
|
"end" @keyword.type)
|
||||||
|
|
||||||
|
(interface_decl
|
||||||
|
"end" @keyword.type)
|
||||||
|
|
||||||
"def" @keyword.function
|
"def" @keyword.function
|
||||||
|
|
||||||
; Members of declaration
|
; Members of declaration
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
[
|
[
|
||||||
"alias"
|
"alias"
|
||||||
"begin"
|
"begin"
|
||||||
"class"
|
|
||||||
"do"
|
"do"
|
||||||
"end"
|
"end"
|
||||||
"ensure"
|
"ensure"
|
||||||
|
|
@ -17,6 +16,8 @@
|
||||||
"then"
|
"then"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"return"
|
"return"
|
||||||
"yield"
|
"yield"
|
||||||
|
|
|
||||||
|
|
@ -243,18 +243,21 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"default"
|
"default"
|
||||||
"enum"
|
|
||||||
"impl"
|
"impl"
|
||||||
"let"
|
"let"
|
||||||
"move"
|
"move"
|
||||||
"struct"
|
|
||||||
"trait"
|
|
||||||
"type"
|
|
||||||
"union"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
"where"
|
"where"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"trait"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,6 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"case"
|
"case"
|
||||||
"class"
|
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"derives"
|
"derives"
|
||||||
"finally"
|
"finally"
|
||||||
|
|
@ -180,8 +178,6 @@
|
||||||
"object"
|
"object"
|
||||||
"override"
|
"override"
|
||||||
"package"
|
"package"
|
||||||
"trait"
|
|
||||||
"type"
|
|
||||||
"val"
|
"val"
|
||||||
"var"
|
"var"
|
||||||
"with"
|
"with"
|
||||||
|
|
@ -193,6 +189,13 @@
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"class"
|
||||||
|
"trait"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"abstract"
|
"abstract"
|
||||||
"final"
|
"final"
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
] @keyword)
|
] @keyword)
|
||||||
|
|
||||||
(enum_definition
|
(enum_definition
|
||||||
"enum" @keyword)
|
"enum" @keyword.type)
|
||||||
|
|
||||||
(for_loop
|
(for_loop
|
||||||
[
|
[
|
||||||
|
|
@ -250,7 +250,7 @@
|
||||||
] @keyword)
|
] @keyword)
|
||||||
|
|
||||||
(struct_definition
|
(struct_definition
|
||||||
"struct" @keyword)
|
"struct" @keyword.type)
|
||||||
|
|
||||||
(transitions_definition
|
(transitions_definition
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,13 @@
|
||||||
"list"
|
"list"
|
||||||
"map"
|
"map"
|
||||||
"set"
|
"set"
|
||||||
] @type.builtin
|
"structure"
|
||||||
|
"union"
|
||||||
|
"namespace"
|
||||||
|
"service"
|
||||||
|
"operation"
|
||||||
|
"resource"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
; Fields (Members)
|
; Fields (Members)
|
||||||
; (field) @variable.member
|
; (field) @variable.member
|
||||||
|
|
@ -57,12 +63,6 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"namespace"
|
|
||||||
"service"
|
|
||||||
"structure"
|
|
||||||
"operation"
|
|
||||||
"union"
|
|
||||||
"resource"
|
|
||||||
"metadata"
|
"metadata"
|
||||||
"apply"
|
"apply"
|
||||||
"for"
|
"for"
|
||||||
|
|
|
||||||
|
|
@ -141,12 +141,8 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"contract"
|
|
||||||
"interface"
|
|
||||||
"library"
|
"library"
|
||||||
"is"
|
"is"
|
||||||
"struct"
|
|
||||||
"enum"
|
|
||||||
"event"
|
"event"
|
||||||
"assembly"
|
"assembly"
|
||||||
"emit"
|
"emit"
|
||||||
|
|
@ -161,6 +157,13 @@
|
||||||
(virtual)
|
(virtual)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"contract"
|
||||||
|
"interface"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
; FIXME: update grammar
|
; FIXME: update grammar
|
||||||
; (block_statement "unchecked" @keyword)
|
; (block_statement "unchecked" @keyword)
|
||||||
(event_parameter
|
(event_parameter
|
||||||
|
|
|
||||||
|
|
@ -276,8 +276,6 @@
|
||||||
"__nullable__"
|
"__nullable__"
|
||||||
"defined"
|
"defined"
|
||||||
"delete"
|
"delete"
|
||||||
"enum"
|
|
||||||
"funcenum"
|
|
||||||
"functag"
|
"functag"
|
||||||
"get"
|
"get"
|
||||||
"methodmap"
|
"methodmap"
|
||||||
|
|
@ -285,12 +283,17 @@
|
||||||
"property"
|
"property"
|
||||||
"public"
|
"public"
|
||||||
"set"
|
"set"
|
||||||
"struct"
|
|
||||||
"typedef"
|
|
||||||
"typeset"
|
"typeset"
|
||||||
"void"
|
"void"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"funcenum"
|
||||||
|
"struct"
|
||||||
|
"typedef"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"const"
|
"const"
|
||||||
"native"
|
"native"
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,18 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"class"
|
|
||||||
"clone"
|
"clone"
|
||||||
"delete"
|
"delete"
|
||||||
"enum"
|
|
||||||
"extends"
|
"extends"
|
||||||
"rawcall"
|
"rawcall"
|
||||||
"resume"
|
"resume"
|
||||||
"var"
|
"var"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"function" @keyword.function
|
"function" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,6 @@
|
||||||
bound_identifier: (simple_identifier)) @variable
|
bound_identifier: (simple_identifier)) @variable
|
||||||
|
|
||||||
[
|
[
|
||||||
"typealias"
|
|
||||||
"struct"
|
|
||||||
"class"
|
|
||||||
"actor"
|
|
||||||
"enum"
|
|
||||||
"protocol"
|
"protocol"
|
||||||
"extension"
|
"extension"
|
||||||
"indirect"
|
"indirect"
|
||||||
|
|
@ -87,6 +82,13 @@
|
||||||
"willSet"
|
"willSet"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"class"
|
||||||
|
"typealias"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
"enum"
|
"enum"
|
||||||
"struct"
|
"struct"
|
||||||
"union"
|
"union"
|
||||||
] @keyword
|
] @keyword.type
|
||||||
|
|
||||||
"sizeof" @keyword.operator
|
"sizeof" @keyword.operator
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"assert"
|
"assert"
|
||||||
"class"
|
|
||||||
"multiclass"
|
|
||||||
"field"
|
"field"
|
||||||
"let"
|
"let"
|
||||||
"def"
|
"def"
|
||||||
|
|
@ -17,6 +15,11 @@
|
||||||
"defvar"
|
"defvar"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"multiclass"
|
||||||
|
"class"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
"in" @keyword.operator
|
"in" @keyword.operator
|
||||||
|
|
||||||
; Conditionals
|
; Conditionals
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,13 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"error"
|
"error"
|
||||||
"namespace"
|
|
||||||
"on"
|
"on"
|
||||||
"set"
|
"set"
|
||||||
"try"
|
"try"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"namespace" @keyword.type
|
||||||
|
|
||||||
(unpack) @operator
|
(unpack) @operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -153,24 +153,24 @@
|
||||||
; Types
|
; Types
|
||||||
(record_declaration
|
(record_declaration
|
||||||
.
|
.
|
||||||
"record" @keyword
|
"record" @keyword.type
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
|
|
||||||
(anon_record
|
(anon_record
|
||||||
.
|
.
|
||||||
"record" @keyword)
|
"record" @keyword.type)
|
||||||
|
|
||||||
(record_body
|
(record_body
|
||||||
(record_declaration
|
(record_declaration
|
||||||
.
|
.
|
||||||
"record" @keyword
|
"record" @keyword.type
|
||||||
.
|
.
|
||||||
name: (identifier) @type))
|
name: (identifier) @type))
|
||||||
|
|
||||||
(record_body
|
(record_body
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
.
|
.
|
||||||
"enum" @keyword
|
"enum" @keyword.type
|
||||||
.
|
.
|
||||||
name: (identifier) @type))
|
name: (identifier) @type))
|
||||||
|
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
(userdata) @keyword)
|
(userdata) @keyword)
|
||||||
|
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
"enum" @keyword
|
"enum" @keyword.type
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
|
|
||||||
(type_declaration
|
(type_declaration
|
||||||
|
|
|
||||||
|
|
@ -120,19 +120,22 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"enum"
|
|
||||||
"exception"
|
"exception"
|
||||||
"extends"
|
"extends"
|
||||||
"interaction"
|
|
||||||
"namespace"
|
|
||||||
"senum"
|
|
||||||
"service"
|
|
||||||
"struct"
|
|
||||||
"typedef"
|
"typedef"
|
||||||
"union"
|
|
||||||
"uri"
|
"uri"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"senum"
|
||||||
|
"interaction"
|
||||||
|
"namespace"
|
||||||
|
"service"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
; Deprecated Keywords
|
; Deprecated Keywords
|
||||||
[
|
[
|
||||||
"cocoa_prefix"
|
"cocoa_prefix"
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
"then"
|
"then"
|
||||||
"type"
|
"type"
|
||||||
"var"
|
"var"
|
||||||
"class"
|
|
||||||
"extends"
|
"extends"
|
||||||
"_cast"
|
"_cast"
|
||||||
"_chunks"
|
"_chunks"
|
||||||
|
|
@ -51,6 +50,8 @@
|
||||||
"_namety"
|
"_namety"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
; }}}
|
; }}}
|
||||||
; Operators {{{
|
; Operators {{{
|
||||||
(operator) @operator
|
(operator) @operator
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,9 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"declare"
|
"declare"
|
||||||
"enum"
|
|
||||||
"export"
|
"export"
|
||||||
"implements"
|
"implements"
|
||||||
"interface"
|
|
||||||
"type"
|
"type"
|
||||||
"namespace"
|
|
||||||
"override"
|
"override"
|
||||||
"module"
|
"module"
|
||||||
"asserts"
|
"asserts"
|
||||||
|
|
@ -21,6 +18,12 @@
|
||||||
"using"
|
"using"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"namespace"
|
||||||
|
"interface"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"keyof"
|
"keyof"
|
||||||
"satisfies"
|
"satisfies"
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,12 @@
|
||||||
(identifier) @module)
|
(identifier) @module)
|
||||||
|
|
||||||
[
|
[
|
||||||
"class"
|
|
||||||
"def"
|
"def"
|
||||||
"over"
|
"over"
|
||||||
] @keyword.function
|
] @keyword.function
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
")"
|
")"
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,19 @@
|
||||||
"assert"
|
"assert"
|
||||||
"const"
|
"const"
|
||||||
"defer"
|
"defer"
|
||||||
"enum"
|
|
||||||
"goto"
|
"goto"
|
||||||
"interface"
|
|
||||||
"struct"
|
|
||||||
"sql"
|
"sql"
|
||||||
"type"
|
|
||||||
"union"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"union"
|
||||||
|
"struct"
|
||||||
|
"interface"
|
||||||
|
"type"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"as"
|
"as"
|
||||||
"in"
|
"in"
|
||||||
|
|
|
||||||
|
|
@ -174,17 +174,12 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"abstract"
|
"abstract"
|
||||||
"class"
|
|
||||||
"construct"
|
"construct"
|
||||||
"continue"
|
"continue"
|
||||||
"default"
|
"default"
|
||||||
"delegate"
|
|
||||||
"enum"
|
|
||||||
"errordomain"
|
"errordomain"
|
||||||
"get"
|
"get"
|
||||||
"inline"
|
"inline"
|
||||||
"interface"
|
|
||||||
"namespace"
|
|
||||||
"new"
|
"new"
|
||||||
"out"
|
"out"
|
||||||
"override"
|
"override"
|
||||||
|
|
@ -192,11 +187,20 @@
|
||||||
"ref"
|
"ref"
|
||||||
"set"
|
"set"
|
||||||
"signal"
|
"signal"
|
||||||
"struct"
|
|
||||||
"virtual"
|
"virtual"
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"enum"
|
||||||
|
"class"
|
||||||
|
"struct"
|
||||||
|
"interface"
|
||||||
|
"namespace"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
|
"delegate" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"yield"
|
"yield"
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,6 @@
|
||||||
"endmodule"
|
"endmodule"
|
||||||
"program"
|
"program"
|
||||||
"endprogram"
|
"endprogram"
|
||||||
"class"
|
|
||||||
"endclass"
|
|
||||||
"interface"
|
|
||||||
"endinterface"
|
|
||||||
"package"
|
"package"
|
||||||
"endpackage"
|
"endpackage"
|
||||||
"checker"
|
"checker"
|
||||||
|
|
@ -40,6 +36,16 @@
|
||||||
(unique_priority)
|
(unique_priority)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"class"
|
||||||
|
"endclass"
|
||||||
|
"interface"
|
||||||
|
"endinterface"
|
||||||
|
"enum"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"function"
|
"function"
|
||||||
"endfunction"
|
"endfunction"
|
||||||
|
|
@ -265,10 +271,6 @@
|
||||||
(data_type
|
(data_type
|
||||||
"packed" @keyword.modifier))
|
"packed" @keyword.modifier))
|
||||||
|
|
||||||
(struct_union) @type
|
|
||||||
|
|
||||||
"enum" @type
|
|
||||||
|
|
||||||
(enum_name_declaration
|
(enum_name_declaration
|
||||||
(enum_identifier
|
(enum_identifier
|
||||||
(simple_identifier) @constant))
|
(simple_identifier) @constant))
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
(type_declaration) @function.call)
|
(type_declaration) @function.call)
|
||||||
|
|
||||||
[
|
[
|
||||||
"struct"
|
|
||||||
"bitcast"
|
"bitcast"
|
||||||
"discard"
|
"discard"
|
||||||
"enable"
|
"enable"
|
||||||
|
|
@ -39,6 +38,8 @@
|
||||||
(texel_format)
|
(texel_format)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"struct" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"private"
|
"private"
|
||||||
"storage"
|
"storage"
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,13 @@
|
||||||
[
|
[
|
||||||
"as"
|
"as"
|
||||||
"bring"
|
"bring"
|
||||||
"class"
|
|
||||||
"let"
|
"let"
|
||||||
"new"
|
"new"
|
||||||
(inflight_specifier)
|
(inflight_specifier)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"for"
|
"for"
|
||||||
"in"
|
"in"
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,16 @@ field_constant: (IDENTIFIER) @constant
|
||||||
"defer"
|
"defer"
|
||||||
"errdefer"
|
"errdefer"
|
||||||
"test"
|
"test"
|
||||||
"struct"
|
|
||||||
"union"
|
|
||||||
"enum"
|
|
||||||
"opaque"
|
"opaque"
|
||||||
"error"
|
"error"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"enum"
|
||||||
|
] @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"async"
|
"async"
|
||||||
"await"
|
"await"
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ using Cxx = import "c++.capnp";
|
||||||
$Cxx.namespace("capnproto_test::capnp::test");
|
$Cxx.namespace("capnproto_test::capnp::test");
|
||||||
|
|
||||||
enum TestEnum {
|
enum TestEnum {
|
||||||
# <- @keyword
|
# <- @keyword.type
|
||||||
# ^^^^^^^^ @type
|
# ^^^^^^^^ @type
|
||||||
foo @0;
|
foo @0;
|
||||||
# ^^^ @constant
|
# ^^^ @constant
|
||||||
|
|
@ -51,7 +51,7 @@ enum TestEnum {
|
||||||
# <- @punctuation.bracket
|
# <- @punctuation.bracket
|
||||||
|
|
||||||
struct TestAllTypes {
|
struct TestAllTypes {
|
||||||
# <- @keyword
|
# <- @keyword.type
|
||||||
voidField @0 : Void;
|
voidField @0 : Void;
|
||||||
# ^^^^^^^^^ @variable.member
|
# ^^^^^^^^^ @variable.member
|
||||||
# ^ @punctuation.special
|
# ^ @punctuation.special
|
||||||
|
|
@ -97,7 +97,7 @@ struct TestInterleavedGroups {
|
||||||
foo @0 :UInt32;
|
foo @0 :UInt32;
|
||||||
bar @2 :UInt64;
|
bar @2 :UInt64;
|
||||||
union {
|
union {
|
||||||
# ^^^^^ @keyword
|
# ^^^^^ @keyword.type
|
||||||
qux @4 :UInt16;
|
qux @4 :UInt16;
|
||||||
corge :group {
|
corge :group {
|
||||||
# ^^^^^ @type
|
# ^^^^^ @type
|
||||||
|
|
@ -114,7 +114,7 @@ struct TestInterleavedGroups {
|
||||||
}
|
}
|
||||||
|
|
||||||
group2 :group {
|
group2 :group {
|
||||||
# ^^^^^ @keyword
|
# ^^^^^ @keyword.type
|
||||||
foo @1 :UInt32;
|
foo @1 :UInt32;
|
||||||
bar @3 :UInt64;
|
bar @3 :UInt64;
|
||||||
union {
|
union {
|
||||||
|
|
@ -214,7 +214,7 @@ struct TestGenerics(Foo, Bar) {
|
||||||
qux @3 :Qux;
|
qux @3 :Qux;
|
||||||
|
|
||||||
interface DeepNestInterface(Quux) {
|
interface DeepNestInterface(Quux) {
|
||||||
# ^^^^^^^^^ @keyword
|
# ^^^^^^^^^ @keyword.type
|
||||||
# At one time this failed to compile.
|
# At one time this failed to compile.
|
||||||
call @0 () -> ();
|
call @0 () -> ();
|
||||||
# ^^^^ @function.method
|
# ^^^^ @function.method
|
||||||
|
|
@ -230,7 +230,7 @@ struct TestGenerics(Foo, Bar) {
|
||||||
}
|
}
|
||||||
|
|
||||||
annotation ann(struct) :Foo;
|
annotation ann(struct) :Foo;
|
||||||
# ^^^^^^^^^^ @keyword
|
# ^^^^^^^^^^ @keyword.type
|
||||||
# ^^^ @function.method
|
# ^^^ @function.method
|
||||||
# ^^^^^^ @variable.parameter.builtin
|
# ^^^^^^ @variable.parameter.builtin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
concept Derived = std::is_base_of<U, T>::value;
|
concept Derived = std::is_base_of<U, T>::value;
|
||||||
// ^ @keyword
|
// ^ @keyword.type
|
||||||
// ^ @type.definition
|
// ^ @type.definition
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ include: SomeFile.fusion
|
||||||
// ^ @string.special.url
|
// ^ @string.special.url
|
||||||
|
|
||||||
namespace: ns = Neos.Fusion.Space
|
namespace: ns = Neos.Fusion.Space
|
||||||
//<- @keyword
|
//<- @keyword.type
|
||||||
// ^ @module
|
// ^ @module
|
||||||
// ^ @operator
|
// ^ @operator
|
||||||
// ^ @module
|
// ^ @module
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ use function Space\Func\F as E;
|
||||||
// ^ @function
|
// ^ @function
|
||||||
// ^ @function
|
// ^ @function
|
||||||
use type Space\Type\T;
|
use type Space\Type\T;
|
||||||
// ^ @keyword
|
// ^ @keyword.type
|
||||||
use namespace Space\Name\N as M;
|
use namespace Space\Name\N as M;
|
||||||
// ^ @keyword
|
// ^ @keyword.type
|
||||||
// ^ @module
|
// ^ @module
|
||||||
|
|
||||||
use namespace Space\Name2\N2, Space\Nothing\N3 as N8, type Space\Type2\N4,;
|
use namespace Space\Name2\N2, Space\Nothing\N3 as N8, type Space\Type2\N4,;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ model Reaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ReactionType {
|
enum ReactionType {
|
||||||
// ^ keyword
|
// ^ keyword.type
|
||||||
LIKE
|
LIKE
|
||||||
HAHA
|
HAHA
|
||||||
SAD
|
SAD
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import * as something from "anotherFile";
|
||||||
/// @title Voting with delegation.
|
/// @title Voting with delegation.
|
||||||
// <- @comment
|
// <- @comment
|
||||||
contract Ballot {
|
contract Ballot {
|
||||||
// ^keyword
|
// ^keyword.type
|
||||||
// ^ @type
|
// ^ @type
|
||||||
// This declares a new complex type which will
|
// This declares a new complex type which will
|
||||||
// be used for variables later.
|
// be used for variables later.
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,17 @@ Var.Assign padd = (CAddition const * volatile)&d
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
Var.Assign e1 = (enum e2)&e
|
Var.Assign e1 = (enum e2)&e
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
; ^ @keyword
|
; ^ @keyword.type
|
||||||
; ^ @type
|
; ^ @type
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
Var.Assign *vector = (struct Vector3d*)&acceleration
|
Var.Assign *vector = (struct Vector3d*)&acceleration
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
; ^ @keyword
|
; ^ @keyword.type
|
||||||
; ^ @type
|
; ^ @type
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
Var.Assign z = (union foo)x
|
Var.Assign z = (union foo)x
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
; ^ @keyword
|
; ^ @keyword.type
|
||||||
; ^ @type
|
; ^ @type
|
||||||
; ^ @variable
|
; ^ @variable
|
||||||
Var.Assign b = -a
|
Var.Assign b = -a
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
let
|
let
|
||||||
class A extends Object {}
|
class A extends Object {}
|
||||||
/* <- @keyword */
|
/* <- @keyword.type */
|
||||||
/* ^ @keyword */
|
/* ^ @keyword */
|
||||||
/* ^ @type.builtin */
|
/* ^ @type.builtin */
|
||||||
|
|
||||||
type B = class extends A {
|
type B = class extends A {
|
||||||
/* ^ @keyword */
|
/* ^ @keyword.type */
|
||||||
/* ^ @keyword */
|
/* ^ @keyword */
|
||||||
/* ^ @type */
|
/* ^ @type */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ bring cloud;
|
||||||
// <- @keyword
|
// <- @keyword
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
// <- @keyword
|
// <- @keyword.type
|
||||||
// ^ @type
|
// ^ @type
|
||||||
// ^ @punctuation.bracket
|
// ^ @punctuation.bracket
|
||||||
name: str;
|
name: str;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue