abl-tmlanguage 1.3.10 → 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,21 @@
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
+
11
+ 1.3.11
12
+ ======
13
+
14
+ - Fix CREATE ALIAS highlight (#53)
15
+ - Fix IF in variable name (#52)
16
+ - Fix scope of ROWID function args
17
+ - Allow word breaks (eg commas) before constants
18
+
1
19
  1.3.10
2
20
  ======
3
21
  - Too many changes to be listed here...
@@ -433,6 +433,15 @@
433
433
  {
434
434
  "include": "#comment"
435
435
  },
436
+ {
437
+ "include": "#abl-function-variable-arg"
438
+ },
439
+ {
440
+ "include": "#while-expression"
441
+ },
442
+ {
443
+ "include": "#rowid-function"
444
+ },
436
445
  {
437
446
  "include": "#var-statement"
438
447
  },
@@ -987,6 +996,32 @@
987
996
  }
988
997
  ]
989
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
+ },
990
1025
  "get-class": {
991
1026
  "name": "meta.function-call.abl",
992
1027
  "begin": "(?i)\\s*(get-class)\\s*(\\()",
@@ -1195,6 +1230,12 @@
1195
1230
  },
1196
1231
  {
1197
1232
  "include": "#db-dot-table-dot-field"
1233
+ },
1234
+ {
1235
+ "include": "#while-expression"
1236
+ },
1237
+ {
1238
+ "include": "#comment"
1198
1239
  }
1199
1240
  ]
1200
1241
  },
@@ -1416,7 +1457,7 @@
1416
1457
  ]
1417
1458
  },
1418
1459
  "property-get-set-super": {
1419
- "match": "\\b(get|set)\\s+(super)\\s*(?=\\.)",
1460
+ "match": "(?i)\\b(get|set)\\s+(super)\\s*(?=\\.)",
1420
1461
  "comment": "This is a call to the parent class' property getter or setter",
1421
1462
  "captures": {
1422
1463
  "1": {
@@ -1429,7 +1470,7 @@
1429
1470
  },
1430
1471
  "property-get-set-empty": {
1431
1472
  "comment": "This rule is needed since for 'plain' gets and sets, there's no END",
1432
- "match": "\\b(get|set)\\s*(?=\\.)",
1473
+ "match": "\\b([Gg][Ee][Tt]|[Ss][Ee][Tt])\\s*(?=\\.)",
1433
1474
  "captures": {
1434
1475
  "1": {
1435
1476
  "name": "keyword.other.abl"
@@ -1437,13 +1478,13 @@
1437
1478
  }
1438
1479
  },
1439
1480
  "property-get-set-block": {
1440
- "begin": "(?i)\\s*(?<!:)\\s*(get|set)\\b",
1481
+ "begin": "\\s*(?<!:)\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])\\b(?![#$\\-_%&])",
1441
1482
  "beginCaptures": {
1442
1483
  "1": {
1443
1484
  "name": "keyword.other.abl"
1444
1485
  }
1445
1486
  },
1446
- "end": "(?i)\\s*(end)\\s*(get|set)?\\s*(?=\\.)\\s*",
1487
+ "end": "\\s*([Ee][Nn][Dd])\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])?\\s*(?=\\.)\\s*",
1447
1488
  "comment": "The end capture does a lookahead on . so that the 'define' capture can end ",
1448
1489
  "endCaptures": {
1449
1490
  "1": {
@@ -2006,7 +2047,7 @@
2006
2047
  }
2007
2048
  },
2008
2049
  "comment": "This match just gets the definition of the property; the getter and setter are handled separately",
2009
- "end": "(?i)\\s*(?=get|set)",
2050
+ "end": "\\s*(?=[Gg][Ee][Tt]|[Ss][Ee][Tt])",
2010
2051
  "patterns": [
2011
2052
  {
2012
2053
  "include": "#property-as"
@@ -2125,7 +2166,7 @@
2125
2166
  "name": "keyword.other.abl"
2126
2167
  }
2127
2168
  },
2128
- "end": "(=\\.)",
2169
+ "end": "(?=\\.)",
2129
2170
  "patterns": [
2130
2171
  {
2131
2172
  "include": "#keywords"
@@ -3203,7 +3244,7 @@
3203
3244
  ]
3204
3245
  },
3205
3246
  "if-then": {
3206
- "begin": "(?i)\\s*(if)\\s*",
3247
+ "begin": "(?i)\\b(if)\\b",
3207
3248
  "beginCaptures": {
3208
3249
  "1": {
3209
3250
  "name": "keyword.other.abl"
@@ -3347,6 +3388,9 @@
3347
3388
  {
3348
3389
  "include": "#handle-methods"
3349
3390
  },
3391
+ {
3392
+ "include": "#keywords"
3393
+ },
3350
3394
  {
3351
3395
  "include": "#expression"
3352
3396
  },
@@ -3769,7 +3813,7 @@
3769
3813
  "name": "constant.language.abl"
3770
3814
  },
3771
3815
  "constant": {
3772
- "match": "(?i)(?<=^|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%])",
3816
+ "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%])",
3773
3817
  "name": "constant.language.abl"
3774
3818
  },
3775
3819
  "punctuation-colon": {
@@ -3863,6 +3907,23 @@
3863
3907
  }
3864
3908
  }
3865
3909
  },
3910
+ "rowid-function": {
3911
+ "match": "(?i)\\s*(rowid)\\s*(\\()\\s*([a-zA-Z_][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*(\\))",
3912
+ "captures": {
3913
+ "1": {
3914
+ "name": "support.function.abl"
3915
+ },
3916
+ "2": {
3917
+ "name": "meta.brace.round.js"
3918
+ },
3919
+ "3": {
3920
+ "name": "storage.data.table.abl"
3921
+ },
3922
+ "5": {
3923
+ "name": "meta.brace.round.js"
3924
+ }
3925
+ }
3926
+ },
3866
3927
  "new-record": {
3867
3928
  "comment": "This scope MUST be called after before type-reference (especially new-class) to avoid types being captured as tables",
3868
3929
  "patterns": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "repository": {
@@ -62,7 +62,7 @@ end finally.`;
62
62
  [
63
63
  { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
64
64
  { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
65
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
65
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
66
66
  { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'valid-object'
67
67
  { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
68
68
  { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oMenu'
@@ -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
+
@@ -15,7 +15,7 @@ describe('', () => {
15
15
  { "startIndex": 32, "endIndex": 40, "scopes": ["source.abl", "keyword.other.abl"] }, // 'DATABASE'
16
16
  { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
17
17
  { "startIndex": 41, "endIndex": 60, "scopes": ["source.abl", "storage.data.database.abl"] }, // 'logical-name-string'
18
- { "startIndex": 60, "endIndex": 62, "scopes": ["source.abl"] } // '.'
18
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
19
19
  ];
20
20
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
21
21
  })
@@ -46,7 +46,7 @@ describe('', () => {
46
46
  { "startIndex": 55, "endIndex": 65, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'expression'
47
47
  { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
48
48
  { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
49
- { "startIndex": 67, "endIndex": 69, "scopes": ["source.abl"] } // '.'
49
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
50
50
  ];
51
51
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
52
52
  })
@@ -71,7 +71,7 @@ describe('', () => {
71
71
  { "startIndex": 47, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'tt.fld1'
72
72
  { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
73
73
  { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
74
- { "startIndex": 56, "endIndex": 58, "scopes": ["source.abl"] } // '.'
74
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
75
75
  ];
76
76
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
77
77
  })
@@ -95,7 +95,36 @@ describe('', () => {
95
95
  { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
96
96
  { "startIndex": 42, "endIndex": 53, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'user_dbname'
97
97
  { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
98
- { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl"] } // '.'
98
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
99
+ ];
100
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
101
+ })
102
+
103
+ describe('', () => {
104
+ let statement = `// Valid comment
105
+ CREATE ALIAS xx1 FOR DATABASE xx2.
106
+ // Not correctly highlighted`;
107
+ let expectedTokens = [
108
+ [
109
+ { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// Valid comment'
110
+ ],
111
+ [
112
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'CREATE'
113
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
114
+ { "startIndex": 7, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ALIAS'
115
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
116
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "storage.data.database.abl"] }, // 'xx1'
117
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
118
+ { "startIndex": 17, "endIndex": 20, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FOR'
119
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
120
+ { "startIndex": 21, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'DATABASE'
121
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
122
+ { "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "storage.data.database.abl"] }, // 'xx2'
123
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
124
+ ],
125
+ [
126
+ { "startIndex": 0, "endIndex": 28, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// Not correctly highlighted'
127
+ ]
99
128
  ];
100
129
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
101
130
  })