abl-tmlanguage 1.3.11 → 1.3.12

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.12
2
+ ======
3
+
4
+ - Ensure GET and SET in property definitions are case-insensitive. Fix for Syntax highlighting (vscode-abl/vscode-abl#307)
5
+ - Support comments in a FOR EACH statement
6
+ - Scope functions named GET-VALUE and SET-VALUE correctly
7
+ - Support WHILE in FOR EACH
8
+ - Allow keywords in parameter arguments
9
+ - Limit scope of SET-SIZE function arguments appropriately
10
+
1
11
  1.3.11
2
12
  ======
3
13
 
@@ -433,6 +433,12 @@
433
433
  {
434
434
  "include": "#comment"
435
435
  },
436
+ {
437
+ "include": "#abl-function-variable-arg"
438
+ },
439
+ {
440
+ "include": "#while-expression"
441
+ },
436
442
  {
437
443
  "include": "#rowid-function"
438
444
  },
@@ -990,6 +996,32 @@
990
996
  }
991
997
  ]
992
998
  },
999
+ "abl-function-variable-arg": {
1000
+ "name": "meta.function-call.abl",
1001
+ "begin": "(?i)\\s*(set-size)\\s*(?=\\()",
1002
+ "beginCaptures": {
1003
+ "1": {
1004
+ "name": "support.function.abl"
1005
+ }
1006
+ },
1007
+ "end": "(\\))",
1008
+ "endCaptures": {
1009
+ "1": {
1010
+ "name": "meta.brace.round.js"
1011
+ }
1012
+ },
1013
+ "patterns": [
1014
+ {
1015
+ "include": "#parens"
1016
+ },
1017
+ {
1018
+ "include": "#type-member-call"
1019
+ },
1020
+ {
1021
+ "include": "#variable-name"
1022
+ }
1023
+ ]
1024
+ },
993
1025
  "get-class": {
994
1026
  "name": "meta.function-call.abl",
995
1027
  "begin": "(?i)\\s*(get-class)\\s*(\\()",
@@ -1198,6 +1230,12 @@
1198
1230
  },
1199
1231
  {
1200
1232
  "include": "#db-dot-table-dot-field"
1233
+ },
1234
+ {
1235
+ "include": "#while-expression"
1236
+ },
1237
+ {
1238
+ "include": "#comment"
1201
1239
  }
1202
1240
  ]
1203
1241
  },
@@ -1419,7 +1457,7 @@
1419
1457
  ]
1420
1458
  },
1421
1459
  "property-get-set-super": {
1422
- "match": "\\b(get|set)\\s+(super)\\s*(?=\\.)",
1460
+ "match": "(?i)\\b(get|set)\\s+(super)\\s*(?=\\.)",
1423
1461
  "comment": "This is a call to the parent class' property getter or setter",
1424
1462
  "captures": {
1425
1463
  "1": {
@@ -1432,7 +1470,7 @@
1432
1470
  },
1433
1471
  "property-get-set-empty": {
1434
1472
  "comment": "This rule is needed since for 'plain' gets and sets, there's no END",
1435
- "match": "\\b(get|set)\\s*(?=\\.)",
1473
+ "match": "\\b([Gg][Ee][Tt]|[Ss][Ee][Tt])\\s*(?=\\.)",
1436
1474
  "captures": {
1437
1475
  "1": {
1438
1476
  "name": "keyword.other.abl"
@@ -1440,13 +1478,13 @@
1440
1478
  }
1441
1479
  },
1442
1480
  "property-get-set-block": {
1443
- "begin": "(?i)\\s*(?<!:)\\s*(get|set)\\b",
1481
+ "begin": "\\s*(?<!:)\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])\\b(?![#$\\-_%&])",
1444
1482
  "beginCaptures": {
1445
1483
  "1": {
1446
1484
  "name": "keyword.other.abl"
1447
1485
  }
1448
1486
  },
1449
- "end": "(?i)\\s*(end)\\s*(get|set)?\\s*(?=\\.)\\s*",
1487
+ "end": "\\s*([Ee][Nn][Dd])\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])?\\s*(?=\\.)\\s*",
1450
1488
  "comment": "The end capture does a lookahead on . so that the 'define' capture can end ",
1451
1489
  "endCaptures": {
1452
1490
  "1": {
@@ -2009,7 +2047,7 @@
2009
2047
  }
2010
2048
  },
2011
2049
  "comment": "This match just gets the definition of the property; the getter and setter are handled separately",
2012
- "end": "(?i)\\s*(?=get|set)",
2050
+ "end": "\\s*(?=[Gg][Ee][Tt]|[Ss][Ee][Tt])",
2013
2051
  "patterns": [
2014
2052
  {
2015
2053
  "include": "#property-as"
@@ -3350,6 +3388,9 @@
3350
3388
  {
3351
3389
  "include": "#handle-methods"
3352
3390
  },
3391
+ {
3392
+ "include": "#keywords"
3393
+ },
3353
3394
  {
3354
3395
  "include": "#expression"
3355
3396
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "repository": {
@@ -0,0 +1,102 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `FOR EACH web-cart /*FIELDS (SYSTEM-ID web-key bom-key kit-seq-num req-date line-num entry-key order-num)*/ WHERE
6
+ web-cart.system-id = user-ctl.system-id[{&web-cart-sys-id}] AND
7
+ web-cart.web-key = dec(ip-web-key) AND
8
+ web-cart.order-num = "" AND
9
+ web-cart.web-type = "GrDirect"
10
+ NO-LOCK
11
+ BREAK BY web-cart.req-date
12
+ BY web-cart.offer-key
13
+ BY web-cart.location-key:`;
14
+ let expectedTokens = [
15
+ [
16
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FOR'
17
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
18
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'EACH'
19
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
20
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart'
21
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
22
+ { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
23
+ { "startIndex": 21, "endIndex": 105, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // 'FIELDS (SYSTEM-ID web-key bom-key kit-seq-num req-date line-num entry-key order-num)'
24
+ { "startIndex": 105, "endIndex": 107, "scopes": ["source.abl", "comment.block.source.abl"] }, // '*/'
25
+ { "startIndex": 107, "endIndex": 108, "scopes": ["source.abl"] }, // ' '
26
+ { "startIndex": 108, "endIndex": 113, "scopes": ["source.abl", "keyword.other.abl"] } // 'WHERE'
27
+ ],
28
+ [
29
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
30
+ { "startIndex": 4, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart.system-id'
31
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
32
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
33
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
34
+ { "startIndex": 25, "endIndex": 43, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'user-ctl.system-id'
35
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
36
+ { "startIndex": 44, "endIndex": 62, "scopes": ["source.abl", "meta.array.literal.abl", "storage.type.function.abl"] }, // '{&web-cart-sys-id}'
37
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
38
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl"] }, // ' '
39
+ { "startIndex": 64, "endIndex": 67, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
40
+ ],
41
+ [
42
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
43
+ { "startIndex": 4, "endIndex": 20, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart.web-key'
44
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
45
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
46
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
47
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'dec'
48
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
49
+ { "startIndex": 27, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'ip-web-key'
50
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
51
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
52
+ { "startIndex": 39, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
53
+ ],
54
+ [
55
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
56
+ { "startIndex": 4, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart.order-num'
57
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
58
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
59
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
60
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
61
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
62
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
63
+ { "startIndex": 28, "endIndex": 31, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
64
+ ],
65
+ [
66
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
67
+ { "startIndex": 4, "endIndex": 21, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart.web-type'
68
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
69
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
70
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
71
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
72
+ { "startIndex": 25, "endIndex": 33, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'GrDirect'
73
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
74
+ ],
75
+ [
76
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
77
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-LOCK'
78
+ ],
79
+ [
80
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
81
+ { "startIndex": 5, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'BREAK'
82
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
83
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'BY'
84
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
85
+ { "startIndex": 14, "endIndex": 31, "scopes": ["source.abl", "storage.data.table.abl"] } // 'web-cart.req-date'
86
+ ],
87
+ [
88
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
89
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'BY'
90
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
91
+ { "startIndex": 13, "endIndex": 31, "scopes": ["source.abl", "storage.data.table.abl"] } // 'web-cart.offer-key'
92
+ ],
93
+ [
94
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
95
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'BY'
96
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
97
+ { "startIndex": 13, "endIndex": 34, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'web-cart.location-key'
98
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
99
+ ]
100
+ ];
101
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
102
+ })
@@ -36,10 +36,54 @@ describe('', () => {
36
36
  { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
37
37
  { "startIndex": 73, "endIndex": 79, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'output'
38
38
  { "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
39
- { "startIndex": 80, "endIndex": 86, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'result'
39
+ { "startIndex": 80, "endIndex": 86, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'result'
40
40
  { "startIndex": 86, "endIndex": 87, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
41
41
  { "startIndex": 87, "endIndex": 88, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
42
42
  { "startIndex": 88, "endIndex": 89, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
43
43
  ];
44
44
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
45
45
  })
46
+
47
+ describe('', () => {
48
+ let statement = `run getOEM( host, port, metricPath, "" /* cred */, opts, output xStatus, output vlResult ).`;
49
+ let expectedTokens = [
50
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
51
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
52
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'getOEM'
53
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
54
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
55
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'host'
56
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
57
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
58
+ { "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'port'
59
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
60
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
61
+ { "startIndex": 24, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'metricPath'
62
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
63
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
64
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
65
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
66
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
67
+ { "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "comment.block.source.abl"] }, // '/*'
68
+ { "startIndex": 41, "endIndex": 47, "scopes": ["source.abl", "meta.function.arguments.abl", "comment.block.source.abl", "comment"] }, // ' cred '
69
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "comment.block.source.abl"] }, // '*/'
70
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
71
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
72
+ { "startIndex": 51, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'opts'
73
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
74
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
75
+ { "startIndex": 57, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'output'
76
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
77
+ { "startIndex": 64, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'xStatus'
78
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
79
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
80
+ { "startIndex": 73, "endIndex": 79, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'output'
81
+ { "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
82
+ { "startIndex": 80, "endIndex": 88, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'vlResult'
83
+ { "startIndex": 88, "endIndex": 89, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
84
+ { "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
85
+ { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
86
+ ];
87
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
88
+ })
89
+
@@ -0,0 +1,29 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `for each customer no-lock
6
+ while i < 10:`;
7
+ let expectedTokens = [
8
+ [
9
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
10
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
11
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
12
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
13
+ { "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'customer'
14
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
15
+ { "startIndex": 18, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] } // 'no-lock'
16
+ ],
17
+ [
18
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'while'
19
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
20
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'i'
21
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
22
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
23
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
24
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '10'
25
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
26
+ ]
27
+ ];
28
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
29
+ })
@@ -75,7 +75,7 @@ describe('', () => {
75
75
  { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
76
76
  { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
77
77
  { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
78
- { "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'IF'
78
+ { "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'IF'
79
79
  { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
80
80
  { "startIndex": 15, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'CAN-FIND'
81
81
  { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
@@ -5,8 +5,8 @@ describe('', () => {
5
5
  let statement = `set-size(memPtr) = 27.`;
6
6
  let expectedTokens = [
7
7
  { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
8
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
9
- { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'memPtr'
8
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
9
+ { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'memPtr'
10
10
  { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
11
11
  { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
12
12
  { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
@@ -17,3 +17,40 @@ describe('', () => {
17
17
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
18
18
  })
19
19
 
20
+ describe('', () => {
21
+ let statement = `set-size(objref:Value) = 27.`;
22
+ let expectedTokens = [
23
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
24
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
25
+ { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'objref'
26
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
27
+ { "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Value'
28
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
29
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
30
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
31
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
32
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
33
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
34
+ ];
35
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
36
+ })
37
+
38
+
39
+ describe('', () => {
40
+ let statement = `set-size(package.sub.type:Value) = 27.`;
41
+ let expectedTokens = [
42
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
43
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
44
+ { "startIndex": 9, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'package.sub.type'
45
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
46
+ { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Value'
47
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
48
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
49
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
50
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
51
+ { "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
52
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
53
+ ];
54
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
55
+ })
56
+
@@ -0,0 +1,51 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `' <INPUT TYPE = "HIDDEN" name=DVWebKey value="' GET-VALUE("DVWebKey":U) '">~n'`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
8
+ { "startIndex": 1, "endIndex": 49, "scopes": ["source.abl", "string.single.complex.abl"] }, // ' <INPUT TYPE = "HIDDEN" name=DVWebKey value="'
9
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
10
+ { "startIndex": 50, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
11
+ { "startIndex": 52, "endIndex": 61, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GET-VALUE'
12
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
13
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
14
+ { "startIndex": 63, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'DVWebKey'
15
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
16
+ { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
17
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
18
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl"] }, // ' '
19
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
20
+ { "startIndex": 77, "endIndex": 79, "scopes": ["source.abl", "string.single.complex.abl"] }, // '">'
21
+ { "startIndex": 79, "endIndex": 81, "scopes": ["source.abl", "string.single.complex.abl", "constant.character.escape.abl"] }, // '~n'
22
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] } // '''
23
+ ];
24
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
25
+ })
26
+
27
+
28
+
29
+ describe('', () => {
30
+ let statement = `' <INPUT TYPE = "HIDDEN" name=DVWebKey value="' SET-VALUE("DVWebKey":U) '">~n'`;
31
+ let expectedTokens = [
32
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
33
+ { "startIndex": 1, "endIndex": 49, "scopes": ["source.abl", "string.single.complex.abl"] }, // ' <INPUT TYPE = "HIDDEN" name=DVWebKey value="'
34
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
35
+ { "startIndex": 50, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
36
+ { "startIndex": 52, "endIndex": 61, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'SET-VALUE'
37
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
38
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
39
+ { "startIndex": 63, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'DVWebKey'
40
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
41
+ { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
42
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
43
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl"] }, // ' '
44
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
45
+ { "startIndex": 77, "endIndex": 79, "scopes": ["source.abl", "string.single.complex.abl"] }, // '">'
46
+ { "startIndex": 79, "endIndex": 81, "scopes": ["source.abl", "string.single.complex.abl", "constant.character.escape.abl"] }, // '~n'
47
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] } // '''
48
+ ];
49
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
50
+ })
51
+
@@ -38,15 +38,15 @@ describe('', () => {
38
38
  { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
39
39
  { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
40
40
  { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
41
- { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'if'
41
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'if'
42
42
  { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
43
43
  { "startIndex": 29, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
44
44
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
45
- { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'then'
45
+ { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'then'
46
46
  { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
47
47
  { "startIndex": 39, "endIndex": 44, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'false'
48
48
  { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
49
- { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'else'
49
+ { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'else'
50
50
  { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
51
51
  { "startIndex": 50, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
52
52
  { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
@@ -360,4 +360,95 @@ describe('', () => {
360
360
  ]
361
361
  ];
362
362
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
363
+ })
364
+
365
+ describe('', () => {
366
+ let statement = `IF (NOT PlanWeight AND StockSearchToSearchQtySKU <= StockSearchBrokenUpQtySKU) OR
367
+ ( PlanWeight AND StockSearchToSearchWeightNet <= StockSearchBrokenUpWeightNet ) THEN
368
+ Do:
369
+ IF ApplicationContext:DebugMessages THEN
370
+ MESSAGE " LOOP LEAVE --> HU to SKU conversion: enough broken-up".
371
+
372
+ ASSIGN oplLeave = TRUE.
373
+ END.`;
374
+ let expectedTokens = [
375
+ [
376
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
377
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
378
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
379
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'NOT'
380
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
381
+ { "startIndex": 8, "endIndex": 18, "scopes": ["source.abl", "variable.other.abl"] }, // 'PlanWeight'
382
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
383
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
384
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
385
+ { "startIndex": 23, "endIndex": 48, "scopes": ["source.abl", "variable.other.abl"] }, // 'StockSearchToSearchQtySKU'
386
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl"] }, // ' '
387
+ { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<='
388
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
389
+ { "startIndex": 52, "endIndex": 77, "scopes": ["source.abl", "variable.other.abl"] }, // 'StockSearchBrokenUpQtySKU'
390
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
391
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl"] }, // ' '
392
+ { "startIndex": 79, "endIndex": 81, "scopes": ["source.abl", "keyword.other.abl"] } // 'OR'
393
+ ],
394
+ [
395
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
396
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
397
+ { "startIndex": 2, "endIndex": 12, "scopes": ["source.abl", "variable.other.abl"] }, // 'PlanWeight'
398
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
399
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
400
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
401
+ { "startIndex": 17, "endIndex": 45, "scopes": ["source.abl", "variable.other.abl"] }, // 'StockSearchToSearchWeightNet'
402
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
403
+ { "startIndex": 46, "endIndex": 48, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<='
404
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl"] }, // ' '
405
+ { "startIndex": 49, "endIndex": 77, "scopes": ["source.abl", "variable.other.abl"] }, // 'StockSearchBrokenUpWeightNet'
406
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl"] }, // ' '
407
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
408
+ { "startIndex": 79, "endIndex": 80, "scopes": ["source.abl"] }, // ' '
409
+ { "startIndex": 80, "endIndex": 84, "scopes": ["source.abl", "keyword.other.abl"] } // 'THEN'
410
+ ],
411
+ [
412
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'Do'
413
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
414
+ ],
415
+ [
416
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
417
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
418
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
419
+ { "startIndex": 5, "endIndex": 23, "scopes": ["source.abl", "variable.other.abl"] }, // 'ApplicationContext'
420
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
421
+ { "startIndex": 24, "endIndex": 37, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'DebugMessages'
422
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
423
+ { "startIndex": 38, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] } // 'THEN'
424
+ ],
425
+ [
426
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
427
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'MESSAGE'
428
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
429
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
430
+ { "startIndex": 13, "endIndex": 67, "scopes": ["source.abl", "string.double.complex.abl"] }, // ' LOOP LEAVE --> HU to SKU conversion: enough broken-up'
431
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
432
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
433
+ ],
434
+ [
435
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
436
+ ],
437
+ [
438
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
439
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
440
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
441
+ { "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'oplLeave'
442
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
443
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
444
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
445
+ { "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "constant.language.abl"] }, // 'TRUE'
446
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
447
+ ],
448
+ [
449
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
450
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
451
+ ]
452
+ ];
453
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
363
454
  })
@@ -241,3 +241,61 @@ set. `;
241
241
  ];
242
242
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
243
243
  })
244
+
245
+ describe('', () => {
246
+ let statement = `DEFINE PUBLIC PROPERTY ATHING AS IHTTPCLIENT NO-UNDO
247
+ GET .`;
248
+
249
+ let expectedTokens = [
250
+ [
251
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
252
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
253
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'public'
254
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
255
+ { "startIndex": 14, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'property'
256
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
257
+ { "startIndex": 23, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "entity.name.function.abl"] }, // 'AThing'
258
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
259
+ { "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
260
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
261
+ { "startIndex": 33, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'IHttpClient'
262
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
263
+ { "startIndex": 45, "endIndex": 52, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
264
+ ],
265
+ [
266
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'get'
267
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
268
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
269
+ ]
270
+ ];
271
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
272
+ })
273
+
274
+ describe('', () => {
275
+ let statement = `defINE PUBLIC PROPErty AThing as IHttpClient no-undo
276
+ SEt. `;
277
+
278
+ let expectedTokens = [
279
+ [
280
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
281
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
282
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'public'
283
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
284
+ { "startIndex": 14, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'property'
285
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
286
+ { "startIndex": 23, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "entity.name.function.abl"] }, // 'AThing'
287
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
288
+ { "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
289
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
290
+ { "startIndex": 33, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'IHttpClient'
291
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
292
+ { "startIndex": 45, "endIndex": 52, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
293
+ ],
294
+ [
295
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'set'
296
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] }, // '.'
297
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl"] } // ' '
298
+ ]
299
+ ];
300
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
301
+ })