abl-tmlanguage 1.3.21 → 1.3.23

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,14 @@
1
+ 1.3.23
2
+ ======
3
+
4
+ - ✨ Improve scoping for RUN statements (PR #71, issue vscode-abl/vscode-abl#479)
5
+
6
+ 1.3.22
7
+ ======
8
+
9
+ - ✨ Annotations with dotted names
10
+ - ✨ Include file names (UNC path, FQDN, multiple dots, ...)
11
+
1
12
  1.3.21
2
13
  ======
3
14
  - ✨ Safe navigation operator
@@ -479,6 +479,9 @@
479
479
  {
480
480
  "include": "#comment"
481
481
  },
482
+ {
483
+ "include": "#run-options"
484
+ },
482
485
  {
483
486
  "include": "#buffer-copy"
484
487
  },
@@ -1800,16 +1803,16 @@
1800
1803
  "annotation": {
1801
1804
  "patterns": [
1802
1805
  {
1803
- "include": "#annotation-simple"
1806
+ "include": "#annotation-attributes"
1804
1807
  },
1805
1808
  {
1806
- "include": "#annotation-attributes"
1809
+ "include": "#annotation-simple"
1807
1810
  }
1808
1811
  ]
1809
1812
  },
1810
1813
  "annotation-simple": {
1811
1814
  "name": "meta.declaration.annotation.abl",
1812
- "match": "(^|\\s*)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*(?=\\.)",
1815
+ "match": "(^|\\s*)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]+)\\s*(?=\\.)",
1813
1816
  "captures": {
1814
1817
  "2": {
1815
1818
  "name": "entity.name.tag.abl"
@@ -1818,7 +1821,7 @@
1818
1821
  },
1819
1822
  "annotation-attributes": {
1820
1823
  "name": "meta.declaration.annotation.abl",
1821
- "begin": "(^|\\s+)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*(?=\\()",
1824
+ "begin": "(^|\\s+)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]*)\\s*(?=\\()",
1822
1825
  "beginCaptures": {
1823
1826
  "2": {
1824
1827
  "name": "entity.name.tag.abl"
@@ -2903,7 +2906,7 @@
2903
2906
  },
2904
2907
  "end-block": {
2905
2908
  "comment": "Certain blocks have the option of END <block name>",
2906
- "match": "(?i)\\s*(end)\\s+(CASE|CATCH|CLASS|CONSTRUCTOR|DESTRUCTOR|ENUM|FINALLY|FUNCTION|GET|INTERFACE|METHOD|PROCEDURE|SET|TRIGGERS)\\s*",
2909
+ "match": "(?i)\\s*(end)\\s+(case|catch|class|constructor|destructor|enum|finally|function|get|interface|method|procedure|set|triggers)\\s*",
2907
2910
  "captures": {
2908
2911
  "1": {
2909
2912
  "name": "keyword.other.abl"
@@ -3685,6 +3688,9 @@
3685
3688
  {
3686
3689
  "include": "#punctuation-comma"
3687
3690
  },
3691
+ {
3692
+ "include": "#argument-reference"
3693
+ },
3688
3694
  {
3689
3695
  "include": "#preprocessors"
3690
3696
  }
@@ -3891,6 +3897,21 @@
3891
3897
  }
3892
3898
  ]
3893
3899
  },
3900
+ "run-options": {
3901
+ "patterns": [
3902
+ {
3903
+ "match": "\\b(([Ss][Ee][Tt])|([Ii][Nn]))\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b",
3904
+ "captures": {
3905
+ "1": {
3906
+ "name": "keyword.other.abl"
3907
+ },
3908
+ "4": {
3909
+ "name": "variable.other.abl"
3910
+ }
3911
+ }
3912
+ }
3913
+ ]
3914
+ },
3894
3915
  "procedure-name": {
3895
3916
  "comment": "(External) Program names are files, so need to support unicode.",
3896
3917
  "match": "([\\w\\-\\$\\@\\/\\\\\\.]{1,256})(?=\\b|\\.$)",
@@ -3903,17 +3924,22 @@
3903
3924
  "include-file": {
3904
3925
  "name": "meta.include.abl",
3905
3926
  "comment": "https://docs.progress.com/bundle/abl-reference/page/Include-file-reference.html. Filesystem names can be unicode",
3906
- "begin": "({)\\s*(['\"]?([\\\\\\/\\w$\\-\\.]+)(\\.\\w+['\"]?)?)",
3927
+ "begin": "({)\\s*(?!&)(([\"]?)([\\\\\/\\w$\\-\\.]+)([\"]?))",
3907
3928
  "beginCaptures": {
3908
3929
  "1": {
3909
3930
  "name": "punctuation.section.abl"
3910
3931
  },
3911
- "2": {
3912
- "name": "entity.name.include.abl",
3913
- "comment": "The include name may be quoted"
3932
+ "3": {
3933
+ "name": "punctuation.definition.string.begin.abl"
3934
+ },
3935
+ "4": {
3936
+ "name": "entity.name.include.abl"
3937
+ },
3938
+ "5": {
3939
+ "name": "punctuation.definition.string.end.abl"
3914
3940
  }
3915
3941
  },
3916
- "end": "\\s*(})\\s*",
3942
+ "end": "\\s*(\\s*})\\s*",
3917
3943
  "endCaptures": {
3918
3944
  "1": {
3919
3945
  "name": "punctuation.section.abl"
@@ -4476,7 +4502,7 @@
4476
4502
  },
4477
4503
  "keywords-A": {
4478
4504
  "comment": "The keyword must not have a trailing variable character (one of #$-_%&)",
4479
- "match": "(?i)\\b(a(?:bort|bstract|ccumulate?|ccumula?|ccumu?|cross|ctive-form|ctive-window|dd|dvise|ggregate|lert-box|ll|llow-replication|lter|lternate-key|mbiguous?|mbiguo?|mbig|nd|nsi-only|ny|ny-key|ny-printable|nywhere|ppend|ppend-line|pplication|pply|rray-message?|rray-messa?|rray-mes?|rray-m|s|s-cursor|scending?|scendi?|scen?|sc|sk-overwrite|ssembly|ssign|t|ttach|ttachment|ttribute-type|udit-control|udit-policy|uthorization|uto-endkey|uto-go|utomatic|vailable?|vailab?|vail|verage?|vera?|ve|vg))\\b(?![#$\\-_%&])",
4505
+ "match": "(?i)\\b(a(?:bort|bstract|ccumulate?|ccumula?|ccumu?|cross|ctive-form|ctive-window|dd|dvise|ggregate|lert-box|ll|llow-replication|lter|lternate-key|mbiguous?|mbiguo?|mbig|nd|nsi-only|ny|ny-key|ny-printable|nywhere|ppend|ppend-line|pplication|pply|rray-message?|rray-messa?|rray-mes?|rray-m|s|s-cursor|scending?|scendi?|scen?|sc|sk-overwrite|ssembly|ssign|synchronous|t|ttach|ttachment|ttribute-type|udit-control|udit-policy|uthorization|uto-endkey|uto-go|utomatic|vailable?|vailab?|vail|verage?|vera?|ve|vg))\\b(?![#$\\-_%&])",
4480
4506
  "captures": {
4481
4507
  "1": {
4482
4508
  "name": "keyword.other.abl"
@@ -4512,7 +4538,7 @@
4512
4538
  },
4513
4539
  "keywords-E": {
4514
4540
  "comment": "The keyword must not have a trailing variable character (one of #$-_%&)",
4515
- "match": "(?i)\\b(e(?:ach|cho|dge|dge-pixels?|dge-pixe?|dge-pi?|diting|ditor|ditor-backtab|ditor-tab|lse|mpty|mpty-selection|nable|nd|nd-box-selection|nd-error|nd-key|nd-move|nd-resize|nd-row-resize|nd-search|ndkey|nter-menubar|ntry|num|q|rror|rror-status?|rror-stat|scape|vent|vent-handler-context|vents|xcept|xclusive|xclusive-lock?|xclusive-lo?|xclusive-web-user?|xclusive-web-us?|xclusive-web-?|xecute|xists|xit|xpire|xplicit|xport|xtended|xtent|xternal|xtract))\\b(?![#$\\-_%&])",
4541
+ "match": "(?i)\\b(e(?:ach|cho|dge|dge-pixels?|dge-pixe?|dge-pi?|diting|ditor|ditor-backtab|ditor-tab|lse|mpty|mpty-selection|nable|nd|nd-box-selection|nd-error|nd-key|nd-move|nd-resize|nd-row-resize|nd-search|ndkey|nter-menubar|ntry|num|q|rror|rror-status?|rror-stat|scape|vent|vent-handler|vent-handler-context|vents|xcept|xclusive|xclusive-lock?|xclusive-lo?|xclusive-web-user?|xclusive-web-us?|xclusive-web-?|xecute|xists|xit|xpire|xplicit|xport|xtended|xtent|xternal|xtract))\\b(?![#$\\-_%&])",
4516
4542
  "captures": {
4517
4543
  "1": {
4518
4544
  "name": "keyword.other.abl"
package/index.mjs CHANGED
@@ -41,6 +41,7 @@ const re = /(?:\w|-|\()+(?=\s|$)/g
41
41
  // appropriate scopes
42
42
  let alsoStatements = [];
43
43
  alsoStatements.push('ambiguous');
44
+ alsoStatements.push('asynchronous');
44
45
  alsoStatements.push('auto-go');
45
46
  alsoStatements.push('available');
46
47
  alsoStatements.push('bgcolor');
@@ -54,6 +55,7 @@ alsoStatements.push('delete');
54
55
  alsoStatements.push('delimiter');
55
56
  alsoStatements.push('drop-target');
56
57
  alsoStatements.push('edge-pixels');
58
+ alsoStatements.push('event-handler');
57
59
  alsoStatements.push('fgcolor');
58
60
  alsoStatements.push('first');
59
61
  alsoStatements.push('flat-button');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
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
+ })
@@ -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
+ });
@@ -337,3 +337,308 @@ describe('', () => {
337
337
  ];
338
338
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
339
339
  })
340
+
341
+ describe('', () => {
342
+ let statement = `RUN VALUE(THIS-OBJECT:ServiceInterfacePath + "/proSIinvokeTaskAsync2.p":U)
343
+ ON hAppServer
344
+ ASYNCHRONOUS
345
+ (INPUT pcTaskName,
346
+ INPUT pcMethodName,
347
+ {1},
348
+ lcDataset1,
349
+ lcDataset2,
350
+ lcDataset3,
351
+ lcDataset4,
352
+ lcDataset5,
353
+ lcParameter,
354
+ lcContext) .`;
355
+
356
+ let expectedTokens = [
357
+ [
358
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
359
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
360
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
361
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
362
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.language.abl"] }, // 'THIS-OBJECT'
363
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
364
+ { "startIndex": 22, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'ServiceInterfacePath'
365
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
366
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "keyword.operator.source.abl"] }, // '+'
367
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
368
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
369
+ { "startIndex": 46, "endIndex": 70, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '/proSIinvokeTaskAsync2.p'
370
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
371
+ { "startIndex": 71, "endIndex": 73, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':U'
372
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
373
+ ],
374
+ [
375
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
376
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ON'
377
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
378
+ { "startIndex": 11, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] } // 'hAppServer'
379
+ ],
380
+ [
381
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
382
+ { "startIndex": 8, "endIndex": 20, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASYNCHRONOUS'
383
+ ],
384
+ [
385
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
386
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
387
+ { "startIndex": 9, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'INPUT'
388
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
389
+ { "startIndex": 15, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'pcTaskName'
390
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
391
+ ],
392
+ [
393
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
394
+ { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'INPUT'
395
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
396
+ { "startIndex": 16, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'pcMethodName'
397
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
398
+ ],
399
+ [
400
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
401
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.argument.abl", "punctuation.section.abl"] }, // '{'
402
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.argument.abl", "support.other.argument.abl"] }, // '1'
403
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.argument.abl", "punctuation.section.abl"] }, // '}'
404
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
405
+ ],
406
+ [
407
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
408
+ { "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset1'
409
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
410
+ ],
411
+ [
412
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
413
+ { "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset2'
414
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
415
+ ],
416
+ [
417
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
418
+ { "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset3'
419
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
420
+ ],
421
+ [
422
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
423
+ { "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset4'
424
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
425
+ ],
426
+ [
427
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
428
+ { "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset5'
429
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
430
+ ],
431
+ [
432
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
433
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcParameter'
434
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
435
+ ],
436
+ [
437
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
438
+ { "startIndex": 10, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcContext'
439
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
440
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
441
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
442
+ ]
443
+ ];
444
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
445
+ })
446
+
447
+ describe('', () => {
448
+ let statement = `run Bar in vProcedureHandle(input "hello World").`;
449
+
450
+ let expectedTokens = [
451
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
452
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
453
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'Bar'
454
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
455
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'in'
456
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
457
+ { "startIndex": 11, "endIndex": 27, "scopes": ["source.abl", "variable.other.abl"] }, // 'vProcedureHandle'
458
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
459
+ { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'input'
460
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
461
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
462
+ { "startIndex": 35, "endIndex": 46, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'hello World'
463
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
464
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
465
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
466
+ ];
467
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
468
+ })
469
+
470
+ describe('', () => {
471
+ let statement = `RUN test.p
472
+ ON hServer
473
+ ASYNCHRONOUS
474
+ EVENT-HANDLER "test"
475
+ EVENT-HANDLER-CONTEXT o .`;
476
+
477
+ let expectedTokens = [
478
+ [
479
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
480
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
481
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "entity.name.procedure.abl"] } // 'test.p'
482
+ ],
483
+ [
484
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
485
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ON'
486
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
487
+ { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] } // 'hServer'
488
+ ],
489
+ [
490
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
491
+ { "startIndex": 4, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASYNCHRONOUS'
492
+ ],
493
+ [
494
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
495
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER'
496
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
497
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
498
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'test'
499
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
500
+ ],
501
+ [
502
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
503
+ { "startIndex": 4, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER-CONTEXT'
504
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
505
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "variable.other.abl"] }, // 'o'
506
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
507
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
508
+ ]
509
+ ];
510
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
511
+ })
512
+
513
+ describe('', () => {
514
+ let statement = `RUN test.p
515
+ ON SERVER hServer
516
+ ASYNCHRONOUS
517
+ EVENT-HANDLER "test"
518
+ EVENT-HANDLER-CONTEXT o .`;
519
+
520
+ let expectedTokens = [
521
+ [
522
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
523
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
524
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "entity.name.procedure.abl"] } // 'test.p'
525
+ ],
526
+ [
527
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
528
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ON'
529
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
530
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'SERVER'
531
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
532
+ { "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] } // 'hServer'
533
+ ],
534
+ [
535
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
536
+ { "startIndex": 4, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASYNCHRONOUS'
537
+ ],
538
+ [
539
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
540
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER'
541
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
542
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
543
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'test'
544
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
545
+ ],
546
+ [
547
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
548
+ { "startIndex": 4, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER-CONTEXT'
549
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
550
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "variable.other.abl"] }, // 'o'
551
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
552
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
553
+ ]
554
+ ];
555
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
556
+ })
557
+
558
+ describe('', () => {
559
+ let statement = `RUN test.p
560
+ ON SESSION
561
+ ASYNCHRONOUS
562
+ EVENT-HANDLER "test"
563
+ EVENT-HANDLER-CONTEXT o .`;
564
+
565
+ let expectedTokens = [
566
+ [
567
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
568
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
569
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "entity.name.procedure.abl"] } // 'test.p'
570
+ ],
571
+ [
572
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
573
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ON'
574
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
575
+ { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "variable.language.abl"] } // 'SESSION'
576
+ ],
577
+ [
578
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
579
+ { "startIndex": 4, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASYNCHRONOUS'
580
+ ],
581
+ [
582
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
583
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER'
584
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
585
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
586
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'test'
587
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
588
+ ],
589
+ [
590
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
591
+ { "startIndex": 4, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER-CONTEXT'
592
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
593
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "variable.other.abl"] }, // 'o'
594
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
595
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
596
+ ]
597
+ ];
598
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
599
+ })
600
+
601
+ describe('', () => {
602
+ let statement = `RUN test.p
603
+ ON SESSION:HANDLE
604
+ ASYNCHRONOUS
605
+ EVENT-HANDLER "test"
606
+ EVENT-HANDLER-CONTEXT o .`;
607
+
608
+ let expectedTokens = [
609
+ [
610
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
611
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
612
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "entity.name.procedure.abl"] } // 'test.p'
613
+ ],
614
+ [
615
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
616
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ON'
617
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
618
+ { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "variable.language.abl"] }, // 'SESSION'
619
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
620
+ { "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "entity.name.function.abl"] } // 'HANDLE'
621
+ ],
622
+ [
623
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
624
+ { "startIndex": 4, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASYNCHRONOUS'
625
+ ],
626
+ [
627
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
628
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER'
629
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
630
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
631
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'test'
632
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
633
+ ],
634
+ [
635
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
636
+ { "startIndex": 4, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EVENT-HANDLER-CONTEXT'
637
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
638
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "variable.other.abl"] }, // 'o'
639
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
640
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
641
+ ]
642
+ ];
643
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
644
+ })