@@ -11,6 +11,9 @@ variables:
11
11
number : ((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?
12
12
primitives : (int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|bool|float|double|bool|auto|void|array|dictionary|ref)
13
13
14
+ class_modifiers : ' (abstract)'
15
+ definition_modifiers : ' (protected|private)'
16
+
14
17
language_variables : ' (this)'
15
18
language_support_functions : ' (GetVar(Int|Float|Bool|String|Ivec2|Vec[234])|GetParam(Int|Long|Float|Bool|I?Vec[234]|String|Array|Dictionary)|HashString|SetVar|AddVar|print|xy|xyz|xyzw|atan|sin|asin|cos|acos|sqrt|pow|pow2|round|roundl|floor|ceil|log|normalize|dot|length|lengthsq|max|min|clamp|randf|randi|randdir|randfn|addrot|rottowards|capangle|angdiff|dist|distsq|formatTime|ease|formatThousands|formatInt|formatFloat|lerp|ilerp|sign|tocolor|i?vec[234]|UnitPtr)'
16
19
@@ -54,10 +57,12 @@ contexts:
54
57
pop : true
55
58
56
59
class :
57
- - match : ' class'
60
+ - meta_scope : meta.class
61
+ - match : ' \b{{class_modifiers}}\b'
62
+ scope : storage.modifier
63
+ - match : ' \bclass\b'
58
64
scope : storage.type.class
59
65
set :
60
- - meta_scope : meta.class
61
66
- include : global
62
67
- match : ' {{identifier}}'
63
68
scope : entity.name.class
@@ -441,17 +446,35 @@ contexts:
441
446
442
447
definition :
443
448
- include : global
444
- - match : ' (?={{identifier}}\s*[=;])'
445
- set : variable-definition
446
449
- match : ' (?={{identifier}}\s*\()'
447
450
set : function-definition
451
+ - match : ' (?={{identifier}}\s*)'
452
+ set : variable-definition
448
453
449
454
definition-in-code :
450
455
- include : global
451
456
- match : ' (?={{identifier}}\s*[=;\(])'
452
457
set : variable-definition
453
458
454
459
variable-definition-value :
460
+ - match : ' {'
461
+ scope : punctuation.section.brackets.begin
462
+ set :
463
+ - include : global
464
+ - match : ' \b{{definition_modifiers}}\b'
465
+ scope : storage.modifier
466
+ - match : ' \b(get|set)\b'
467
+ scope : keyword.other
468
+ push :
469
+ - include : global
470
+ - match : ' {'
471
+ scope : punctuation.section.block.begin
472
+ set :
473
+ - meta_scope : meta.function
474
+ - include : code-scope
475
+ - match : ' }'
476
+ scope : punctuation.section.brackets.end
477
+ pop : true
455
478
- match : ' ='
456
479
scope : keyword.operator.assignment
457
480
set : expression
@@ -591,7 +614,7 @@ contexts:
591
614
592
615
has-classes :
593
616
- include : has-metadatas
594
- - match : ' \b(?=class)\b'
617
+ - match : ' \b(?=({{class_modifiers}}\s+)? class)\b'
595
618
push : class
596
619
597
620
has-enums :
@@ -606,7 +629,7 @@ contexts:
606
629
607
630
has-definitions :
608
631
- include : has-metadatas
609
- - match : ' \b(protected|private) \b'
632
+ - match : ' \b{{definition_modifiers}} \b'
610
633
scope : storage.modifier
611
634
- match : ' (?=\b{{possible_typename}})'
612
635
push :
0 commit comments