abl-tmlanguage 1.1.3 → 1.2.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 (49) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +12 -0
  3. package/abl.tmLanguage.json +2736 -216
  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/array-extent/issue#5.spec.js +18 -18
  8. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  9. package/spec/define-parameter/simple-single-line.spec.js +100 -100
  10. package/spec/define-stream/simple-single-line.spec.js +32 -31
  11. package/spec/define-variable/extent.spec.js +228 -0
  12. package/spec/define-variable/issue#6.spec.js +256 -198
  13. package/spec/define-variable/issue#9.spec.js +38 -32
  14. package/spec/define-variable/simple-single-line.spec.js +87 -87
  15. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  16. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  17. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  18. package/spec/do/do-blocks.spec.js +89 -0
  19. package/spec/do/issue#3.spec.js +67 -60
  20. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  21. package/spec/global-scoped-define/global-define.spec.js +11 -11
  22. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  23. package/spec/include/abl-tmlanguage-issues#5.spec.js +44 -44
  24. package/spec/include/vscode-abl-issue#45.spec.js +14 -14
  25. package/spec/include/vscode-abl-issue#80.spec.js +26 -26
  26. package/spec/method-definition/constructor.spec.js +174 -0
  27. package/spec/method-definition/method.spec.js +185 -0
  28. package/spec/procedure-definition/empty-proc.spec.js +20 -18
  29. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  30. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  31. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  32. package/spec/shared.js +84 -42
  33. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  34. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  35. package/spec/type-name/argument.spec.js +209 -0
  36. package/spec/type-name/cast.spec.js +165 -0
  37. package/spec/type-name/define-class.spec.js +471 -0
  38. package/spec/type-name/define-enum.spec.js +44 -0
  39. package/spec/type-name/define-interface.spec.js +159 -0
  40. package/spec/type-name/define-property.spec.js +301 -0
  41. package/spec/type-name/define-temp-table.spec.js +434 -0
  42. package/spec/type-name/define-type-spec.js +435 -0
  43. package/spec/type-name/define-variable-property.spec.js +264 -0
  44. package/spec/type-name/define-variable.spec.js +504 -0
  45. package/spec/type-name/get-class.spec.js +91 -0
  46. package/spec/type-name/new.spec.js +126 -0
  47. package/spec/type-name/parameter-as.spec.js +838 -0
  48. package/spec/type-name/type-name-spec.js +587 -0
  49. package/spec/type-name/using.spec.js +115 -0
@@ -0,0 +1,587 @@
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.get-class.abl", "entity.name.function.abl"] },
9
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
10
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
11
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.get-class.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.get-class.abl", "entity.name.function.abl"] },
22
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
23
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
24
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
25
+ { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
26
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
27
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.get-class.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-type.abl", "keyword.other.abl"] },
38
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
39
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
40
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl"] },
41
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.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-type.abl", "keyword.other.abl"] },
51
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
52
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
53
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl"] },
54
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
55
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.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-type.abl", "keyword.other.abl"] },
65
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
66
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
67
+ { "startIndex": 17, "endIndex": 20, "scopes": ["source.abl", "meta.define-type.abl"] },
68
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.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"] },
78
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] },
79
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] },
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", "meta.function-call.new.abl", "keyword.other.abl"] },
84
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.new.abl"] },
85
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.new.abl", "entity.name.type.abl"] },
86
+ { "startIndex": 26, "endIndex": 29, "scopes": ["source.abl"] }
87
+ ];
88
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
89
+ })
90
+
91
+ describe('', () => {
92
+ let statement = `ASSIGN x = NEW foo.bar.baz(true, ?)`;
93
+
94
+ let expectedTokens = [
95
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] },
96
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] },
97
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] },
98
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] },
99
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] },
100
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] },
101
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.new.abl", "keyword.other.abl"] },
102
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.new.abl"] },
103
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.new.abl", "entity.name.type.abl"] },
104
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] },
105
+ { "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "keyword.other.abl"] },
106
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "keyword.operator.source.abl"] },
107
+ { "startIndex": 32, "endIndex": 36, "scopes": ["source.abl"] }
108
+ ];
109
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
110
+ })
111
+
112
+ describe('', () => {
113
+ let statement = `ASSIGN x = NEW "foo.bar.baz" (true, ?)`;
114
+
115
+ let expectedTokens = [
116
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] },
117
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] },
118
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] },
119
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] },
120
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] },
121
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] },
122
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "keyword.other.abl"] },
123
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] },
124
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] },
125
+ { "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "string.double.complex.abl"] },
126
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] },
127
+ { "startIndex": 28, "endIndex": 30, "scopes": ["source.abl"] },
128
+ { "startIndex": 30, "endIndex": 34, "scopes": ["source.abl", "keyword.other.abl"] },
129
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] },
130
+ { "startIndex": 35, "endIndex": 39, "scopes": ["source.abl"] }
131
+ ];
132
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
133
+ })
134
+
135
+
136
+ describe('', () => {
137
+ let statement = `ENUM package.type :`;
138
+
139
+ let expectedTokens = [
140
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
141
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
142
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
143
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.enum.abl"] },
144
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
145
+ ];
146
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
147
+ })
148
+
149
+ describe('', () => {
150
+ let statement = `ENUM package.type flags :`;
151
+
152
+ let expectedTokens = [
153
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
154
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
155
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
156
+ { "startIndex": 17, "endIndex": 20, "scopes": ["source.abl", "meta.define.enum.abl"] },
157
+ { "startIndex": 20, "endIndex": 25, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
158
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.enum.abl"] },
159
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
160
+ ];
161
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
162
+ })
163
+
164
+ describe('', () => {
165
+ let statement = `ENUM package.flagsenum flags:`;
166
+
167
+ let expectedTokens = [
168
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
169
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
170
+ { "startIndex": 5, "endIndex": 22, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
171
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.enum.abl"] },
172
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
173
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
174
+ ];
175
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
176
+ })
177
+
178
+ describe('', () => {
179
+ let statement = `using foo.bar.baz.`;
180
+
181
+ let expectedTokens = [
182
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
183
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
184
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
185
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] }
186
+ ];
187
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
188
+ })
189
+
190
+ describe('', () => {
191
+ let statement = `using foo.bar.baz from propath.`;
192
+
193
+ let expectedTokens = [
194
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
195
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
196
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
197
+ { "startIndex": 17, "endIndex": 22, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
198
+ { "startIndex": 22, "endIndex": 30, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
199
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.terminator.abl"] }
200
+ ];
201
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
202
+ })
203
+
204
+ describe('', () => {
205
+ let statement = `using foo.bar.* from propath.`;
206
+
207
+ let expectedTokens = [
208
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
209
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
210
+ { "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
211
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] },
212
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl"] },
213
+ { "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "keyword.other.abl"] },
214
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] },
215
+ { "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] },
216
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] }
217
+ ];
218
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
219
+ })
220
+
221
+ describe('', () => {
222
+ let statement = `using foo.bar.* ..`;
223
+
224
+ let expectedTokens = [
225
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
226
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
227
+ { "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
228
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] },
229
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl"] },
230
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] },
231
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] }
232
+ ];
233
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
234
+ })
235
+
236
+ describe('', () => {
237
+ let statement = `interface foo.IBar:`;
238
+
239
+ let expectedTokens = [
240
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
241
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
242
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
243
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl", "punctuation.terminator.abl"] }
244
+ ];
245
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
246
+ })
247
+
248
+ describe('', () => {
249
+ let statement = `interface foo.IBar inherits bar.IFoo:`;
250
+
251
+ let expectedTokens = [
252
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
253
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
254
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
255
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
256
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "keyword.other.abl"] },
257
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] },
258
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
259
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] }
260
+ ];
261
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
262
+ })
263
+
264
+ describe('', () => {
265
+ let statement = `interface foo.IBar inherits bar.IFoo,baz,IBaz:`;
266
+
267
+ let expectedTokens = [
268
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
269
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
270
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
271
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
272
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "keyword.other.abl"] },
273
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] },
274
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
275
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
276
+ { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
277
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
278
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
279
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] }
280
+ ];
281
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
282
+ })
283
+
284
+ describe('', () => {
285
+ let statement = `INTERFACE foo.IBar INHERITS bar.IFoo,baz,IBaz:`;
286
+
287
+ let expectedTokens = [
288
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
289
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
290
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
291
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
292
+ { "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "keyword.other.abl"] },
293
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] },
294
+ { "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
295
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
296
+ { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
297
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
298
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
299
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] }
300
+ ];
301
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
302
+ })
303
+
304
+ describe('', () => {
305
+ let statement = `interface foo.IBar
306
+ inherits bar.IFoo,
307
+ baz,
308
+ IBaz`;
309
+
310
+ let expectedTokens = [
311
+ [
312
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
313
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.using.abl"] },
314
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
315
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.using.abl"] }
316
+ ],
317
+ [
318
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.using.abl"] },
319
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
320
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
321
+ { "startIndex": 13, "endIndex": 21, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
322
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] }
323
+ ],
324
+ [
325
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
326
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
327
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] }
328
+ ],
329
+ [
330
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
331
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
332
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] }
333
+ ],
334
+ [
335
+ { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
336
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }
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
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
353
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
354
+ { "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
355
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] },
356
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl"] },
357
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] },
358
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] }
359
+ ];
360
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
361
+ })
362
+
363
+ describe('', () => {
364
+ let statement = `CLASS foo.bar.baz ABSTRACT
365
+
366
+ inherits parent.class
367
+ implements one.interface,
368
+ anotehr.iface
369
+
370
+ :`;
371
+
372
+ let expectedTokens = [
373
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
374
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
375
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
376
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
377
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
378
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
379
+ ];
380
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
381
+ })
382
+
383
+ describe('', () => {
384
+ let statement = `CLASS foo.bar.baz inherits parent.class
385
+ implements one.interface,
386
+ anotehr.iface
387
+ abstract
388
+ use-widget-pool:`;
389
+
390
+ let expectedTokens = [
391
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
392
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
393
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
394
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
395
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
396
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
397
+ ];
398
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
399
+ })
400
+
401
+ describe('', () => {
402
+ let statement = `CLASS foo.bar.baz serializable inherits parent.class implements one.interface,anotehr.iface abstract use-widget-pool:`;
403
+
404
+ let expectedTokens = [
405
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
406
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
407
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
408
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
409
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
410
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
411
+ ];
412
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
413
+ })
414
+
415
+ describe('', () => {
416
+ let statement = `CLASS foo.bar.baz inherits parent.class
417
+ implements one.interface,
418
+ anotehr.iface
419
+ abstract
420
+ use-widget-pool serializable
421
+ :`;
422
+
423
+ let expectedTokens = [
424
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
425
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
426
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
427
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
428
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
429
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
430
+ ];
431
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
432
+ })
433
+
434
+ describe('', () => {
435
+ let statement = `CLASS foo.bar.baz use-widget-pool:`;
436
+
437
+ let expectedTokens = [
438
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
439
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
440
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
441
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
442
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
443
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
444
+ ];
445
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
446
+ })
447
+
448
+ describe('', () => {
449
+ let statement = `CLASS foo.bar.baz
450
+ use-widget-pool:`;
451
+
452
+ let expectedTokens = [
453
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
454
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
455
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
456
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
457
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
458
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
459
+ ];
460
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
461
+ })
462
+
463
+ describe('', () => {
464
+ let statement = `CLASS foo.bar.baz inherits boo.scoo
465
+ use-widget-pool:`;
466
+
467
+ let expectedTokens = [
468
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
469
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
470
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
471
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
472
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
473
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
474
+ ];
475
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
476
+ })
477
+
478
+ describe('', () => {
479
+ let statement = `CLASS foo.bar.baz
480
+ INheriTS boo.scoo
481
+ use-widget-POOL
482
+ :`;
483
+
484
+ let expectedTokens = [
485
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
486
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
487
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
488
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
489
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
490
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
491
+ ];
492
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
493
+ })
494
+
495
+ describe('', () => {
496
+ let statement = `CLASS foo.bar.baz
497
+ INheriTS
498
+ boo.scoo
499
+
500
+ :`;
501
+
502
+ let expectedTokens = [
503
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
504
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
505
+ { "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
506
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
507
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
508
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
509
+ ];
510
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
511
+ })
512
+
513
+
514
+ describe('', () => {
515
+ let statement = `x = cast(y, foo.bar.baz) `;
516
+
517
+ let expectedTokens = [
518
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.function.abl"] },
519
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
520
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
521
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
522
+ { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl"] }
523
+ ];
524
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
525
+ })
526
+
527
+ describe('', () => {
528
+ let statement = `x = cast(y
529
+ ,foo.bar.baz) `;
530
+
531
+ let expectedTokens = [
532
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.function.abl"] },
533
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
534
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
535
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
536
+ { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl"] }
537
+ ];
538
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
539
+ })
540
+
541
+ describe('', () => {
542
+ let statement = `x = cast(y,
543
+ foo.bar.baz) `;
544
+
545
+ let expectedTokens = [
546
+ { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.function.abl"] },
547
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
548
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
549
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
550
+ { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl"] }
551
+ ];
552
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
553
+ })
554
+
555
+
556
+ describe('', () => {
557
+ let statement = `cast ( q, foo.bar.baz ) `;
558
+
559
+ let expectedTokens = [
560
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.function.abl"] },
561
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
562
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
563
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
564
+ { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.get-class.abl", "entity.name.type.abl"] },
565
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.get-class.abl"] },
566
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.get-class.abl", "meta.brace.round.js"] },
567
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] }
568
+ ];
569
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
570
+ })
571
+
572
+ describe('', () => {
573
+ let statement = `cast ( q, "foo.bar.baz" ) `;
574
+
575
+ let expectedTokens = [
576
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.cast.abl", "entity.name.function.abl"] },
577
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.cast.abl"] },
578
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.cast.abl", "meta.brace.round.js"] },
579
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.cast.abl"] },
580
+ { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.cast.abl", "entity.name.type.abl"] },
581
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.cast.abl"] },
582
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.cast.abl", "meta.brace.round.js"] },
583
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] }
584
+ ];
585
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
586
+ })
587
+