@@ -309,13 +309,13 @@ contexts:
309309 - match : (?i)\b(MIGRATIONWARNING|NEWPARAMETER|SETMIGRATIONGUID|DELETED_PAR_VALUE|STORED_PAR_VALUE)\b
310310 scope : keyword.gdl.nongeo.migration
311311
312- - match : (?i)\b(PRINT|INPUT| OUTPUT|CLOSE|CALL|FILE_DEPENDENCE)\b
312+ - match : (?i)\b(PRINT|OUTPUT|CLOSE|CALL|FILE_DEPENDENCE)\b
313313 scope : keyword.gdl.extern
314314
315315 - match : (?i)\b((INIT|CLOSE)ADDONSCOPE|(CALL|PREPARE)FUNCTION)\b
316316 scope : keyword.gdl.addon
317317
318- - match : (?i)((OPEN)\s?(?=\())
318+ - match : (?i)((OPEN|INPUT )\s?(?=\())
319319 captures :
320320 2 : keyword.gdl.extern
321321 push :
@@ -332,6 +332,7 @@ contexts:
332332 - include : operators
333333 - include : expression-common
334334 - include : string
335+ - include : arrays
335336
336337# ############## opt Params #################
337338 optional :
@@ -499,6 +500,7 @@ contexts:
499500 - include : string
500501 - include : functions
501502 - include : functions-special
503+ - include : arrays
502504
503505 buffer-in :
504506 # now buffer com without ()
@@ -525,6 +527,7 @@ contexts:
525527 - include : expression-common
526528 - include : string
527529 - include : optional
530+ - include : arrays
528531
529532 functions-special :
530533 - match : (?i)(?<=^|\s)(DIM|PI)(\b)
@@ -538,13 +541,28 @@ contexts:
538541 - match : \[
539542 scope : punctuation.section.array.begin.gdl
540543 set :
544+ - meta_scope : section.array.gdl
541545 - match : \]
542546 scope : punctuation.section.array.end.gdl
543- pop : true
544- - match : ' ,'
545- scope : punctuation.separator.array.gdl
547+ set : after-array
546548 - include : functions
547549 - include : functions-special
548550 - include : operators
549551 - include : expression-common
550- - include : string
552+ - include : string
553+
554+ after-array :
555+ - match : \[
556+ scope : punctuation.section.array.begin.gdl
557+ set : # we want only one possible bracket
558+ - meta_scope : section.array.gdl
559+ - match : \]
560+ scope : punctuation.section.array.end.gdl
561+ pop : true
562+ - include : functions
563+ - include : functions-special
564+ - include : operators
565+ - include : expression-common
566+ - include : string
567+ - match : ' ' # if no second bracket pop out
568+ pop : true
0 commit comments