abl-tmlanguage 1.3.8 → 1.3.9

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.
@@ -38,18 +38,18 @@ if type-of(pProxyReq, IHttpRequest) then
38
38
  { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl"] }, // ' '
39
39
  { "startIndex": 44, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'IAdaptable'
40
40
  { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
41
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
42
- { "startIndex": 56, "endIndex": 66, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GetAdapter'
43
- { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
44
- { "startIndex": 67, "endIndex": 76, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'get-class'
45
- { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
46
- { "startIndex": 77, "endIndex": 89, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'IHttpRequest'
47
- { "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
48
- { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
49
- { "startIndex": 91, "endIndex": 92, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
50
- { "startIndex": 92, "endIndex": 93, "scopes": ["source.abl"] }, // ' '
51
- { "startIndex": 93, "endIndex": 105, "scopes": ["source.abl", "variable.other.abl"] }, // 'IHttpRequest'
52
- { "startIndex": 105, "endIndex": 106, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
41
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
42
+ { "startIndex": 56, "endIndex": 66, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'GetAdapter'
43
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
44
+ { "startIndex": 67, "endIndex": 76, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "support.function.abl"] }, // 'get-class'
45
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
46
+ { "startIndex": 77, "endIndex": 89, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'IHttpRequest'
47
+ { "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.function-call.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
48
+ { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
49
+ { "startIndex": 91, "endIndex": 92, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
50
+ { "startIndex": 92, "endIndex": 93, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
51
+ { "startIndex": 93, "endIndex": 105, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'IHttpRequest'
52
+ { "startIndex": 105, "endIndex": 106, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
53
53
  { "startIndex": 106, "endIndex": 107, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
54
54
  ],
55
55
  [
@@ -173,3 +173,96 @@ end.`;
173
173
  ];
174
174
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
175
175
  })
176
+
177
+ describe('', () => {
178
+ let statement = `if Progress.Lang.Class:GetClass (pcEntityName):IsA ( "Consultingwerk.OERA.BusinessTask":U) or
179
+ (Progress.Lang.Class:GetClass (pcEntityName):IsA ( "Consutingwerk.OERA.IBusinessService":U) and
180
+ Progress.Lang.Class:GetClass (pcEntityName) :IsA ( "Consultingwerk.SmartFramework.SmartBusinessEntity":U) eq false) then
181
+ poRestResourceService:RegisterBusinessTaskRestMethod (oMethod).`;
182
+ let expectedTokens = [
183
+ [
184
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
185
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
186
+ { "startIndex": 3, "endIndex": 22, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Class'
187
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
188
+ { "startIndex": 23, "endIndex": 31, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GetClass'
189
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
190
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
191
+ { "startIndex": 33, "endIndex": 45, "scopes": ["source.abl", "variable.other.abl"] }, // 'pcEntityName'
192
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
193
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
194
+ { "startIndex": 47, "endIndex": 50, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IsA'
195
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl"] }, // ' '
196
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
197
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl"] }, // ' '
198
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
199
+ { "startIndex": 54, "endIndex": 86, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'Consultingwerk.OERA.BusinessTask'
200
+ { "startIndex": 86, "endIndex": 87, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
201
+ { "startIndex": 87, "endIndex": 89, "scopes": ["source.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
202
+ { "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
203
+ { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl"] }, // ' '
204
+ { "startIndex": 91, "endIndex": 93, "scopes": ["source.abl", "keyword.other.abl"] } // 'or'
205
+ ],
206
+ [
207
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
208
+ { "startIndex": 1, "endIndex": 20, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Class'
209
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
210
+ { "startIndex": 21, "endIndex": 29, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GetClass'
211
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
212
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
213
+ { "startIndex": 31, "endIndex": 43, "scopes": ["source.abl", "variable.other.abl"] }, // 'pcEntityName'
214
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
215
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
216
+ { "startIndex": 45, "endIndex": 48, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IsA'
217
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl"] }, // ' '
218
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
219
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl"] }, // ' '
220
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
221
+ { "startIndex": 52, "endIndex": 87, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'Consutingwerk.OERA.IBusinessService'
222
+ { "startIndex": 87, "endIndex": 88, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
223
+ { "startIndex": 88, "endIndex": 90, "scopes": ["source.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
224
+ { "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
225
+ { "startIndex": 91, "endIndex": 92, "scopes": ["source.abl"] }, // ' '
226
+ { "startIndex": 92, "endIndex": 95, "scopes": ["source.abl", "keyword.other.abl"] } // 'and'
227
+ ],
228
+ [
229
+ { "startIndex": 0, "endIndex": 19, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Class'
230
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
231
+ { "startIndex": 20, "endIndex": 28, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GetClass'
232
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
233
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
234
+ { "startIndex": 30, "endIndex": 42, "scopes": ["source.abl", "variable.other.abl"] }, // 'pcEntityName'
235
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
236
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl"] }, // ' '
237
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
238
+ { "startIndex": 45, "endIndex": 48, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IsA'
239
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl"] }, // ' '
240
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
241
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl"] }, // ' '
242
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
243
+ { "startIndex": 52, "endIndex": 101, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'Consultingwerk.SmartFramework.SmartBusinessEntity'
244
+ { "startIndex": 101, "endIndex": 102, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
245
+ { "startIndex": 102, "endIndex": 104, "scopes": ["source.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
246
+ { "startIndex": 104, "endIndex": 105, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
247
+ { "startIndex": 105, "endIndex": 106, "scopes": ["source.abl"] }, // ' '
248
+ { "startIndex": 106, "endIndex": 108, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'eq'
249
+ { "startIndex": 108, "endIndex": 109, "scopes": ["source.abl"] }, // ' '
250
+ { "startIndex": 109, "endIndex": 114, "scopes": ["source.abl", "constant.language.abl"] }, // 'false'
251
+ { "startIndex": 114, "endIndex": 115, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
252
+ { "startIndex": 115, "endIndex": 116, "scopes": ["source.abl"] }, // ' '
253
+ { "startIndex": 116, "endIndex": 120, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
254
+ ],
255
+ [
256
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
257
+ { "startIndex": 2, "endIndex": 23, "scopes": ["source.abl", "variable.other.abl"] }, // 'poRestResourceService'
258
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
259
+ { "startIndex": 24, "endIndex": 54, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'RegisterBusinessTaskRestMethod'
260
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl"] }, // ' '
261
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
262
+ { "startIndex": 56, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oMethod'
263
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
264
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
265
+ ]
266
+ ];
267
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
268
+ })
@@ -111,10 +111,10 @@ end constructor.`;
111
111
  { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
112
112
  { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
113
113
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
114
- { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'List'
115
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
116
- { "startIndex": 39, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Package.Thing'
117
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
114
+ { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'List'
115
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "punctuation.definition.generic.begin.abl"] }, // '<'
116
+ { "startIndex": 39, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Package.Thing'
117
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "punctuation.definition.generic.end.abl"] }, // '>'
118
118
  { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
119
119
  ],
120
120
  [
@@ -122,10 +122,10 @@ end method.`;
122
122
  { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
123
123
  { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
124
124
  { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
125
- { "startIndex": 54, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'List'
126
- { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
127
- { "startIndex": 59, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Package.Thing'
128
- { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
125
+ { "startIndex": 54, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'List'
126
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "punctuation.definition.generic.begin.abl"] }, // '<'
127
+ { "startIndex": 59, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Package.Thing'
128
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl", "meta.generic.abl", "punctuation.definition.generic.end.abl"] }, // '>'
129
129
  { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
130
130
  ],
131
131
  [
@@ -243,8 +243,6 @@ end method.`;
243
243
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
244
244
  })
245
245
 
246
-
247
-
248
246
  describe('', () => {
249
247
  let statement =
250
248
  `interface iFace:
@@ -317,4 +315,43 @@ end interface.`;
317
315
  ]
318
316
  ];
319
317
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
318
+ })
319
+
320
+ describe('', () => {
321
+ let statement = `// method name and parametres are the correct scopes
322
+ METHOD STATIC LOGICAL XlsxVersCsv
323
+ (p-file AS CHARACTER,p-sheetnum AS INT ):`;
324
+
325
+ let expectedTokens = [
326
+ [
327
+ { "startIndex": 0, "endIndex": 52, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// method name and parametres are the correct scopes'
328
+ ],
329
+ [
330
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'METHOD'
331
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
332
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'STATIC'
333
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
334
+ { "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'LOGICAL'
335
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
336
+ { "startIndex": 22, "endIndex": 33, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] } // 'XlsxVersCsv'
337
+ ],
338
+ [
339
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
340
+ { "startIndex": 1, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'p-file'
341
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
342
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'AS'
343
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
344
+ { "startIndex": 11, "endIndex": 20, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'CHARACTER'
345
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
346
+ { "startIndex": 21, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'p-sheetnum'
347
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
348
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'AS'
349
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
350
+ { "startIndex": 35, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'INT'
351
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
352
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
353
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
354
+ ]
355
+ ];
356
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
320
357
  })
@@ -0,0 +1,21 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `DISPLAY myArray[1 FOR 4].// with and frame are variables`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'DISPLAY'
8
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
9
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'myArray'
10
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] }, // '['
11
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '1'
12
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
13
+ { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "meta.array.literal.abl", "keyword.other.abl"] }, // 'FOR'
14
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
15
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '4'
16
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] }, // ']'
17
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
18
+ { "startIndex": 25, "endIndex": 56, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// with and frame are variables'
19
+ ];
20
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
21
+ })
@@ -43,7 +43,7 @@ END.`;
43
43
  ],
44
44
  [
45
45
  { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] }, // ' '
46
- { "startIndex": 1, "endIndex": 11, "scopes": ["source.abl", "meta.block.label.abl"] }, // 'LOOP-TRADE'
46
+ { "startIndex": 1, "endIndex": 11, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'LOOP-TRADE'
47
47
  { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
48
48
  ],
49
49
  [
@@ -131,7 +131,7 @@ END.`;
131
131
  { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl"] }, // ' '
132
132
  { "startIndex": 79, "endIndex": 83, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEXT'
133
133
  { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl"] }, // ' '
134
- { "startIndex": 84, "endIndex": 94, "scopes": ["source.abl", "meta.block.label.abl"] }, // 'LOOP-TRADE'
134
+ { "startIndex": 84, "endIndex": 94, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'LOOP-TRADE'
135
135
  { "startIndex": 94, "endIndex": 95, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
136
136
  ],
137
137
  [
@@ -159,7 +159,7 @@ END.`;
159
159
  { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
160
160
  { "startIndex": 35, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEXT'
161
161
  { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
162
- { "startIndex": 40, "endIndex": 50, "scopes": ["source.abl", "meta.block.label.abl"] }, // 'LOOP-TRADE'
162
+ { "startIndex": 40, "endIndex": 50, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'LOOP-TRADE'
163
163
  { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
164
164
  ],
165
165
  [
@@ -187,7 +187,7 @@ END.`;
187
187
  { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl"] }, // ' '
188
188
  { "startIndex": 53, "endIndex": 57, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NEXT'
189
189
  { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl"] }, // ' '
190
- { "startIndex": 58, "endIndex": 68, "scopes": ["source.abl", "meta.block.label.abl"] }, // 'LOOP-TRADE'
190
+ { "startIndex": 58, "endIndex": 68, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'LOOP-TRADE'
191
191
  { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
192
192
  ],
193
193
  [
@@ -0,0 +1,97 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `abc = guid.`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "variable.other.abl"] }, // 'abc'
8
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
9
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
10
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
11
+ { "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "support.function.abl"] }, // 'guid'
12
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
13
+ ];
14
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
15
+ })
16
+
17
+ describe('', () => {
18
+ let statement = `pwr = guid(generate-uuid).`;
19
+ let expectedTokens = [
20
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "variable.other.abl"] }, // 'pwr'
21
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
22
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
23
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
24
+ { "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'guid'
25
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
26
+ { "startIndex": 11, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'generate-uuid'
27
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
28
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
29
+ ];
30
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
31
+ })
32
+
33
+ describe('', () => {
34
+ let statement = `DEFINE VARIABLE MyUUID AS RAW NO-UNDO.
35
+ DEFINE VARIABLE vGUID AS CHARACTER NO-UNDO.
36
+
37
+ ASSIGN
38
+ MyUUID = GENERATE-UUID
39
+ vGUID = GUID(MyUUID).`;
40
+ let expectedTokens = [
41
+ [
42
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'DEFINE'
43
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
44
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'VARIABLE'
45
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
46
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'MyUUID'
47
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
48
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'AS'
49
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
50
+ { "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'RAW'
51
+ { "startIndex": 29, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
52
+ { "startIndex": 36, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'NO-UNDO'
53
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
54
+ ],
55
+ [
56
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'DEFINE'
57
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
58
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'VARIABLE'
59
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
60
+ { "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'vGUID'
61
+ { "startIndex": 21, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
62
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'AS'
63
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
64
+ { "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'CHARACTER'
65
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
66
+ { "startIndex": 36, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'NO-UNDO'
67
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
68
+ ],
69
+ [
70
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
71
+ ],
72
+ [
73
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] } // 'ASSIGN'
74
+ ],
75
+ [
76
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
77
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'MyUUID'
78
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
79
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
80
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
81
+ { "startIndex": 11, "endIndex": 24, "scopes": ["source.abl", "support.function.abl"] } // 'GENERATE-UUID'
82
+ ],
83
+ [
84
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
85
+ { "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'vGUID'
86
+ { "startIndex": 7, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
87
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
88
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
89
+ { "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'GUID'
90
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
91
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'MyUUID'
92
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
93
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
94
+ ]
95
+ ];
96
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
97
+ })
@@ -0,0 +1,66 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `{&_proparse_ prolint-nowarn(overflow)}
6
+ assign attrValue = BuildAttributeValue(string(attribNames[attribLoop]), annoData).`;
7
+ let expectedTokens = [
8
+ [
9
+ { "startIndex": 0, "endIndex": 38, "scopes": ["source.abl", "storage.type.function.abl"] } // '{&_proparse_ prolint-nowarn(overflow)}'
10
+ ],
11
+ [
12
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
13
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
14
+ { "startIndex": 7, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'attrValue'
15
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
16
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
17
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
18
+ { "startIndex": 19, "endIndex": 38, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'BuildAttributeValue'
19
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
20
+ { "startIndex": 39, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'string'
21
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
22
+ { "startIndex": 46, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'attribNames'
23
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // '['
24
+ { "startIndex": 58, "endIndex": 68, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'attribLoop'
25
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ']'
26
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
27
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
28
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
29
+ { "startIndex": 72, "endIndex": 80, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'annoData'
30
+ { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
31
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
32
+ ]
33
+ ];
34
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
35
+ })
36
+
37
+ describe('', () => {
38
+ let statement = `define variable i as integer no-undo init {&DEBUG-WAIT}.`;
39
+ let expectedTokens = [
40
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
41
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
42
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
43
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
44
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'i'
45
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
46
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
47
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
48
+ { "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'integer'
49
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
50
+ { "startIndex": 29, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
51
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
52
+ { "startIndex": 37, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'init'
53
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
54
+ { "startIndex": 42, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "storage.type.function.abl"] }, // '{&DEBUG-WAIT}'
55
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
56
+ ];
57
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
58
+ })
59
+
60
+ describe('', () => {
61
+ let statement = `{&WINDOW-SYSTEM}`;
62
+ let expectedTokens = [
63
+ { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "storage.type.function.abl"] } // '{&WINDOW-SYSTEM}'
64
+ ];
65
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
66
+ })