@@ -30,6 +30,7 @@ contexts:
3030 - include : functions-special
3131 - include : gdl-globals
3232 - include : optional
33+ - include : expression-common # needs to be last bc of brackets
3334
3435# Included in all contexts by default:
3536# except where - meta_include_prototype: false
@@ -55,7 +56,6 @@ contexts:
5556 - include : line-continuation
5657 - include : statements
5758 - include : controls
58- - include : expression-common
5959
6060# ############## Subroutines #################
6161 subs :
@@ -149,7 +149,7 @@ contexts:
149149 scope : variable.function.gdl
150150 pop : true
151151
152- - match : (?i)(?<=^|\s)(FOR|TO|STEP| NEXT|DO|(END)?WHILE|REPEAT|UNTIL)\b
152+ - match : (?i)(?<=^|\s)(FOR|TO|NEXT|DO|(END)?WHILE|REPEAT|UNTIL)\b
153153 scope : keyword.control.flow.gdl
154154
155155 - match : (?i)(?<=^|\s)((END)?IF|THEN|ELSE)\b
@@ -192,12 +192,12 @@ contexts:
192192 - match : ' ,'
193193 scope : punctuation.separator.gdl
194194 - include : main
195- # - match: \)
196- # scope: invalid.illegal.stray.brace.round.gdl
197- # - match: \]
198- # scope: invalid.illegal.stray.brace.square.gdl
199- # - match: \}
200- # scope: invalid.illegal.stray.brace.curly.gdl
195+ - match : \)
196+ scope : invalid.illegal.stray.brace.round.gdl
197+ - match : \]
198+ scope : invalid.illegal.stray.brace.square.gdl
199+ - match : \}
200+ scope : invalid.illegal.stray.brace.curly.gdl
201201
202202# ############### Hotspots ##################
203203 hots :
@@ -277,7 +277,7 @@ contexts:
277277
278278 attribute :
279279 - match : |-
280- (?ix)\b(PEN|RESOL|RADIUS|TOLER|MODEL|SHADOW|DRAWINDEX|LINE_(TYPE|PROPERTY)|
280+ (?ix)\b(LET| PEN|RESOL|RADIUS|TOLER|MODEL|SHADOW|DRAWINDEX|LINE_(TYPE|PROPERTY)|
281281 |SYMBOL_(LINE|FILL)|FILL[A]?|(SOLID|EMPTY|TRANSLUCENT|IMAGE|(LINEAR|RADIAL)_GRADIENT)_FILL|
282282 |FILLTYPES_MASK|(BUILDING_)?MATERIAL|TEXTURE|STYLE(\{2\})?|(END)?PARAGRAPH|
283283 |TEXTBLOCK_?|ADDITIONAL_DATA|SECT_(FILL|ATTRS(\{2\})?))
@@ -292,13 +292,32 @@ contexts:
292292 - match : (?i)\b(ON|OFF|AUTO)\b
293293 scope : support.other.variable.gdl.shadow
294294
295+ range :
296+ - match : (?i)\b(RANGE)(?=\s)
297+ scope : keyword.gdl.nongeo.parameters.range
298+
295299 nongeo :
300+ - match : (?i)\b(VALUES(\{2\})?|STEP|(RETURNED_)?PARAMETERS|LOCK|HIDEPARAMETER|PARVALUE_DESCRIPTION)(?=$|\s)
301+ scope : keyword.gdl.nongeo.parameters
302+
303+ - include : range
304+ - match : (?i)(?<=RANGE)\s(\(|\[)
305+ scope : punctuation.section.range.left-delimiter.gdl
306+ push :
307+ - meta_scope : meta.section-range.gdl
308+ - match : (\)|\])
309+ scope : punctuation.section.range.right-delimiter.gdl
310+ pop : true
311+ - match : ' ,'
312+ scope : punctuation.separator.arguments.gdl
313+ - include : main
314+
315+ - match : (?i)\b(CUSTOM)\b
316+ scope : support.other.variable.gdl.parameters.custom
317+
296318 - match : (?i)\b(UI_(NEXT|PREV))\b
297319 scope : support.other.variable.gdl.ui
298320
299- - match : (?i)\b(VALUES(\{2\})?|(RETURNED_)?PARAMETERS|LOCK|HIDEPARAMETER|PARVALUE_DESCRIPTION)(?=$|\s)
300- scope : keyword.gdl.nongeo.parameters
301-
302321 - match : (?i)\b((REF\s+)?(COMPONENT|DESCRIPTOR)|BINARYPROP|DATABASE_SET|POSITION|REF_(COMPONENT|DESCRIPTOR)|(SURFACE|VOLUME)3D|DRAWING[2]?)\b
303322 scope : keyword.gdl.nongeo.properties
304323
@@ -507,13 +526,7 @@ contexts:
507526 - match : \)
508527 scope : punctuation.section.buffer.end.gdl
509528 pop : true
510- - include : buffer
511- - include : operators
512- - include : expression-common
513- - include : string
514- - include : functions
515- - include : functions-special
516- - include : arrays
529+ - include : main
517530
518531 buffer-in :
519532 # now buffer com without ()
@@ -534,13 +547,7 @@ contexts:
534547 pop : true
535548 - match : ' ,'
536549 scope : punctuation.separator.arguments.gdl
537- - include : functions
538- - include : functions-special
539- - include : operators
540- - include : expression-common
541- - include : string
542- - include : optional
543- - include : arrays
550+ - include : main
544551
545552 functions-special :
546553 - match : (?i)(?<=^|\s)(DIM|PI)(\b)
0 commit comments