abl-tmlanguage 1.1.3 → 1.3.0

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 (71) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +54 -1
  3. package/abl.tmLanguage.json +3534 -230
  4. package/azure-pipelines.yml +3 -2
  5. package/package.json +7 -6
  6. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
  7. package/spec/annotations/annotation.spec.js +232 -0
  8. package/spec/array-extent/issue#5.spec.js +18 -18
  9. package/spec/blocks/finally-blocks.spec.js +90 -0
  10. package/spec/blocks/on-quit.spec.js +59 -0
  11. package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
  12. package/spec/db-table-and-field/fields-except.spec.js +69 -0
  13. package/spec/db-table-and-field/foreach.spec.js +588 -0
  14. package/spec/db-table-and-field/issue#88.spec.js +120 -0
  15. package/spec/define-buffer/create-buffer.spec.js +110 -0
  16. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  17. package/spec/define-parameter/simple-single-line.spec.js +140 -100
  18. package/spec/define-stream/simple-single-line.spec.js +32 -31
  19. package/spec/define-temp-table/define-index.spec.js +138 -0
  20. package/spec/define-variable/extent.spec.js +228 -0
  21. package/spec/define-variable/issue#6.spec.js +256 -198
  22. package/spec/define-variable/issue#9.spec.js +38 -32
  23. package/spec/define-variable/simple-single-line.spec.js +168 -87
  24. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  25. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  26. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  27. package/spec/do/do-blocks.spec.js +224 -0
  28. package/spec/do/issue#3.spec.js +69 -60
  29. package/spec/function-call/nested-functions.spec.js +128 -0
  30. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  31. package/spec/global-scoped-define/global-define.spec.js +11 -11
  32. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  33. package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
  34. package/spec/include/vscode-abl-issue#45.spec.js +15 -15
  35. package/spec/include/vscode-abl-issue#77.spec.js +129 -0
  36. package/spec/include/vscode-abl-issue#80.spec.js +40 -27
  37. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
  38. package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
  39. package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
  40. package/spec/method-attribute-property-call/method-call.spec.js +112 -0
  41. package/spec/method-definition/constructor.spec.js +174 -0
  42. package/spec/method-definition/method.spec.js +320 -0
  43. package/spec/misc-statements/case-statement.spec.js +96 -0
  44. package/spec/misc-statements/copy-lob.spec.js +137 -0
  45. package/spec/misc-statements/if-then.spec.js +170 -0
  46. package/spec/misc-statements/return-statement.spec.js +53 -0
  47. package/spec/operators/operators.spec.js +78 -0
  48. package/spec/procedure-definition/empty-proc.spec.js +101 -18
  49. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  50. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  51. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  52. package/spec/run-statement/run-statement.spec.js +162 -0
  53. package/spec/shared.js +84 -42
  54. package/spec/strings/translation-attribute.spec.js +52 -0
  55. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  56. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  57. package/spec/type-name/argument.spec.js +209 -0
  58. package/spec/type-name/cast.spec.js +165 -0
  59. package/spec/type-name/define-class.spec.js +468 -0
  60. package/spec/type-name/define-enum.spec.js +44 -0
  61. package/spec/type-name/define-interface.spec.js +159 -0
  62. package/spec/type-name/define-property.spec.js +301 -0
  63. package/spec/type-name/define-temp-table.spec.js +434 -0
  64. package/spec/type-name/define-type-spec.js +435 -0
  65. package/spec/type-name/define-variable-property.spec.js +264 -0
  66. package/spec/type-name/define-variable.spec.js +504 -0
  67. package/spec/type-name/get-class.spec.js +91 -0
  68. package/spec/type-name/new.spec.js +126 -0
  69. package/spec/type-name/parameter-as.spec.js +838 -0
  70. package/spec/type-name/type-name.spec.js +879 -0
  71. package/spec/type-name/using.spec.js +115 -0
@@ -0,0 +1,879 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `GET-CLASS(foo.bar.baz) `;
6
+
7
+ let expectedTokens = [
8
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'GET-CLASS'
9
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
10
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
11
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
12
+ { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl"] } // ' '
13
+ ];
14
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
15
+ })
16
+
17
+ describe('', () => {
18
+ let statement = `GET-CLASS ( foo.bar.baz ) `;
19
+
20
+ let expectedTokens = [
21
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'GET-CLASS'
22
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
23
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
24
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
25
+ { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
26
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
27
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
28
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] } // ' '
29
+ ];
30
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
31
+ })
32
+
33
+ describe('', () => {
34
+ let statement = `CLASS foo.bar.baz :`;
35
+
36
+ let expectedTokens = [
37
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
38
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
39
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
40
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
41
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
42
+ ];
43
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
44
+ })
45
+
46
+ describe('', () => {
47
+ let statement = `CLASS foo.bar.baz ABSTRACT:`;
48
+
49
+ let expectedTokens = [
50
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
51
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
52
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
53
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
54
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'ABSTRACT'
55
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
56
+ ];
57
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
58
+ })
59
+
60
+ describe('', () => {
61
+ let statement = `CLASS foo.bar.baz :`;
62
+
63
+ let expectedTokens = [
64
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
65
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
66
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
67
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
68
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
69
+ ];
70
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
71
+ })
72
+
73
+ describe('', () => {
74
+ let statement = `ASSIGN x = NEW foo.bar.baz()`;
75
+
76
+ let expectedTokens = [
77
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
78
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
79
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
80
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
81
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
82
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
83
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEW'
84
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
85
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
86
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
87
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
88
+ ];
89
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
90
+ })
91
+
92
+ describe('', () => {
93
+ let statement = `ASSIGN x = NEW foo.bar.baz(true, ?)`;
94
+
95
+ let expectedTokens = [
96
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
97
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
98
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
99
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
100
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
101
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
102
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEW'
103
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
104
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
105
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
106
+ { "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
107
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
108
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
109
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
110
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
111
+ ];
112
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
113
+ })
114
+
115
+ describe('', () => {
116
+ let statement = `ASSIGN x = NEW "foo.bar.baz" (true, ?)`;
117
+
118
+ let expectedTokens = [
119
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
120
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
121
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
122
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
123
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
124
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
125
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEW'
126
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
127
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
128
+ { "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'foo.bar.baz'
129
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
130
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
131
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
132
+ { "startIndex": 30, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
133
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
134
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
135
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
136
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
137
+ ];
138
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
139
+ })
140
+
141
+
142
+ describe('', () => {
143
+ let statement = `ENUM package.type :`;
144
+
145
+ let expectedTokens = [
146
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] }, // 'ENUM'
147
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
148
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] }, // 'package.type'
149
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
150
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] } // ':'
151
+ ];
152
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
153
+ })
154
+
155
+ describe('', () => {
156
+ let statement = `ENUM package.type flags :`;
157
+
158
+ let expectedTokens = [
159
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] }, // 'ENUM'
160
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
161
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] }, // 'package.type'
162
+ { "startIndex": 17, "endIndex": 20, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
163
+ { "startIndex": 20, "endIndex": 25, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] }, // 'flags'
164
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
165
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] } // ':'
166
+ ];
167
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
168
+ })
169
+
170
+ describe('', () => {
171
+ let statement = `ENUM package.flagsenum flags:`;
172
+
173
+ let expectedTokens = [
174
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] }, // 'ENUM'
175
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
176
+ { "startIndex": 5, "endIndex": 22, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] }, // 'package.flagsenum'
177
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.enum.abl"] }, // ' '
178
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] }, // 'flags'
179
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] } // ':'
180
+ ];
181
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
182
+ })
183
+
184
+ describe('', () => {
185
+ let statement = `using foo.bar.baz.`;
186
+
187
+ let expectedTokens = [
188
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'using'
189
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
190
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
191
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.using.abl", "punctuation.terminator.abl"] } // '.'
192
+ ];
193
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
194
+ })
195
+
196
+ describe('', () => {
197
+ let statement = `using foo.bar.baz from propath.`;
198
+
199
+ let expectedTokens = [
200
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'using'
201
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
202
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
203
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
204
+ { "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'from'
205
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
206
+ { "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'propath'
207
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.using.abl", "punctuation.terminator.abl"] } // '.'
208
+ ];
209
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
210
+ })
211
+
212
+ describe('', () => {
213
+ let statement = `using foo.bar.* from propath.`;
214
+
215
+ let expectedTokens = [
216
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'using'
217
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
218
+ { "startIndex": 6, "endIndex": 15, "scopes": ["source.abl", "meta.using.abl", "entity.name.package.abl"] }, // 'foo.bar.*'
219
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
220
+ { "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'from'
221
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
222
+ { "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'propath'
223
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.using.abl", "punctuation.terminator.abl"] } // '.'
224
+ ];
225
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
226
+ })
227
+
228
+ describe('', () => {
229
+ let statement = `using foo.bar.* ..`;
230
+
231
+ let expectedTokens = [
232
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }, // 'using'
233
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
234
+ { "startIndex": 6, "endIndex": 15, "scopes": ["source.abl", "meta.using.abl", "entity.name.package.abl"] }, // 'foo.bar.*'
235
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl"] }, // ' '
236
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "punctuation.terminator.abl"] }, // '.'
237
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
238
+ ];
239
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
240
+ })
241
+
242
+ describe('', () => {
243
+ let statement = `interface foo.IBar:`;
244
+
245
+ let expectedTokens = [
246
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
247
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
248
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'foo.IBar'
249
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
250
+ ];
251
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
252
+ })
253
+
254
+ describe('', () => {
255
+ let statement = `interface foo.IBar inherits bar.IFoo:`;
256
+
257
+ let expectedTokens = [
258
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
259
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
260
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'foo.IBar'
261
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
262
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'inherits'
263
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
264
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'bar.IFoo'
265
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
266
+ ];
267
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
268
+ })
269
+
270
+ describe('', () => {
271
+ let statement = `interface foo.IBar inherits bar.IFoo,baz,IBaz:`;
272
+
273
+ let expectedTokens = [
274
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
275
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
276
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'foo.IBar'
277
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
278
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'inherits'
279
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
280
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'bar.IFoo'
281
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
282
+ { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'baz'
283
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
284
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'IBaz'
285
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
286
+ ];
287
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
288
+ })
289
+
290
+ describe('', () => {
291
+ let statement = `INTERFACE foo.IBar INHERITS bar.IFoo,baz,IBaz:`;
292
+
293
+ let expectedTokens = [
294
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'INTERFACE'
295
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
296
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'foo.IBar'
297
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
298
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'INHERITS'
299
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
300
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'bar.IFoo'
301
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
302
+ { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'baz'
303
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
304
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'IBaz'
305
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
306
+ ];
307
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
308
+ })
309
+
310
+ describe('', () => {
311
+ let statement = `interface foo.IBar
312
+ inherits bar.IFoo,
313
+ baz,
314
+ IBaz`;
315
+
316
+ let expectedTokens = [
317
+ [
318
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
319
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
320
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] } // 'foo.IBar'
321
+ ],
322
+ [
323
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
324
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'inherits'
325
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
326
+ { "startIndex": 13, "endIndex": 21, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'bar.IFoo'
327
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] } // ','
328
+ ],
329
+ [
330
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
331
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'baz'
332
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] } // ','
333
+ ],
334
+ [
335
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
336
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] } // 'IBaz'
337
+ ]
338
+ ];
339
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
340
+ })
341
+
342
+
343
+ describe('', () => {
344
+ let statement = `interface foo.IBar
345
+ inherits bar.IFoo,
346
+ baz,another.ISpa,thing
347
+ IBaz,
348
+ IYes, Inow
349
+ :`
350
+
351
+ let expectedTokens = [
352
+ [
353
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
354
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
355
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] } // 'foo.IBar'
356
+ ],
357
+ [
358
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
359
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'inherits'
360
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
361
+ { "startIndex": 13, "endIndex": 21, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'bar.IFoo'
362
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] } // ','
363
+ ],
364
+ [
365
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
366
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'baz'
367
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
368
+ { "startIndex": 17, "endIndex": 29, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'another.ISpa'
369
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
370
+ { "startIndex": 30, "endIndex": 35, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] } // 'thing'
371
+ ],
372
+ [
373
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
374
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'IBaz'
375
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] } // ','
376
+ ],
377
+ [
378
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
379
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'IYes'
380
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.separator.comma.abl"] }, // ','
381
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
382
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] } // 'Inow'
383
+ ],
384
+ [
385
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
386
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
387
+ ]
388
+ ];
389
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
390
+ })
391
+
392
+ describe('', () => {
393
+ let statement = `CLASS foo.bar.baz ABSTRACT
394
+
395
+ inherits parent.class
396
+ implements one.interface,
397
+ another.iface
398
+
399
+ :`;
400
+
401
+ let expectedTokens = [
402
+ [
403
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
404
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
405
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
406
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
407
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'ABSTRACT'
408
+ ],
409
+ [
410
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.define.class.abl"] } // ''
411
+ ],
412
+ [
413
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
414
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'inherits'
415
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
416
+ { "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'parent.class'
417
+ ],
418
+ [
419
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
420
+ { "startIndex": 4, "endIndex": 14, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'implements'
421
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
422
+ { "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'one.interface'
423
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.separator.comma.abl"] } // ','
424
+ ],
425
+ [
426
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
427
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'another.iface'
428
+ ],
429
+ [
430
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.define.class.abl"] } // ''
431
+ ],
432
+ [
433
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
434
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
435
+ ]
436
+ ];
437
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
438
+ })
439
+
440
+ describe('', () => {
441
+ let statement = `CLASS foo.bar.baz inherits parent.class
442
+ implements one.interface,
443
+ another.iface
444
+ abstract
445
+ use-widget-pool:`;
446
+
447
+ let expectedTokens = [
448
+ [
449
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
450
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
451
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
452
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
453
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'inherits'
454
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
455
+ { "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'parent.class'
456
+ ],
457
+ [
458
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
459
+ { "startIndex": 4, "endIndex": 14, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'implements'
460
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
461
+ { "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'one.interface'
462
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.separator.comma.abl"] } // ','
463
+ ],
464
+ [
465
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
466
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'another.iface'
467
+ ],
468
+ [
469
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
470
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'abstract'
471
+ ],
472
+ [
473
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
474
+ { "startIndex": 4, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
475
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
476
+ ]
477
+ ];
478
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
479
+ })
480
+
481
+ describe('', () => {
482
+ let statement = `CLASS foo.bar.baz serializable inherits parent.class implements one.interface,another.iface abstract use-widget-pool:`;
483
+
484
+ let expectedTokens = [
485
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
486
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
487
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
488
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
489
+ { "startIndex": 18, "endIndex": 30, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'serializable'
490
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
491
+ { "startIndex": 31, "endIndex": 39, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'inherits'
492
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
493
+ { "startIndex": 40, "endIndex": 52, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'parent.class'
494
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
495
+ { "startIndex": 53, "endIndex": 63, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'implements'
496
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
497
+ { "startIndex": 64, "endIndex": 77, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'one.interface'
498
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.separator.comma.abl"] }, // ','
499
+ { "startIndex": 78, "endIndex": 91, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'another.iface'
500
+ { "startIndex": 91, "endIndex": 92, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
501
+ { "startIndex": 92, "endIndex": 100, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'abstract'
502
+ { "startIndex": 100, "endIndex": 101, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
503
+ { "startIndex": 101, "endIndex": 116, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
504
+ { "startIndex": 116, "endIndex": 117, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
505
+ ];
506
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
507
+ })
508
+
509
+ describe('', () => {
510
+ let statement = `CLASS foo.bar.baz inherits parent.class
511
+ implements one.interface,
512
+ another.iface
513
+ abstract
514
+ use-widget-pool serializable
515
+ :`;
516
+
517
+ let expectedTokens = [
518
+ [
519
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
520
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
521
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
522
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
523
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'inherits'
524
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
525
+ { "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'parent.class'
526
+ ],
527
+ [
528
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
529
+ { "startIndex": 4, "endIndex": 14, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'implements'
530
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
531
+ { "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'one.interface'
532
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.separator.comma.abl"] } // ','
533
+ ],
534
+ [
535
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
536
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'another.iface'
537
+ ],
538
+ [
539
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
540
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'abstract'
541
+ ],
542
+ [
543
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
544
+ { "startIndex": 4, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
545
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
546
+ { "startIndex": 20, "endIndex": 32, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'serializable'
547
+ ],
548
+ [
549
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
550
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
551
+ ]
552
+ ];
553
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
554
+ })
555
+
556
+ describe('', () => {
557
+ let statement = `CLASS foo.bar.baz use-widget-pool:`;
558
+
559
+ let expectedTokens = [
560
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
561
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
562
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
563
+ { "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
564
+ { "startIndex": 19, "endIndex": 34, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
565
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
566
+ ];
567
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
568
+ })
569
+
570
+ describe('', () => {
571
+ let statement = `CLASS foo.bar.baz
572
+ use-widget-pool:`;
573
+
574
+ let expectedTokens = [
575
+ [
576
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
577
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
578
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'foo.bar.baz'
579
+ ],
580
+ [
581
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
582
+ { "startIndex": 5, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
583
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
584
+ ]];
585
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
586
+ })
587
+
588
+ describe('', () => {
589
+ let statement = `CLASS foo.bar.baz inherits boo.scoo
590
+ use-widget-pool:`;
591
+
592
+ let expectedTokens = [
593
+ [
594
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
595
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
596
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
597
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
598
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'inherits'
599
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
600
+ { "startIndex": 27, "endIndex": 35, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'boo.scoo'
601
+ ],
602
+ [
603
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
604
+ { "startIndex": 5, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'use-widget-pool'
605
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
606
+ ]
607
+ ];
608
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
609
+ })
610
+
611
+ describe('', () => {
612
+ let statement = `CLASS foo.bar.baz
613
+ INheriTS boo.scoo
614
+ use-widget-POOL
615
+ :`;
616
+
617
+ let expectedTokens = [
618
+ [
619
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
620
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
621
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'foo.bar.baz'
622
+ ],
623
+ [
624
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
625
+ { "startIndex": 12, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'INheriTS'
626
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
627
+ { "startIndex": 21, "endIndex": 29, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'boo.scoo'
628
+ ],
629
+ [
630
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
631
+ { "startIndex": 5, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'use-widget-POOL'
632
+ ],
633
+ [
634
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
635
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
636
+ ]
637
+ ];
638
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
639
+ })
640
+
641
+ describe('', () => {
642
+ let statement = `CLASS foo.bar.baz
643
+ INheriTS
644
+ boo.scoo
645
+
646
+ :`;
647
+
648
+ let expectedTokens = [
649
+ [
650
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] }, // 'CLASS'
651
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
652
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'foo.bar.baz'
653
+ ],
654
+ [
655
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
656
+ { "startIndex": 8, "endIndex": 16, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] } // 'INheriTS'
657
+ ],
658
+ [
659
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
660
+ { "startIndex": 12, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] } // 'boo.scoo'
661
+ ],
662
+ [
663
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.define.class.abl"] } // ''
664
+ ],
665
+ [
666
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl"] }, // ' '
667
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] } // ':'
668
+ ]
669
+ ];
670
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
671
+ })
672
+
673
+
674
+ describe('', () => {
675
+ let statement = `x = cast(y, foo.bar.baz) `;
676
+
677
+ let expectedTokens = [
678
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
679
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
680
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
681
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
682
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
683
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
684
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'y'
685
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
686
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
687
+ { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
688
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
689
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl"] } // ' '
690
+ ];
691
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
692
+ })
693
+
694
+ describe('', () => {
695
+ let statement = `x = cast(y
696
+ ,foo.bar.baz) `;
697
+
698
+ let expectedTokens = [
699
+ [
700
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
701
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
702
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
703
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
704
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
705
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
706
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] } // 'y'
707
+ ],
708
+ [
709
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
710
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
711
+ { "startIndex": 9, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
712
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
713
+ { "startIndex": 21, "endIndex": 23, "scopes": ["source.abl"] } // ' '
714
+ ]];
715
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
716
+ })
717
+
718
+ describe('', () => {
719
+ let statement = `x = cast(y,
720
+ foo.bar.baz) `;
721
+
722
+ let expectedTokens = [
723
+ [
724
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
725
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
726
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
727
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
728
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
729
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
730
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'y'
731
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] } // ','
732
+ ],
733
+ [
734
+ { "startIndex": 0, "endIndex": 30, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
735
+ { "startIndex": 30, "endIndex": 41, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
736
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
737
+ { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl"] } // ' '
738
+ ]
739
+ ];
740
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
741
+ })
742
+
743
+
744
+ describe('', () => {
745
+ let statement = `cast ( q, foo.bar.baz ) `;
746
+
747
+ let expectedTokens = [
748
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
749
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
750
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
751
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
752
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
753
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
754
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
755
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
756
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
757
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
758
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl"] } // ' '
759
+ ];
760
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
761
+ })
762
+
763
+ describe('', () => {
764
+ let statement = `cast ( q, "foo.bar.baz" ) `;
765
+
766
+ let expectedTokens = [
767
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
768
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
769
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
770
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
771
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
772
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
773
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
774
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
775
+ { "startIndex": 11, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl"] }, // 'foo.bar.baz'
776
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
777
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
778
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
779
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] } // ' '
780
+ ];
781
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
782
+ })
783
+
784
+ describe('', () => {
785
+ let statement = `SessionManager:ContestDataset:READ-XML("longchar":U,
786
+ lcDataset,
787
+ "EMPTY":U, ?, ?) . `;
788
+
789
+ let expectedTokens = [
790
+ [
791
+ { "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] }, // 'SessionManager'
792
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
793
+ { "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ContestDataset'
794
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
795
+ { "startIndex": 30, "endIndex": 38, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'READ-XML'
796
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
797
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
798
+ { "startIndex": 40, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'longchar'
799
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
800
+ { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
801
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
802
+ ],
803
+ [
804
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
805
+ { "startIndex": 2, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset'
806
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
807
+ ],
808
+ [
809
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
810
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
811
+ { "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'EMPTY'
812
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
813
+ { "startIndex": 9, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
814
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
815
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
816
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
817
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
818
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
819
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
820
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
821
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
822
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
823
+ { "startIndex": 20, "endIndex": 22, "scopes": ["source.abl"] } // ' '
824
+ ]
825
+ ];
826
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
827
+ })
828
+
829
+ describe('', () => {
830
+ let statement = `if eBusinessEntity.GenerateBE AND CharacterType:IsNUllOrEmpty(eBusinessEntity.BEName) THEN
831
+ undo, throw NEW ClassNameNotEntertedException("unable"{&TRAN}, 0, ClassNameNotEntertedEnum:BusinessEntity).`;
832
+
833
+ let expectedTokens = [
834
+ [
835
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
836
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
837
+ { "startIndex": 3, "endIndex": 29, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'eBusinessEntity.GenerateBE'
838
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
839
+ { "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
840
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
841
+ { "startIndex": 34, "endIndex": 47, "scopes": ["source.abl", "variable.other.abl"] }, // 'CharacterType'
842
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
843
+ { "startIndex": 48, "endIndex": 61, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IsNUllOrEmpty'
844
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
845
+ { "startIndex": 62, "endIndex": 84, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'eBusinessEntity.BEName'
846
+ { "startIndex": 84, "endIndex": 85, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
847
+ { "startIndex": 85, "endIndex": 86, "scopes": ["source.abl"] }, // ' '
848
+ { "startIndex": 86, "endIndex": 90, "scopes": ["source.abl", "keyword.other.abl"] } // 'THEN'
849
+ ],
850
+ [
851
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
852
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'undo'
853
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
854
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
855
+ { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'throw'
856
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
857
+ { "startIndex": 16, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEW'
858
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
859
+ { "startIndex": 20, "endIndex": 49, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'ClassNameNotEntertedException'
860
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
861
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
862
+ { "startIndex": 51, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'unable'
863
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
864
+ { "startIndex": 58, "endIndex": 65, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // '{&TRAN}'
865
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
866
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
867
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '0'
868
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
869
+ { "startIndex": 69, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
870
+ { "startIndex": 71, "endIndex": 95, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'ClassNameNotEntertedEnum'
871
+ { "startIndex": 95, "endIndex": 96, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
872
+ { "startIndex": 96, "endIndex": 110, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'BusinessEntity'
873
+ { "startIndex": 110, "endIndex": 111, "scopes": ["source.abl"] }, // ')'
874
+ { "startIndex": 111, "endIndex": 112, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
875
+ ]
876
+ ];
877
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
878
+ })
879
+