abl-tmlanguage 1.3.20 → 1.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ 1.3.22
2
+ ======
3
+
4
+ - ✨ Annotations with dotted names
5
+ - ✨ Include file names (UNC path, FQDN, multiple dots, ...)
6
+
7
+ 1.3.21
8
+ ======
9
+ - ✨ Safe navigation operator
10
+
1
11
  1.3.20
2
12
  ======
3
13
 
package/README.md CHANGED
@@ -87,7 +87,7 @@ The ABL-specific scopes produced by the ABL grammar listed in the table below. T
87
87
  |entity.other.attribute-name.abl | Annotation attribute names |
88
88
  |keyword.control.directive.conditional.abl | `&if` , `&else`, `&elsif` `&end` |
89
89
  |keyword.control.directive.define.abl | `&scoped-define`, `&global-define`, `&undefine` |
90
- |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*`, `+=`, `-=`, `/=`, `*=` |
90
+ |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*`, `+=`, `-=`, `/=`, `*=`, `?:` |
91
91
  |keyword.other.abl | Any ABL keyword (incl those covered by other scopes like `support.function.abl` and `entity.name.function.abl`) |
92
92
  |punctuation.definition.bracket.square.begin.abl | `[` used for array arguments |
93
93
  |punctuation.definition.bracket.square.end.abl | `]` used for array arguments |
@@ -1439,7 +1439,7 @@
1439
1439
  },
1440
1440
  "type-argument-function": {
1441
1441
  "name": "meta.function-call.abl",
1442
- "begin": "(?i)\\s*(cast|type-of)\\s*(?=\\()",
1442
+ "begin": "\\s*([Cc][Aa][Ss][Tt]|[Tt][Yy][Pp][Ee]-[Oo][Ff])\\s*(?=\\()",
1443
1443
  "beginCaptures": {
1444
1444
  "1": {
1445
1445
  "name": "support.function.abl"
@@ -1800,16 +1800,16 @@
1800
1800
  "annotation": {
1801
1801
  "patterns": [
1802
1802
  {
1803
- "include": "#annotation-simple"
1803
+ "include": "#annotation-attributes"
1804
1804
  },
1805
1805
  {
1806
- "include": "#annotation-attributes"
1806
+ "include": "#annotation-simple"
1807
1807
  }
1808
1808
  ]
1809
1809
  },
1810
1810
  "annotation-simple": {
1811
1811
  "name": "meta.declaration.annotation.abl",
1812
- "match": "(^|\\s*)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*(?=\\.)",
1812
+ "match": "(^|\\s*)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]+)\\s*(?=\\.)",
1813
1813
  "captures": {
1814
1814
  "2": {
1815
1815
  "name": "entity.name.tag.abl"
@@ -1818,7 +1818,7 @@
1818
1818
  },
1819
1819
  "annotation-attributes": {
1820
1820
  "name": "meta.declaration.annotation.abl",
1821
- "begin": "(^|\\s+)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*(?=\\()",
1821
+ "begin": "(^|\\s+)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]*)\\s*(?=\\()",
1822
1822
  "beginCaptures": {
1823
1823
  "2": {
1824
1824
  "name": "entity.name.tag.abl"
@@ -3002,15 +3002,18 @@
3002
3002
  ]
3003
3003
  },
3004
3004
  "event-un-subscribe": {
3005
- "begin": "(?i)(:)(unsubscribe|subscribe)\\s*(\\()",
3005
+ "begin": "(?i)((\\?:)|(:))(unsubscribe|subscribe)\\s*(\\()",
3006
3006
  "beginCaptures": {
3007
- "1": {
3007
+ "2": {
3008
+ "name": "keyword.operator.source.abl"
3009
+ },
3010
+ "3": {
3008
3011
  "name": "punctuation.separator.colon.abl"
3009
3012
  },
3010
- "2": {
3013
+ "4": {
3011
3014
  "name": "entity.name.function.abl"
3012
3015
  },
3013
- "3": {
3016
+ "5": {
3014
3017
  "name": "meta.brace.round.js"
3015
3018
  }
3016
3019
  },
@@ -3631,6 +3634,15 @@
3631
3634
  {
3632
3635
  "include": "#function-arguments"
3633
3636
  },
3637
+ {
3638
+ "include": "#comment"
3639
+ },
3640
+ {
3641
+ "include": "#operator"
3642
+ },
3643
+ {
3644
+ "include": "#array-literal"
3645
+ },
3634
3646
  {
3635
3647
  "include": "#constant"
3636
3648
  },
@@ -3670,15 +3682,6 @@
3670
3682
  {
3671
3683
  "include": "#expression"
3672
3684
  },
3673
- {
3674
- "include": "#comment"
3675
- },
3676
- {
3677
- "include": "#operator"
3678
- },
3679
- {
3680
- "include": "#array-literal"
3681
- },
3682
3685
  {
3683
3686
  "include": "#punctuation-comma"
3684
3687
  },
@@ -3689,7 +3692,7 @@
3689
3692
  },
3690
3693
  "static-object-property-call": {
3691
3694
  "comment": "This rule only captures dotted type name and not single class names. Type names are files, so support unicode.",
3692
- "match": "(?i)\\s*(([\\w#$%\\-]+|progress)(\\.[\\w#$%\\-]+)+)\\s*(:)([\\w\\-]+)\\s*",
3695
+ "match": "(?i)\\s*(([\\w#$%\\-]+|progress)(\\.[\\w#$%\\-]+)+)\\s*((\\?:)|(:))([\\w\\-]+)\\s*",
3693
3696
  "captures": {
3694
3697
  "1": {
3695
3698
  "name": "entity.name.type.abl"
@@ -3697,7 +3700,7 @@
3697
3700
  "4": {
3698
3701
  "name": "punctuation.separator.colon.abl"
3699
3702
  },
3700
- "5": {
3703
+ "7": {
3701
3704
  "name": "entity.name.function.abl"
3702
3705
  }
3703
3706
  }
@@ -3711,12 +3714,15 @@
3711
3714
  }
3712
3715
  },
3713
3716
  "property-call": {
3714
- "match": "(:)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b",
3717
+ "match": "((\\?:)|(:))([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b",
3715
3718
  "captures": {
3716
- "1": {
3719
+ "2": {
3720
+ "name": "keyword.operator.source.abl"
3721
+ },
3722
+ "3": {
3717
3723
  "name": "punctuation.separator.colon.abl"
3718
3724
  },
3719
- "2": {
3725
+ "4": {
3720
3726
  "name": "entity.name.function.abl"
3721
3727
  }
3722
3728
  }
@@ -3736,7 +3742,7 @@
3736
3742
  },
3737
3743
  "variable-name": {
3738
3744
  "comment": "1 to 128 characters; can consist of any combination of letters (a-z or A-Z), numbers (0-9), and these special characters: #$-_%& Names must begin with a letter (from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html)",
3739
- "match": "(?<=^|\\s|\\[|\\(|,)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)(?=\\.\\s|\\.$|,|:|\\s|\\)|\\]|\\[|$)",
3745
+ "match": "(?<=^|\\s|\\[|\\(|,)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)(?=\\.\\s|\\.$|,|:|\\?:|\\s|\\)|\\]|\\[|$)",
3740
3746
  "name": "variable.other.abl"
3741
3747
  },
3742
3748
  "extent": {
@@ -3896,18 +3902,23 @@
3896
3902
  },
3897
3903
  "include-file": {
3898
3904
  "name": "meta.include.abl",
3899
- "comment": "https://docs.progress.com/bundle/abl-reference/page/Include-file-reference.html. Filesystem names can be unicode",
3900
- "begin": "({)\\s*(['\"]?([\\\\\\/\\w$\\-\\.]+)(\\.\\w+['\"]?)?)",
3901
- "beginCaptures": {
3905
+ "comment": "https://docs.progress.com/bundle/abl-reference/page/Include-file-reference.html. Filesystem names can be unicode",
3906
+ "begin": "({)\\s*(?!&)(([\"]?)([\\\\\/\\w$\\-\\.]+)([\"]?))",
3907
+ "beginCaptures": {
3902
3908
  "1": {
3903
3909
  "name": "punctuation.section.abl"
3904
3910
  },
3905
- "2": {
3906
- "name": "entity.name.include.abl",
3907
- "comment": "The include name may be quoted"
3911
+ "3": {
3912
+ "name": "punctuation.definition.string.begin.abl"
3913
+ },
3914
+ "4": {
3915
+ "name": "entity.name.include.abl"
3916
+ },
3917
+ "5": {
3918
+ "name": "punctuation.definition.string.end.abl"
3908
3919
  }
3909
3920
  },
3910
- "end": "\\s*(})\\s*",
3921
+ "end": "\\s*(\\s*})\\s*",
3911
3922
  "endCaptures": {
3912
3923
  "1": {
3913
3924
  "name": "punctuation.section.abl"
@@ -4109,7 +4120,7 @@
4109
4120
  "name": "constant.language.abl"
4110
4121
  },
4111
4122
  "constant": {
4112
- "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%])",
4123
+ "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%:])",
4113
4124
  "name": "constant.language.abl"
4114
4125
  },
4115
4126
  "punctuation-colon": {
@@ -4178,7 +4189,7 @@
4178
4189
  ]
4179
4190
  },
4180
4191
  "operator-no-space": {
4181
- "match": "(\\+=|-=|\\\\=|\\*=|<=|<>|>=|=|\\+|-|/|<|>|\\*)",
4192
+ "match": "(\\+=|-=|\\\\=|\\*=|<=|<>|>=|=|<|>)",
4182
4193
  "captures": {
4183
4194
  "1": {
4184
4195
  "name": "keyword.operator.source.abl"
@@ -4186,7 +4197,7 @@
4186
4197
  }
4187
4198
  },
4188
4199
  "operator-with-space": {
4189
- "match": "(?i)(?<=\\s)(contains|begins|matches|eq|le|lt|ge|gt|ne)(?=\\s|\\()",
4200
+ "match": "(?i)(?<=\\s)(contains|begins|matches|eq|le|lt|ge|gt|ne|\\+|-|\\*|/)(?=\\s|\\()",
4190
4201
  "comment": "Lookahead and -behind for the spaces",
4191
4202
  "captures": {
4192
4203
  "1": {
@@ -4335,31 +4346,14 @@
4335
4346
  ]
4336
4347
  },
4337
4348
  "buffer-copy": {
4338
- "begin": "(?i)\\b(buffer-copy)\\s+([a-zA-Z_][a-zA-Z0-9_\\-#$%]+(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)",
4349
+ "begin": "(?i)\\s*(buffer-copy)\\s*(?!\\()",
4339
4350
  "beginCaptures": {
4340
4351
  "1": {
4341
4352
  "name": "keyword.other.abl"
4342
- },
4343
- "2": {
4344
- "name": "storage.data.table.abl"
4345
4353
  }
4346
4354
  },
4347
- "end": "(?=\\.)",
4355
+ "end": "(?=\\s*[Aa][Ss][Ss][Ii][Gg][Nn]|\\.)",
4348
4356
  "patterns": [
4349
- {
4350
- "match": "\\b([Tt][Oo])\\s+([a-zA-Z_][a-zA-Z0-9_\\-#$%]+(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)",
4351
- "captures": {
4352
- "1": {
4353
- "name": "keyword.other.abl"
4354
- },
4355
- "2": {
4356
- "name": "storage.data.table.abl"
4357
- }
4358
- }
4359
- },
4360
- {
4361
- "include": "#using-except"
4362
- },
4363
4357
  {
4364
4358
  "include": "#comment"
4365
4359
  },
@@ -4367,7 +4361,7 @@
4367
4361
  "include": "#preprocessors"
4368
4362
  },
4369
4363
  {
4370
- "match": "(?i)\\b(assign|no-lobs|no-error)\\b",
4364
+ "match": "(?i)\\s*(using|except|to|no-lobs|no-error)\\s*",
4371
4365
  "captures": {
4372
4366
  "1": {
4373
4367
  "name": "keyword.other.abl"
@@ -4378,13 +4372,10 @@
4378
4372
  "include": "#db-dot-table-dot-field"
4379
4373
  },
4380
4374
  {
4381
- "include": "#assign-statment"
4382
- },
4383
- {
4384
- "include": "#keywords"
4375
+ "include": "#db-dot-table"
4385
4376
  },
4386
4377
  {
4387
- "include": "#expression"
4378
+ "include": "#field-name"
4388
4379
  }
4389
4380
  ]
4390
4381
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.20",
3
+ "version": "1.3.22",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "type": "commonjs",
@@ -207,7 +207,6 @@ describe('', () => {
207
207
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
208
208
  })
209
209
 
210
-
211
210
  describe('', () => {
212
211
  let statement = `@AnnotationName(attrib1="class-tag,store",
213
212
  attrib2="bob").`;
@@ -235,3 +234,133 @@ describe('', () => {
235
234
  ];
236
235
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
237
236
  })
237
+
238
+ describe('', () => {
239
+ let statement = ` @openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="true").
240
+ @progress.service.resourceMapping(type="REST", operation="read", URI="?filter=~{filter~}", alias="", mediaType="application/json").
241
+ @openapi.openedge.single.
242
+ @openapi.openedge.method.property (name="mappingType", value="JFP").
243
+ @openapi.openedge.method.property (name="capabilities", value="ablFilter,top,skip,id,orderBy").
244
+ @openapi.openedge.single.`;
245
+ let expectedTokens = [
246
+ [
247
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
248
+ { "startIndex": 4, "endIndex": 28, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@openapi.openedge.export'
249
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
250
+ { "startIndex": 29, "endIndex": 33, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'type'
251
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
252
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
253
+ { "startIndex": 35, "endIndex": 39, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'REST'
254
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
255
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
256
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
257
+ { "startIndex": 42, "endIndex": 56, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'useReturnValue'
258
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
259
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
260
+ { "startIndex": 58, "endIndex": 63, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'false'
261
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
262
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
263
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
264
+ { "startIndex": 66, "endIndex": 89, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'writeDataSetBeforeImage'
265
+ { "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
266
+ { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
267
+ { "startIndex": 91, "endIndex": 95, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'true'
268
+ { "startIndex": 95, "endIndex": 96, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
269
+ { "startIndex": 96, "endIndex": 97, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
270
+ { "startIndex": 97, "endIndex": 98, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
271
+ ],
272
+ [
273
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
274
+ { "startIndex": 4, "endIndex": 37, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@progress.service.resourceMapping'
275
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
276
+ { "startIndex": 38, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'type'
277
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
278
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
279
+ { "startIndex": 44, "endIndex": 48, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'REST'
280
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
281
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
282
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
283
+ { "startIndex": 51, "endIndex": 60, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'operation'
284
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
285
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
286
+ { "startIndex": 62, "endIndex": 66, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'read'
287
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
288
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
289
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
290
+ { "startIndex": 69, "endIndex": 72, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'URI'
291
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
292
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
293
+ { "startIndex": 74, "endIndex": 82, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // '?filter='
294
+ { "startIndex": 82, "endIndex": 84, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
295
+ { "startIndex": 84, "endIndex": 90, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'filter'
296
+ { "startIndex": 90, "endIndex": 92, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~}'
297
+ { "startIndex": 92, "endIndex": 93, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
298
+ { "startIndex": 93, "endIndex": 94, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
299
+ { "startIndex": 94, "endIndex": 95, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
300
+ { "startIndex": 95, "endIndex": 100, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'alias'
301
+ { "startIndex": 100, "endIndex": 101, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
302
+ { "startIndex": 101, "endIndex": 102, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
303
+ { "startIndex": 102, "endIndex": 103, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
304
+ { "startIndex": 103, "endIndex": 104, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
305
+ { "startIndex": 104, "endIndex": 105, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
306
+ { "startIndex": 105, "endIndex": 114, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'mediaType'
307
+ { "startIndex": 114, "endIndex": 115, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
308
+ { "startIndex": 115, "endIndex": 116, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
309
+ { "startIndex": 116, "endIndex": 132, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'application/json'
310
+ { "startIndex": 132, "endIndex": 133, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
311
+ { "startIndex": 133, "endIndex": 134, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
312
+ { "startIndex": 134, "endIndex": 135, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
313
+ ],
314
+ [
315
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
316
+ { "startIndex": 4, "endIndex": 28, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@openapi.openedge.single'
317
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
318
+ ],
319
+ [
320
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
321
+ { "startIndex": 4, "endIndex": 37, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@openapi.openedge.method.property'
322
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
323
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
324
+ { "startIndex": 39, "endIndex": 43, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
325
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
326
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
327
+ { "startIndex": 45, "endIndex": 56, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'mappingType'
328
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
329
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
330
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
331
+ { "startIndex": 59, "endIndex": 64, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'value'
332
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
333
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
334
+ { "startIndex": 66, "endIndex": 69, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'JFP'
335
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
336
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
337
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
338
+ ],
339
+ [
340
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
341
+ { "startIndex": 4, "endIndex": 37, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@openapi.openedge.method.property'
342
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
343
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
344
+ { "startIndex": 39, "endIndex": 43, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
345
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
346
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
347
+ { "startIndex": 45, "endIndex": 57, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'capabilities'
348
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
349
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
350
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
351
+ { "startIndex": 60, "endIndex": 65, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'value'
352
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
353
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
354
+ { "startIndex": 67, "endIndex": 96, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl"] }, // 'ablFilter,top,skip,id,orderBy'
355
+ { "startIndex": 96, "endIndex": 97, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
356
+ { "startIndex": 97, "endIndex": 98, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
357
+ { "startIndex": 98, "endIndex": 99, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
358
+ ],
359
+ [
360
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
361
+ { "startIndex": 4, "endIndex": 28, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@openapi.openedge.single'
362
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
363
+ ]
364
+ ];
365
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
366
+ })
@@ -150,8 +150,9 @@ describe('', () => {
150
150
  { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
151
151
  { "startIndex": 29, "endIndex": 33, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
152
152
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
153
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
154
- { "startIndex": 35, "endIndex": 45, "scopes": ["source.abl"] }, // 'archive '
153
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // '-'
154
+ { "startIndex": 35, "endIndex": 42, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'archive'
155
+ { "startIndex": 42, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
155
156
  { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
156
157
  ];
157
158
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
@@ -159,8 +159,7 @@ describe('', () => {
159
159
  { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
160
160
  { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl"] }, // 'name '
161
161
  { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
162
- { "startIndex": 35, "endIndex": 39, "scopes": ["source.abl"] }, // ' old'
163
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
162
+ { "startIndex": 35, "endIndex": 40, "scopes": ["source.abl"] }, // ' old-'
164
163
  { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
165
164
  { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
166
165
  { "startIndex": 42, "endIndex": 46, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -191,8 +190,7 @@ describe('', () => {
191
190
  { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
192
191
  { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl"] }, // 'name '
193
192
  { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
194
- { "startIndex": 33, "endIndex": 37, "scopes": ["source.abl"] }, // ' old'
195
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
193
+ { "startIndex": 33, "endIndex": 38, "scopes": ["source.abl"] }, // ' old-'
196
194
  { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
197
195
  { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
198
196
  { "startIndex": 40, "endIndex": 44, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -215,8 +213,7 @@ describe('', () => {
215
213
  { "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'buf-{&file}'
216
214
  { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
217
215
  { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
218
- { "startIndex": 21, "endIndex": 25, "scopes": ["source.abl"] }, // ' buf'
219
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
216
+ { "startIndex": 21, "endIndex": 26, "scopes": ["source.abl"] }, // ' buf-'
220
217
  { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
221
218
  { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
222
219
  { "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -224,8 +221,7 @@ describe('', () => {
224
221
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
225
222
  { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl"] }, // 'name '
226
223
  { "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
227
- { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl"] }, // ' old'
228
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
224
+ { "startIndex": 41, "endIndex": 46, "scopes": ["source.abl"] }, // ' old-'
229
225
  { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
230
226
  { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
231
227
  { "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -378,7 +378,7 @@ describe('', () => {
378
378
  })
379
379
 
380
380
  describe('', () => {
381
- let statement = `var decimal pie = 22/3, piIsh = 3.1415927.`;
381
+ let statement = `var decimal pie = 22 / 3, piIsh = 3.1415927.`;
382
382
  let expectedTokens = [
383
383
  { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
384
384
  { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
@@ -389,16 +389,18 @@ describe('', () => {
389
389
  { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
390
390
  { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
391
391
  { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '22'
392
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '/'
393
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3'
394
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
395
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
396
- { "startIndex": 24, "endIndex": 29, "scopes": ["source.abl", "variable.other.abl"] }, // 'piIsh'
397
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
398
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
392
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
393
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '/'
394
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
395
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3'
396
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
397
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
398
+ { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'piIsh'
399
399
  { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
400
- { "startIndex": 32, "endIndex": 41, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3.1415927'
401
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
400
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
401
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
402
+ { "startIndex": 34, "endIndex": 43, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3.1415927'
403
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
402
404
  ]
403
405
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
404
406
  })
@@ -248,3 +248,20 @@ describe('UNC path, FQDN, and multiple dots in the filename', () => {
248
248
  ];
249
249
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
250
250
  });
251
+
252
+ describe('UNC path, FQDN, and multiple dots in the quoted filename', () => {
253
+ // see: https://github.com/vscode-abl/vscode-abl/issues/362
254
+ let statement = `{"\\\\fileserver.corp.company.com\\shared\\data\\config.backup.2024.07.29.i" &DEBUG=TRUE}`;
255
+ let expectedTokens = [
256
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
257
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl", "punctuation.definition.string.begin.abl"] }, // '"'
258
+ { "startIndex": 2, "endIndex": 70, "scopes": ["source.abl", "meta.include.abl", "entity.name.include.abl"] }, // '\\fileserver.corp.company.com\shared\data\config.backup.2024.07.29.i'
259
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.include.abl", "punctuation.definition.string.end.abl"] }, // '"'
260
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
261
+ { "startIndex": 72, "endIndex": 78, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&DEBUG'
262
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
263
+ { "startIndex": 79, "endIndex": 83, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'TRUE'
264
+ { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
265
+ ];
266
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
267
+ });
@@ -0,0 +1,246 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `oController?:NewEventName:Subscribe(NewEventNameHandler).`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
8
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
9
+ { "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
10
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
11
+ { "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
12
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
13
+ { "startIndex": 36, "endIndex": 55, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
14
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
15
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
16
+ ];
17
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
18
+ })
19
+
20
+ describe('', () => {
21
+ let statement = `oController?:NewEventName?:Subscribe(NewEventNameHandler).`;
22
+ let expectedTokens = [
23
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
24
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
25
+ { "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
26
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
27
+ { "startIndex": 27, "endIndex": 36, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
28
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
29
+ { "startIndex": 37, "endIndex": 56, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
30
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
31
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
32
+
33
+ ];
34
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
35
+ })
36
+
37
+ describe('', () => {
38
+ let statement = `oController:NewEventName?:Subscribe(NewEventNameHandler).`;
39
+ let expectedTokens = [
40
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
41
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
42
+ { "startIndex": 12, "endIndex": 24, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
43
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
44
+ { "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
45
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
46
+ { "startIndex": 36, "endIndex": 55, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
47
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
48
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
49
+ ];
50
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
51
+ })
52
+
53
+ describe('', () => {
54
+ let statement = `oController:NewEventName?:AThing(oVariable).`;
55
+ let expectedTokens = [
56
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
57
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
58
+ { "startIndex": 12, "endIndex": 24, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
59
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
60
+ { "startIndex": 26, "endIndex": 32, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AThing'
61
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
62
+ { "startIndex": 33, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oVariable'
63
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
64
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
65
+ ];
66
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
67
+ })
68
+
69
+ describe('', () => {
70
+ let statement = `message this-object:NewEventName?:PropertySays.`;
71
+ let expectedTokens = [
72
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
73
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
74
+ { "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
75
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
76
+ { "startIndex": 20, "endIndex": 32, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
77
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
78
+ { "startIndex": 34, "endIndex": 46, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
79
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
80
+ ];
81
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
82
+ })
83
+
84
+ describe('', () => {
85
+ let statement = `assign this-object:NewEventName?:PropertySays = "Some value".`;
86
+ let expectedTokens = [
87
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
88
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
89
+ { "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
90
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
91
+ { "startIndex": 19, "endIndex": 31, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
92
+ { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
93
+ { "startIndex": 33, "endIndex": 45, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
94
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
95
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
96
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
97
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
98
+ { "startIndex": 49, "endIndex": 59, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'Some value'
99
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
100
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
101
+ ];
102
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
103
+ })
104
+
105
+ describe('technically impossible but will pass the compiler', () => {
106
+ let statement = `message this-object?:NewEventName?:PropertySays.`;
107
+ let expectedTokens = [
108
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
109
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
110
+ { "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
111
+ { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
112
+ { "startIndex": 21, "endIndex": 33, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
113
+ { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
114
+ { "startIndex": 35, "endIndex": 47, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
115
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
116
+ ];
117
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
118
+ })
119
+
120
+ describe('', () => {
121
+ let statement = `message session:current-request-info?:AdapterType:ToString()`;
122
+ let expectedTokens = [
123
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
124
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
125
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "variable.language.abl"] }, // 'session'
126
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
127
+ { "startIndex": 16, "endIndex": 36, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'current-request-info'
128
+ { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
129
+ { "startIndex": 38, "endIndex": 49, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AdapterType'
130
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
131
+ { "startIndex": 50, "endIndex": 58, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ToString'
132
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
133
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
134
+ ];
135
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
136
+ })
137
+
138
+ describe('', () => {
139
+ let statement = `message session?:current-request-info?:AdapterType:ToString()`;
140
+ let expectedTokens = [
141
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
142
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
143
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "variable.language.abl"] }, // 'session'
144
+ { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
145
+ { "startIndex": 17, "endIndex": 37, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'current-request-info'
146
+ { "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
147
+ { "startIndex": 39, "endIndex": 50, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AdapterType'
148
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
149
+ { "startIndex": 51, "endIndex": 59, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ToString'
150
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
151
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
152
+ ];
153
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
154
+ })
155
+
156
+ describe('', () => {
157
+ let statement = `a[x]?:aMethod():aField // Evaluates to null if a[x] == null`;
158
+ let expectedTokens = [
159
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'a'
160
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
161
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] }, // 'x'
162
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
163
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
164
+ { "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aMethod'
165
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
166
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
167
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
168
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aField'
169
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
170
+ { "startIndex": 23, "endIndex": 59, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// Evaluates to null if a[x] == null'
171
+ ];
172
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
173
+ })
174
+
175
+ describe('', () => {
176
+ let statement = `a[x]:aMethod()?:aField`;
177
+ let expectedTokens = [
178
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'a'
179
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
180
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] }, // 'x'
181
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
182
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
183
+ { "startIndex": 5, "endIndex": 12, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aMethod'
184
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
185
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
186
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
187
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "entity.name.function.abl"] } // 'aField'
188
+ ];
189
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
190
+ })
191
+
192
+ describe('', () => {
193
+ let statement = `CAST(obj?:prop, My.Type)`;
194
+ let expectedTokens = [
195
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'CAST'
196
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
197
+ { "startIndex": 5, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
198
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
199
+ { "startIndex": 10, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'prop'
200
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
201
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
202
+ { "startIndex": 16, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
203
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
204
+ ];
205
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
206
+ })
207
+
208
+ describe('', () => {
209
+ let statement = `type-OF(obj?:meth()?:val, My.Type)`;
210
+ let expectedTokens = [
211
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'type-OF'
212
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
213
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
214
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
215
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'meth'
216
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
217
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
218
+ { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
219
+ { "startIndex": 21, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'val'
220
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
221
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
222
+ { "startIndex": 26, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
223
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
224
+ ];
225
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
226
+ })
227
+
228
+ describe('', () => {
229
+ let statement = `type-OF(obj:meth()?:val, My.Type)`;
230
+ let expectedTokens = [
231
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'type-OF'
232
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
233
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
234
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
235
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'meth'
236
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
237
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
238
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
239
+ { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'val'
240
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
241
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
242
+ { "startIndex": 25, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
243
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
244
+ ];
245
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
246
+ })