abl-tmlanguage 1.2.0 → 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.
- package/README.md +42 -1
- package/abl.tmLanguage.json +1091 -307
- package/package.json +1 -1
- package/spec/annotations/annotation.spec.js +232 -0
- package/spec/blocks/finally-blocks.spec.js +90 -0
- package/spec/blocks/on-quit.spec.js +59 -0
- package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
- package/spec/db-table-and-field/fields-except.spec.js +69 -0
- package/spec/db-table-and-field/foreach.spec.js +588 -0
- package/spec/db-table-and-field/issue#88.spec.js +120 -0
- package/spec/define-buffer/create-buffer.spec.js +110 -0
- package/spec/define-parameter/simple-single-line.spec.js +40 -0
- package/spec/define-temp-table/define-index.spec.js +138 -0
- package/spec/define-variable/simple-single-line.spec.js +81 -0
- package/spec/do/do-blocks.spec.js +139 -4
- package/spec/do/issue#3.spec.js +4 -2
- package/spec/function-call/nested-functions.spec.js +128 -0
- package/spec/function-call/vscode-abl-issue#19.spec.js +3 -3
- package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
- package/spec/include/vscode-abl-issue#45.spec.js +2 -2
- package/spec/include/vscode-abl-issue#77.spec.js +129 -0
- package/spec/include/vscode-abl-issue#80.spec.js +32 -19
- package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
- package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
- package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
- package/spec/method-attribute-property-call/method-call.spec.js +112 -0
- package/spec/method-definition/constructor.spec.js +9 -9
- package/spec/method-definition/method.spec.js +139 -4
- package/spec/misc-statements/case-statement.spec.js +96 -0
- package/spec/misc-statements/copy-lob.spec.js +137 -0
- package/spec/misc-statements/if-then.spec.js +170 -0
- package/spec/misc-statements/return-statement.spec.js +53 -0
- package/spec/operators/operators.spec.js +78 -0
- package/spec/procedure-definition/empty-proc.spec.js +81 -0
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +1 -1
- package/spec/run-statement/run-statement.spec.js +162 -0
- package/spec/strings/translation-attribute.spec.js +52 -0
- package/spec/strings/vscode-abl-issue#28.spec.js +1 -1
- package/spec/type-name/argument.spec.js +1 -1
- package/spec/type-name/define-class.spec.js +67 -70
- package/spec/type-name/define-property.spec.js +1 -1
- package/spec/type-name/define-variable-property.spec.js +1 -1
- package/spec/type-name/get-class.spec.js +18 -18
- package/spec/type-name/parameter-as.spec.js +22 -22
- package/spec/type-name/type-name.spec.js +879 -0
- package/spec/type-name/type-name-spec.js +0 -587
|
@@ -17,14 +17,14 @@ end constructor.`;
|
|
|
17
17
|
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
18
18
|
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
19
19
|
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
20
|
-
{ "startIndex": 28, "endIndex":
|
|
20
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
21
21
|
],
|
|
22
22
|
[
|
|
23
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
24
|
-
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "
|
|
25
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
26
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
|
|
27
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
23
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
24
|
+
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'this-object'
|
|
25
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
26
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'x'
|
|
27
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
28
28
|
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
29
29
|
],
|
|
30
30
|
[
|
|
@@ -65,9 +65,9 @@ end constructor.`;
|
|
|
65
65
|
{ "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
66
66
|
{ "startIndex": 69, "endIndex": 71, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
67
67
|
{ "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
68
|
-
{ "startIndex": 72, "endIndex": 78, "scopes": ["source.abl", "meta.define.method.abl", "
|
|
68
|
+
{ "startIndex": 72, "endIndex": 78, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Object'
|
|
69
69
|
{ "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
70
|
-
{ "startIndex": 79, "endIndex":
|
|
70
|
+
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
71
71
|
],
|
|
72
72
|
[
|
|
73
73
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
@@ -136,7 +136,7 @@ end constructor.`;
|
|
|
136
136
|
{ "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
137
137
|
{ "startIndex": 73, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'dsData'
|
|
138
138
|
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
139
|
-
{ "startIndex": 80, "endIndex":
|
|
139
|
+
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
140
140
|
],
|
|
141
141
|
[
|
|
142
142
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
@@ -18,7 +18,7 @@ end method.`;
|
|
|
18
18
|
{ "startIndex": 19, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'MethodA'
|
|
19
19
|
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
20
20
|
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
21
|
-
{ "startIndex": 28, "endIndex":
|
|
21
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
22
22
|
],
|
|
23
23
|
[
|
|
24
24
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
@@ -68,9 +68,9 @@ end method.`;
|
|
|
68
68
|
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
69
69
|
{ "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
70
70
|
{ "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
71
|
-
{ "startIndex": 68, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "
|
|
71
|
+
{ "startIndex": 68, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Object'
|
|
72
72
|
{ "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
73
|
-
{ "startIndex": 75, "endIndex":
|
|
73
|
+
{ "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
74
74
|
],
|
|
75
75
|
[
|
|
76
76
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
@@ -147,7 +147,7 @@ end method.`;
|
|
|
147
147
|
{ "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
148
148
|
{ "startIndex": 73, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'dsData'
|
|
149
149
|
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
150
|
-
{ "startIndex": 80, "endIndex":
|
|
150
|
+
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
151
151
|
],
|
|
152
152
|
[
|
|
153
153
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
@@ -183,3 +183,138 @@ end method.`;
|
|
|
183
183
|
];
|
|
184
184
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
185
185
|
})
|
|
186
|
+
|
|
187
|
+
describe('', () => {
|
|
188
|
+
let statement =
|
|
189
|
+
`method static public longchar Encode(input pString as longchar,
|
|
190
|
+
input pEscapeSeq as character):
|
|
191
|
+
message "a method".
|
|
192
|
+
end method.`;
|
|
193
|
+
|
|
194
|
+
let expectedTokens = [
|
|
195
|
+
[
|
|
196
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
|
|
197
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
198
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'static'
|
|
199
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
200
|
+
{ "startIndex": 14, "endIndex": 20, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
|
|
201
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
202
|
+
{ "startIndex": 21, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'longchar'
|
|
203
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
204
|
+
{ "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'Encode'
|
|
205
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
206
|
+
{ "startIndex": 37, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input'
|
|
207
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
208
|
+
{ "startIndex": 43, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pString'
|
|
209
|
+
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
210
|
+
{ "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
211
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
212
|
+
{ "startIndex": 54, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'longchar'
|
|
213
|
+
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
217
|
+
{ "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input'
|
|
218
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
219
|
+
{ "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pEscapeSeq'
|
|
220
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
221
|
+
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
222
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
223
|
+
{ "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
|
|
224
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
225
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
226
|
+
],
|
|
227
|
+
[
|
|
228
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
229
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
230
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
231
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
232
|
+
{ "startIndex": 11, "endIndex": 19, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'a method'
|
|
233
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
234
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
238
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
239
|
+
{ "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'method'
|
|
240
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
241
|
+
]
|
|
242
|
+
];
|
|
243
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
describe('', () => {
|
|
249
|
+
let statement =
|
|
250
|
+
`interface iFace:
|
|
251
|
+
def temp-table tt no-undo
|
|
252
|
+
field f1 as character.
|
|
253
|
+
|
|
254
|
+
method public void M1(buffer pb for tt).
|
|
255
|
+
|
|
256
|
+
end interface.`;
|
|
257
|
+
|
|
258
|
+
let expectedTokens = [
|
|
259
|
+
[
|
|
260
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define.interface.abl", "keyword.other.abl"] }, // 'interface'
|
|
261
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.interface.abl"] }, // ' '
|
|
262
|
+
{ "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.define.interface.abl", "entity.name.type.abl"] }, // 'iFace'
|
|
263
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.interface.abl", "punctuation.terminator.abl"] } // ':'
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
267
|
+
{ "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'def'
|
|
268
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
269
|
+
{ "startIndex": 8, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
|
|
270
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
271
|
+
{ "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'tt'
|
|
272
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
273
|
+
{ "startIndex": 22, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
277
|
+
{ "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
278
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
279
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'f1'
|
|
280
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
281
|
+
{ "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
282
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
283
|
+
{ "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'character'
|
|
284
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
285
|
+
],
|
|
286
|
+
[
|
|
287
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
288
|
+
],
|
|
289
|
+
[
|
|
290
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
291
|
+
{ "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
|
|
292
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
293
|
+
{ "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
|
|
294
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
295
|
+
{ "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
|
|
296
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
297
|
+
{ "startIndex": 21, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'M1'
|
|
298
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
299
|
+
{ "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'buffer'
|
|
300
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
301
|
+
{ "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'pb'
|
|
302
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
303
|
+
{ "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'for'
|
|
304
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
305
|
+
{ "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'tt'
|
|
306
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
307
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
308
|
+
],
|
|
309
|
+
[
|
|
310
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
314
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
315
|
+
{ "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'interface'
|
|
316
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
317
|
+
]
|
|
318
|
+
];
|
|
319
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
320
|
+
})
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `case iLineNumber:
|
|
6
|
+
when 1 then Assert:Equals("error", cLogLine).
|
|
7
|
+
when 2 then Assert:Equals("error", cLogLine).
|
|
8
|
+
when 3 then Assert:Equals("error", cLogLine).
|
|
9
|
+
otherwise leave.
|
|
10
|
+
end case.`;
|
|
11
|
+
let expectedTokens = [
|
|
12
|
+
[
|
|
13
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'case'
|
|
14
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 5, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'iLineNumber'
|
|
16
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
20
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'when'
|
|
21
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
22
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1'
|
|
23
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
24
|
+
{ "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
25
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
26
|
+
{ "startIndex": 14, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'Assert'
|
|
27
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
28
|
+
{ "startIndex": 21, "endIndex": 27, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Equals'
|
|
29
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
30
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
31
|
+
{ "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'error'
|
|
32
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
33
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
34
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
35
|
+
{ "startIndex": 37, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cLogLine'
|
|
36
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
37
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
41
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'when'
|
|
42
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
43
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '2'
|
|
44
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
45
|
+
{ "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
46
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
47
|
+
{ "startIndex": 14, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'Assert'
|
|
48
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
49
|
+
{ "startIndex": 21, "endIndex": 27, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Equals'
|
|
50
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
51
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
52
|
+
{ "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'error'
|
|
53
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
54
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
55
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
56
|
+
{ "startIndex": 37, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cLogLine'
|
|
57
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
58
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
62
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'when'
|
|
63
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
64
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3'
|
|
65
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
66
|
+
{ "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
67
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 14, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'Assert'
|
|
69
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
70
|
+
{ "startIndex": 21, "endIndex": 27, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Equals'
|
|
71
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
72
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
73
|
+
{ "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'error'
|
|
74
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
75
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
76
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
77
|
+
{ "startIndex": 37, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cLogLine'
|
|
78
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
79
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
83
|
+
{ "startIndex": 2, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'otherwise'
|
|
84
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
85
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'leave'
|
|
86
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
90
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
91
|
+
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'case'
|
|
92
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
93
|
+
]
|
|
94
|
+
];
|
|
95
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
96
|
+
})
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `copy-lob
|
|
6
|
+
from respBuf
|
|
7
|
+
starting at ( i + 4 )
|
|
8
|
+
for x
|
|
9
|
+
to result /* overlay at length( results ) + 1 */ no-convert
|
|
10
|
+
no-error.`;
|
|
11
|
+
let expectedTokens = [
|
|
12
|
+
[
|
|
13
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] } // 'copy-lob'
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
18
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
19
|
+
{ "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] } // 'respBuf'
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
23
|
+
{ "startIndex": 2, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'starting'
|
|
24
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
25
|
+
{ "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'at'
|
|
26
|
+
{ "startIndex": 13, "endIndex": 16, "scopes": ["source.abl"] }, // ' ( '
|
|
27
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'i'
|
|
28
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+'
|
|
30
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
31
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '4'
|
|
32
|
+
{ "startIndex": 21, "endIndex": 24, "scopes": ["source.abl"] } // ' )'
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
36
|
+
{ "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
37
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
38
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] } // 'x'
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
42
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'to'
|
|
43
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
44
|
+
{ "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'result'
|
|
45
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
46
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
47
|
+
{ "startIndex": 14, "endIndex": 49, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' overlay at length( results ) + 1 '
|
|
48
|
+
{ "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "comment.block.source.abl"] }, // '*/'
|
|
49
|
+
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
|
|
50
|
+
{ "startIndex": 52, "endIndex": 62, "scopes": ["source.abl", "keyword.other.abl"] } // 'no-convert'
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
|
|
54
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
55
|
+
]
|
|
56
|
+
];
|
|
57
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
describe('', () => {
|
|
61
|
+
let statement = `copy-lob from respBuf starting at ( i + 4 ) for x to result /* overlay at length( results ) + 1 */ no-convert no-error.`;
|
|
62
|
+
let expectedTokens = [
|
|
63
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'copy-lob'
|
|
64
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
65
|
+
{ "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
66
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
67
|
+
{ "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] }, // 'respBuf'
|
|
68
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
|
|
69
|
+
{ "startIndex": 22, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'starting'
|
|
70
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
71
|
+
{ "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.other.abl"] }, // 'at'
|
|
72
|
+
{ "startIndex": 33, "endIndex": 36, "scopes": ["source.abl"] }, // ' ( '
|
|
73
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "variable.other.abl"] }, // 'i'
|
|
74
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
75
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+'
|
|
76
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
|
|
77
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '4'
|
|
78
|
+
{ "startIndex": 41, "endIndex": 44, "scopes": ["source.abl"] }, // ' ) '
|
|
79
|
+
{ "startIndex": 44, "endIndex": 47, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
80
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
81
|
+
{ "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
|
|
82
|
+
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
83
|
+
{ "startIndex": 50, "endIndex": 52, "scopes": ["source.abl", "keyword.other.abl"] }, // 'to'
|
|
84
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl"] }, // ' '
|
|
85
|
+
{ "startIndex": 53, "endIndex": 59, "scopes": ["source.abl", "keyword.other.abl"] }, // 'result'
|
|
86
|
+
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl"] }, // ' '
|
|
87
|
+
{ "startIndex": 60, "endIndex": 62, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
88
|
+
{ "startIndex": 62, "endIndex": 97, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' overlay at length( results ) + 1 '
|
|
89
|
+
{ "startIndex": 97, "endIndex": 99, "scopes": ["source.abl", "comment.block.source.abl"] }, // '*/'
|
|
90
|
+
{ "startIndex": 99, "endIndex": 100, "scopes": ["source.abl"] }, // ' '
|
|
91
|
+
{ "startIndex": 100, "endIndex": 110, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-convert'
|
|
92
|
+
{ "startIndex": 110, "endIndex": 111, "scopes": ["source.abl"] }, // ' '
|
|
93
|
+
{ "startIndex": 111, "endIndex": 119, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
|
|
94
|
+
{ "startIndex": 119, "endIndex": 120, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
95
|
+
];
|
|
96
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
describe('', () => {
|
|
100
|
+
let statement = `copy-lob
|
|
101
|
+
from respBuf
|
|
102
|
+
starting at oSomething:Length
|
|
103
|
+
to file "/path/to/file".`;
|
|
104
|
+
let expectedTokens = [
|
|
105
|
+
[
|
|
106
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'copy-lob'
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
110
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
111
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
112
|
+
{ "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] } // 'respBuf'
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
116
|
+
{ "startIndex": 2, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'starting'
|
|
117
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
118
|
+
{ "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'at'
|
|
119
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
120
|
+
{ "startIndex": 14, "endIndex": 24, "scopes": ["source.abl", "variable.other.abl"] }, // 'oSomething'
|
|
121
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
122
|
+
{ "startIndex": 25, "endIndex": 31, "scopes": ["source.abl", "entity.name.function.abl"] } // 'Length'
|
|
123
|
+
],
|
|
124
|
+
[
|
|
125
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
126
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'to'
|
|
127
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
128
|
+
{ "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'file'
|
|
129
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
130
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
131
|
+
{ "startIndex": 11, "endIndex": 24, "scopes": ["source.abl", "string.double.complex.abl"] }, // '/path/to/file'
|
|
132
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
133
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
134
|
+
]
|
|
135
|
+
];
|
|
136
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
137
|
+
})
|