abl-tmlanguage 1.2.0 → 1.3.1

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.
Files changed (67) hide show
  1. package/README.md +43 -1
  2. package/abl.tmLanguage.json +1461 -474
  3. package/package.json +1 -1
  4. package/spec/annotations/annotation.spec.js +232 -0
  5. package/spec/blocks/finally-blocks.spec.js +90 -0
  6. package/spec/blocks/on-quit.spec.js +59 -0
  7. package/spec/comments/comment-in-block-statement.spec.js +142 -0
  8. package/spec/comments/comment-in-function-args.spec.js +45 -0
  9. package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
  10. package/spec/db-table-and-field/field-in-function.spec.js +58 -0
  11. package/spec/db-table-and-field/fields-except.spec.js +69 -0
  12. package/spec/db-table-and-field/foreach.spec.js +588 -0
  13. package/spec/db-table-and-field/issue#88.spec.js +120 -0
  14. package/spec/define-buffer/create-buffer.spec.js +110 -0
  15. package/spec/define-enum/type-name.spec.js +200 -0
  16. package/spec/define-event/simple-single-line.spec.js +61 -0
  17. package/spec/define-parameter/simple-single-line.spec.js +40 -0
  18. package/spec/define-property/property-getter.spec.js +165 -0
  19. package/spec/define-stream/simple-single-line.spec.js +3 -4
  20. package/spec/define-temp-table/define-dataset.spec.js +21 -0
  21. package/spec/define-temp-table/define-index.spec.js +272 -0
  22. package/spec/define-variable/simple-single-line.spec.js +81 -0
  23. package/spec/do/do-blocks.spec.js +121 -29
  24. package/spec/do/issue#3.spec.js +5 -3
  25. package/spec/do/stop-after.spec.js +79 -0
  26. package/spec/function-call/nested-functions.spec.js +246 -0
  27. package/spec/function-call/pass-table.spec.js +35 -0
  28. package/spec/function-call/set-size.spec.js +19 -0
  29. package/spec/function-call/vscode-abl-issue#19.spec.js +6 -6
  30. package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
  31. package/spec/include/unnamed-arguments.spec.js +39 -0
  32. package/spec/include/vscode-abl-issue#45.spec.js +2 -2
  33. package/spec/include/vscode-abl-issue#77.spec.js +129 -0
  34. package/spec/include/vscode-abl-issue#80.spec.js +33 -19
  35. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
  36. package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
  37. package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
  38. package/spec/method-attribute-property-call/method-call.spec.js +112 -0
  39. package/spec/method-attribute-property-call/unqualified-method-call.spec.js +42 -0
  40. package/spec/method-definition/constructor.spec.js +9 -9
  41. package/spec/method-definition/method.spec.js +139 -4
  42. package/spec/misc-statements/case-statement.spec.js +96 -0
  43. package/spec/misc-statements/copy-lob.spec.js +137 -0
  44. package/spec/misc-statements/def-in-name.spec.js +20 -0
  45. package/spec/misc-statements/event-subscribe.spec.js +309 -0
  46. package/spec/misc-statements/if-then.spec.js +212 -0
  47. package/spec/misc-statements/release.spec.js +42 -0
  48. package/spec/misc-statements/return-statement.spec.js +53 -0
  49. package/spec/operators/operators.spec.js +78 -0
  50. package/spec/procedure-definition/empty-proc.spec.js +107 -1
  51. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +1 -1
  52. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +2 -2
  53. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +2 -2
  54. package/spec/run-statement/run-statement.spec.js +162 -0
  55. package/spec/strings/translation-attribute.spec.js +52 -0
  56. package/spec/strings/vscode-abl-issue#11.spec.js +12 -13
  57. package/spec/strings/vscode-abl-issue#28.spec.js +1 -1
  58. package/spec/type-name/argument.spec.js +3 -3
  59. package/spec/type-name/cast.spec.js +3 -3
  60. package/spec/type-name/define-class.spec.js +67 -70
  61. package/spec/type-name/define-property.spec.js +48 -106
  62. package/spec/type-name/define-variable-property.spec.js +40 -40
  63. package/spec/type-name/get-class.spec.js +18 -18
  64. package/spec/type-name/new.spec.js +2 -3
  65. package/spec/type-name/parameter-as.spec.js +68 -22
  66. package/spec/type-name/type-name.spec.js +879 -0
  67. package/spec/type-name/type-name-spec.js +0 -587
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Textmate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "repository": {
@@ -0,0 +1,232 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `@annotation (name="value"). `;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
8
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
9
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
10
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
11
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
12
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
13
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'value'
14
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
15
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
16
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
17
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl"] } // ' '
18
+ ];
19
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
20
+ })
21
+
22
+ describe('', () => {
23
+ let statement = ` @annotation.
24
+ define variable i as int.`;
25
+ let expectedTokens = [
26
+ [
27
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
28
+ { "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
29
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
30
+ ],
31
+ [
32
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
33
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
34
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
35
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
36
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'i'
37
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
38
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
39
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
40
+ { "startIndex": 21, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'int'
41
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
42
+ ]
43
+ ];
44
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
45
+ })
46
+
47
+ describe('', () => {
48
+ let statement = `@annotation (name="value", two="2", three='3'). `;
49
+ let expectedTokens = [
50
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
51
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
52
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
53
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
54
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
55
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
56
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'value'
57
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
58
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
59
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
60
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'two'
61
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
62
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
63
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '2'
64
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
65
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
66
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
67
+ { "startIndex": 36, "endIndex": 47, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'three='3').'
68
+ { "startIndex": 47, "endIndex": 50, "scopes": ["source.abl", "meta.declaration.annotation.abl"] } // ' '
69
+ ];
70
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
71
+ })
72
+
73
+ describe('', () => {
74
+ let statement = `@annotation (two
75
+ = "2"
76
+ , three
77
+ =
78
+ '3'
79
+ ).
80
+ define temp-table tt like Customer.`;
81
+ let expectedTokens = [
82
+ [
83
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
84
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
85
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
86
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] } // 'two'
87
+ ],
88
+ [
89
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
90
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
91
+ { "startIndex": 5, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
92
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
93
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '2'
94
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
95
+ ],
96
+ [
97
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
98
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
99
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
100
+ { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] } // 'three'
101
+ ],
102
+ [
103
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
104
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] } // '='
105
+ ],
106
+ [
107
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
108
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
109
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl"] }, // '3'
110
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] } // '''
111
+ ],
112
+ [
113
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
114
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
115
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
116
+ ],
117
+ [
118
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
119
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
120
+ { "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
121
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
122
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'tt'
123
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
124
+ { "startIndex": 21, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
125
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
126
+ { "startIndex": 26, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'Customer'
127
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
128
+ ]];
129
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
130
+ })
131
+
132
+
133
+ describe('', () => {
134
+ let statement = `@RestAddress (type="collection", address="/Customers", tables="eCustomer", id="CustNum",
135
+ fields="Name,City,Country", canCreate="true",
136
+ links="orders:/Customers/~{CustNum}/Orders,salesrep:/Salesreps/~{SalesRep}").`;
137
+ let expectedTokens = [
138
+ [
139
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@RestAddress'
140
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
141
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
142
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'type'
143
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
144
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
145
+ { "startIndex": 20, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'collection'
146
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
147
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
148
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
149
+ { "startIndex": 33, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'address'
150
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
151
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
152
+ { "startIndex": 42, "endIndex": 52, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '/Customers'
153
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
154
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
155
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
156
+ { "startIndex": 55, "endIndex": 61, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'tables'
157
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
158
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
159
+ { "startIndex": 63, "endIndex": 72, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'eCustomer'
160
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
161
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
162
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
163
+ { "startIndex": 75, "endIndex": 77, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'id'
164
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
165
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
166
+ { "startIndex": 79, "endIndex": 86, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'CustNum'
167
+ { "startIndex": 86, "endIndex": 87, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
168
+ { "startIndex": 87, "endIndex": 88, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
169
+ ],
170
+ [
171
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
172
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'fields'
173
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
174
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
175
+ { "startIndex": 10, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'Name,City,Country'
176
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
177
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
178
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
179
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'canCreate'
180
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
181
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
182
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'true'
183
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
184
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
185
+ ],
186
+ [
187
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
188
+ { "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'links'
189
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
190
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
191
+ { "startIndex": 9, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'orders:/Customers/'
192
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~{'
193
+ { "startIndex": 29, "endIndex": 65, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'CustNum}/Orders,salesrep:/Salesreps/'
194
+ { "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~{'
195
+ { "startIndex": 67, "endIndex": 76, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'SalesRep}'
196
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
197
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
198
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
199
+ ]
200
+ ];
201
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
202
+ })
203
+
204
+
205
+ describe('', () => {
206
+ let statement = `@AnnotationName(attrib1="class-tag,store",
207
+ attrib2="bob").`;
208
+ let expectedTokens = [
209
+ [
210
+ { "startIndex": 0, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@AnnotationName'
211
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
212
+ { "startIndex": 16, "endIndex": 23, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'attrib1'
213
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
214
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
215
+ { "startIndex": 25, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'class-tag,store'
216
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
217
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
218
+ ],
219
+ [
220
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
221
+ { "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'attrib2'
222
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
223
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
224
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'bob'
225
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
226
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
227
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
228
+ ]
229
+ ];
230
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
231
+ })
232
+
@@ -0,0 +1,90 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `FINALLY:
6
+ ASSIGN oBusinessEntityDescriptor = ?.
7
+ END FINALLY.`;
8
+ let expectedTokens = [
9
+ [
10
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
11
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
12
+ ],
13
+ [
14
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
15
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
16
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
17
+ { "startIndex": 11, "endIndex": 36, "scopes": ["source.abl", "variable.other.abl"] }, // 'oBusinessEntityDescriptor'
18
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
19
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
20
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
21
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "constant.language.abl"] }, // '?'
22
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
23
+ ],
24
+ [
25
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
26
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
27
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FINALLY'
28
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
29
+ ]
30
+ ];
31
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
32
+ })
33
+
34
+ describe('', () => {
35
+ let statement = `FINALLY:
36
+ END. // no finally on END`;
37
+ let expectedTokens = [
38
+ [
39
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
40
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
41
+ ],
42
+ [
43
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
44
+ { "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
45
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
46
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
47
+ { "startIndex": 7, "endIndex": 27, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no finally on END'
48
+ ]
49
+ ];
50
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
51
+ })
52
+
53
+ describe('', () => {
54
+ let statement = `finally.
55
+ if valid-object(oMenu) then delete object oMenu no-error.
56
+ end finally.`;
57
+ let expectedTokens = [
58
+ [
59
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'finally'
60
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
61
+ ],
62
+ [
63
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
64
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
65
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
66
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'valid-object'
67
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
68
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oMenu'
69
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
70
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
71
+ { "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
72
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
73
+ { "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
74
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
75
+ { "startIndex": 37, "endIndex": 43, "scopes": ["source.abl", "keyword.other.abl"] }, // 'object'
76
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl"] }, // ' '
77
+ { "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "variable.other.abl"] }, // 'oMenu'
78
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
79
+ { "startIndex": 50, "endIndex": 58, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
80
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
81
+ ],
82
+ [
83
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
84
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
85
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'finally'
86
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
87
+ ]
88
+ ];
89
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
90
+ })
@@ -0,0 +1,59 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `do on error undo, leave
6
+ on endkey undo, leave
7
+ on stop undo, leave
8
+ on quit undo, leave:`;
9
+ let expectedTokens = [
10
+ [
11
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
12
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
13
+ { "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
14
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
15
+ { "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'error'
16
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
17
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
18
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
19
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
20
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
21
+ ],
22
+ [
23
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
24
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
25
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
26
+ { "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'endkey'
27
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
28
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
29
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
30
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
31
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
32
+ ],
33
+ [
34
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
35
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
36
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
37
+ { "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'stop'
38
+ { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
39
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
40
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
41
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
42
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
43
+ ],
44
+ [
45
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
46
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
47
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
48
+ { "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'quit'
49
+ { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
50
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
51
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
52
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
53
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'leave'
54
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
55
+ ]
56
+ ]
57
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
58
+ })
59
+
@@ -0,0 +1,142 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `DO
6
+ /* Mike Fechner, Consultingwerk Ltd. 01.05.2013
7
+ Bug SCL-31: STOP-AFTER support
8
+ Variable stop-after is not supported on OE10.2B */
9
+ &IF PROVERSION NE "10.2B" &THEN
10
+ STOP-AFTER iStopAfter
11
+ &ENDIF
12
+ &IF "{&CATCH-STOP}" EQ "" &THEN ON STOP UNDO, RETURN ERROR NEW StopConditionException() &ENDIF:`;
13
+ let expectedTokens = [
14
+ [
15
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] } // 'DO'
16
+ ],
17
+ [
18
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
19
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] }, // '/*'
20
+ { "startIndex": 10, "endIndex": 56, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] } // ' Mike Fechner, Consultingwerk Ltd. 01.05.2013'
21
+ ],
22
+ [
23
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] } // ' Bug SCL-31: STOP-AFTER support'
24
+ ],
25
+ [
26
+ { "startIndex": 0, "endIndex": 59, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] }, // ' Variable stop-after is not supported on OE10.2B '
27
+ { "startIndex": 59, "endIndex": 61, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] } // '*/'
28
+ ],
29
+ [
30
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
31
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "storage.type.function.abl"] }, // '&IF'
32
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
33
+ { "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'PROVERSION'
34
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
35
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // 'NE'
36
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
37
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
38
+ { "startIndex": 27, "endIndex": 32, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl"] }, // '10.2B'
39
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
40
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
41
+ { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "meta.block.abl", "storage.type.function.abl"] } // '&THEN'
42
+ ],
43
+ [
44
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
45
+ { "startIndex": 11, "endIndex": 21, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'STOP-AFTER'
46
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
47
+ { "startIndex": 22, "endIndex": 32, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] } // 'iStopAfter'
48
+ ],
49
+ [
50
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
51
+ { "startIndex": 8, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "storage.type.function.abl"] } // '&ENDIF'
52
+ ],
53
+ [
54
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
55
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "storage.type.function.abl"] }, // '&IF'
56
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
57
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
58
+ { "startIndex": 16, "endIndex": 29, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl"] }, // '{&CATCH-STOP}'
59
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
60
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
61
+ { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // 'EQ'
62
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
63
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
64
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.block.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
65
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
66
+ { "startIndex": 37, "endIndex": 42, "scopes": ["source.abl", "meta.block.abl", "storage.type.function.abl"] }, // '&THEN'
67
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
68
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'ON'
69
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
70
+ { "startIndex": 46, "endIndex": 50, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'STOP'
71
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
72
+ { "startIndex": 51, "endIndex": 55, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'UNDO'
73
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
74
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
75
+ { "startIndex": 57, "endIndex": 63, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'RETURN'
76
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
77
+ { "startIndex": 64, "endIndex": 69, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'ERROR'
78
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
79
+ { "startIndex": 70, "endIndex": 73, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'NEW'
80
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
81
+ { "startIndex": 74, "endIndex": 106, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "entity.name.type.abl"] } // 'StopConditionException() &ENDIF:'
82
+ ]
83
+ ];
84
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
85
+ })
86
+
87
+ describe('', () => {
88
+ let statement = `do /* something coming */ stop-after 10:
89
+ end.`;
90
+ let expectedTokens = [
91
+ [
92
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
93
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
94
+ { "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] }, // '/*'
95
+ { "startIndex": 5, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] }, // ' something coming '
96
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] }, // '*/'
97
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
98
+ { "startIndex": 26, "endIndex": 36, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'stop-after'
99
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
100
+ { "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '10'
101
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
102
+ ],
103
+ [
104
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
105
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
106
+ ]
107
+ ];
108
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
109
+ })
110
+
111
+ describe('', () => {
112
+ let statement = `repeat while i < 10 /* only this
113
+ many digits */ :
114
+ end.`;
115
+ let expectedTokens = [
116
+ [
117
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'repeat'
118
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
119
+ { "startIndex": 7, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'while'
120
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
121
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'i'
122
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
123
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // '<'
124
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
125
+ { "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '10'
126
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
127
+ { "startIndex": 20, "endIndex": 22, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] }, // '/*'
128
+ { "startIndex": 22, "endIndex": 33, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] } // ' only this'
129
+ ],
130
+ [
131
+ { "startIndex": 0, "endIndex": 35, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl", "comment"] }, // ' many digits '
132
+ { "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "meta.block.abl", "comment.block.source.abl"] }, // '*/'
133
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
134
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
135
+ ],
136
+ [
137
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
138
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
139
+ ]
140
+ ];
141
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
142
+ })