abl-tmlanguage 1.3.27 → 1.3.29

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 (139) hide show
  1. package/README.md +2 -1
  2. package/abl.tmLanguage.json +290 -111
  3. package/package.json +5 -2
  4. package/.github/workflows/ci.yml +0 -36
  5. package/CHANGELOG.md +0 -130
  6. package/abl-functions.txt +0 -548
  7. package/abl-keywords.txt +0 -416
  8. package/abl-methods.txt +0 -1053
  9. package/index.mjs +0 -410
  10. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +0 -17
  11. package/spec/annotations/annotation.spec.js +0 -366
  12. package/spec/array-extent/issue#5.spec.js +0 -26
  13. package/spec/blocks/block-labels.spec.js +0 -201
  14. package/spec/blocks/block-options.spec.js +0 -174
  15. package/spec/blocks/finally-blocks.spec.js +0 -90
  16. package/spec/blocks/on-quit.spec.js +0 -59
  17. package/spec/comments/comment-in-block-statement.spec.js +0 -153
  18. package/spec/comments/comment-in-for-each.spec.js +0 -105
  19. package/spec/comments/comment-in-function-args.spec.js +0 -88
  20. package/spec/comments/spacious-comment.spec.js +0 -73
  21. package/spec/comments/vscode-abl-issue#127.spec.js +0 -165
  22. package/spec/create-widgets/create-window.spec.js +0 -224
  23. package/spec/db-table-and-field/buffer-copy.spec.js +0 -246
  24. package/spec/db-table-and-field/create-alias.spec.js +0 -130
  25. package/spec/db-table-and-field/create-record.spec.js +0 -75
  26. package/spec/db-table-and-field/field-in-function.spec.js +0 -58
  27. package/spec/db-table-and-field/fields-except.spec.js +0 -69
  28. package/spec/db-table-and-field/find-record.spec.js +0 -158
  29. package/spec/db-table-and-field/foreach.spec.js +0 -588
  30. package/spec/db-table-and-field/issue#88.spec.js +0 -120
  31. package/spec/db-table-and-field/new-record.spec.js +0 -250
  32. package/spec/define/define-browse.spec.js +0 -454
  33. package/spec/define/define-button.spec.js +0 -233
  34. package/spec/define/define-query.spec.js +0 -144
  35. package/spec/define/define-rectangle.spec.js +0 -47
  36. package/spec/define-buffer/create-buffer.spec.js +0 -155
  37. package/spec/define-buffer/simple-single-line.spec.js +0 -155
  38. package/spec/define-enum/type-name.spec.js +0 -200
  39. package/spec/define-event/simple-single-line.spec.js +0 -61
  40. package/spec/define-frame/issue#173.spec.js +0 -580
  41. package/spec/define-parameter/simple-single-line.spec.js +0 -228
  42. package/spec/define-property/property-getter.spec.js +0 -165
  43. package/spec/define-stream/simple-single-line.spec.js +0 -42
  44. package/spec/define-temp-table/define-dataset.spec.js +0 -217
  45. package/spec/define-temp-table/define-temp-table.spec.js +0 -605
  46. package/spec/define-variable/define-like.spec.js +0 -78
  47. package/spec/define-variable/extent.spec.js +0 -778
  48. package/spec/define-variable/initial.spec.js +0 -126
  49. package/spec/define-variable/issue#6.spec.js +0 -280
  50. package/spec/define-variable/issue#9.spec.js +0 -45
  51. package/spec/define-variable/simple-single-line.spec.js +0 -181
  52. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +0 -62
  53. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +0 -65
  54. package/spec/define-variable/tm-issue#2.spec.js +0 -25
  55. package/spec/define-variable/var-statement.spec.js +0 -467
  56. package/spec/do/do-blocks.spec.js +0 -289
  57. package/spec/do/issue#3.spec.js +0 -83
  58. package/spec/do/stop-after.spec.js +0 -79
  59. package/spec/for-each/for-each.spec.js +0 -111
  60. package/spec/for-each/issue#321.spec.js +0 -116
  61. package/spec/for-each/vscode-abl.issue#166.spec.js +0 -83
  62. package/spec/function-call/can-find.spec.js +0 -239
  63. package/spec/function-call/misc-abl-functions.spec.js +0 -59
  64. package/spec/function-call/nested-functions.spec.js +0 -245
  65. package/spec/function-call/pass-table.spec.js +0 -116
  66. package/spec/function-call/set-size.spec.js +0 -56
  67. package/spec/function-call/udf-calls.spec.js +0 -50
  68. package/spec/function-call/vscode-abl-issue#19.spec.js +0 -129
  69. package/spec/function-definition/vscode-abl-issue#166.spec.js +0 -446
  70. package/spec/global-scoped-define/global-define.spec.js +0 -64
  71. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +0 -70
  72. package/spec/global-scoped-define/undefine.spec.js +0 -44
  73. package/spec/include/abl-tmlanguage-issues#5.spec.js +0 -40
  74. package/spec/include/include-file-name.spec.js +0 -267
  75. package/spec/include/unnamed-arguments.spec.js +0 -38
  76. package/spec/include/vscode-abl-issue#45.spec.js +0 -20
  77. package/spec/include/vscode-abl-issue#77.spec.js +0 -128
  78. package/spec/include/vscode-abl-issue#80.spec.js +0 -50
  79. package/spec/input-output/input-from.spec.js +0 -504
  80. package/spec/input-output/output-to.spec.js +0 -456
  81. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +0 -98
  82. package/spec/method-attribute-property-call/connected-method.spec.js +0 -29
  83. package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +0 -53
  84. package/spec/method-attribute-property-call/get-set-method-name.spec.js +0 -141
  85. package/spec/method-attribute-property-call/method-call.spec.js +0 -268
  86. package/spec/method-attribute-property-call/nested-property-call.spec.js +0 -35
  87. package/spec/method-attribute-property-call/unqualified-method-call.spec.js +0 -41
  88. package/spec/method-definition/constructor.spec.js +0 -174
  89. package/spec/method-definition/method.spec.js +0 -541
  90. package/spec/misc-statements/array-for.spec.js +0 -21
  91. package/spec/misc-statements/case-statement.spec.js +0 -96
  92. package/spec/misc-statements/class-in-var-name.spec.js +0 -204
  93. package/spec/misc-statements/copy-lob.spec.js +0 -137
  94. package/spec/misc-statements/def-in-name.spec.js +0 -20
  95. package/spec/misc-statements/delete-objects.spec.js +0 -65
  96. package/spec/misc-statements/do-in-name.spec.js +0 -259
  97. package/spec/misc-statements/event-subscribe.spec.js +0 -308
  98. package/spec/misc-statements/export-delimiter.spec.js +0 -37
  99. package/spec/misc-statements/guid.spec.js +0 -97
  100. package/spec/misc-statements/if-then.spec.js +0 -454
  101. package/spec/misc-statements/issue#173.spec.js +0 -99
  102. package/spec/misc-statements/message-statement.spec.js +0 -21
  103. package/spec/misc-statements/record-buffer-functions.spec.js +0 -73
  104. package/spec/misc-statements/release.spec.js +0 -41
  105. package/spec/misc-statements/return-statement.spec.js +0 -64
  106. package/spec/misc-statements/skip-statement-and-fuction.spec.js +0 -35
  107. package/spec/misc-statements/system-handles.spec.js +0 -108
  108. package/spec/numbers/scientific-notation.spec.js +0 -212
  109. package/spec/operators/operators.spec.js +0 -149
  110. package/spec/operators/safe-navigation-operator.spec.js +0 -246
  111. package/spec/preprocesors/issue166.spec.js +0 -91
  112. package/spec/preprocesors/preprocessor-functions.spec.js +0 -77
  113. package/spec/preprocesors/proparse-preprocessor.spec.js +0 -90
  114. package/spec/procedure-definition/empty-proc.spec.js +0 -134
  115. package/spec/procedure-definition/trigger-procedure.spec.js +0 -132
  116. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +0 -46
  117. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +0 -31
  118. package/spec/procedure-definition/vscode-abl-issue#325.spec.js +0 -88
  119. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +0 -39
  120. package/spec/run-statement/run-statement.spec.js +0 -971
  121. package/spec/shared.js +0 -104
  122. package/spec/strings/translation-attribute.spec.js +0 -52
  123. package/spec/strings/vscode-abl-issue#11.spec.js +0 -109
  124. package/spec/strings/vscode-abl-issue#28.spec.js +0 -31
  125. package/spec/type-name/argument.spec.js +0 -207
  126. package/spec/type-name/cast.spec.js +0 -163
  127. package/spec/type-name/define-class.spec.js +0 -555
  128. package/spec/type-name/define-enum.spec.js +0 -44
  129. package/spec/type-name/define-interface.spec.js +0 -159
  130. package/spec/type-name/define-property.spec.js +0 -301
  131. package/spec/type-name/define-temp-table.spec.js +0 -434
  132. package/spec/type-name/define-type-spec.js +0 -435
  133. package/spec/type-name/define-variable-property.spec.js +0 -264
  134. package/spec/type-name/define-variable.spec.js +0 -386
  135. package/spec/type-name/get-class.spec.js +0 -91
  136. package/spec/type-name/new.spec.js +0 -185
  137. package/spec/type-name/parameter-as.spec.js +0 -978
  138. package/spec/type-name/type-name.spec.js +0 -880
  139. package/spec/type-name/using.spec.js +0 -160
package/spec/shared.js DELETED
@@ -1,104 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const vsctm = require('vscode-textmate');
4
- const oniguruma = require('vscode-oniguruma');
5
- const { assert } = require('chai');
6
-
7
- function readFile(p) {
8
- return new Promise((resolve, reject) => {
9
- fs.readFile(p, (error, data) => error ? reject(error) : resolve(data));
10
- })
11
- }
12
-
13
- const wasmBin = fs.readFileSync(path.join(__dirname, '../node_modules/vscode-oniguruma/release/onig.wasm')).buffer;
14
- const vscodeOnigurumaLib = oniguruma.loadWASM(wasmBin).then(() => {
15
- return {
16
- createOnigScanner(patterns) { return new oniguruma.OnigScanner(patterns); },
17
- createOnigString(s) { return new oniguruma.OnigString(s); }
18
- };
19
- });
20
- // Create a registry that can create a grammar from a scope name.
21
- const registry = new vsctm.Registry({
22
- onigLib: vscodeOnigurumaLib,
23
- loadGrammar: (scopeName) => {
24
- if (scopeName === 'source.abl') {
25
- return readFile('./abl.tmLanguage.json').then(data => vsctm.parseRawGrammar(data.toString(), './abl.tmLanguage.json'))
26
- }
27
- console.log(`Unknown scope name: ${scopeName}`);
28
- return null;
29
- }
30
- });
31
-
32
- afterEach(function () {
33
- console.log(this.currentTest.file);
34
- })
35
-
36
- module.exports = {
37
- itShouldMatchExpectedScopes: function (statement, expectedTokens) {
38
- describe(`${statement}`, () => {
39
- it('should match expected scopes', () => {
40
- return registry.loadGrammar('source.abl').then(grammar => {
41
- let tokenResult;
42
-
43
- let lines = statement.split(/\n/g);
44
- let nbLines = lines.length;
45
- if (nbLines === 1) {
46
- //singleline
47
- tokenResult = grammar.tokenizeLine(statement);
48
-
49
- // More human-readable output
50
- //console.log(`\nTokenizing line: ${statement}`);
51
- for (let j = 0; j < tokenResult.tokens.length; j++) {
52
- const token = tokenResult.tokens[j];
53
-
54
- // More human-readable output
55
- // Formatted as input-values
56
- var O = token.scopes.map((e) => ('"' + e + '",')).join(' ').replace(/,\s*$/, "");
57
- if (j < tokenResult.tokens.length - 1 ) {
58
- console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] }, // '${statement.substring(token.startIndex, token.endIndex)}'`,);
59
- } else {
60
- console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] } // '${statement.substring(token.startIndex, token.endIndex)}'`,);
61
- }
62
- }
63
- } else {
64
- //multiline, we stack the tokens in an array
65
- let ruleStack = null;
66
- tokenResult = {
67
- tokens: []
68
- };
69
- lines.forEach(line => {
70
- let r = grammar.tokenizeLine(line, ruleStack);
71
-
72
- ruleStack = r.ruleStack;
73
- tokenResult.tokens.push(r.tokens);
74
-
75
- // More human-readable output
76
- //console.log(`\nTokenizing line: ${line}`);
77
- // Formatted as input-values
78
- console.log(`[`);
79
- for (let j = 0; j < r.tokens.length; j++) {
80
- const token = r.tokens[j];
81
- // More human-readable output
82
- // console.log(` - token from ${token.startIndex} to ${token.endIndex} ` +
83
- // `(${line.substring(token.startIndex, token.endIndex)}) ` +
84
- // `with scopes ${token.scopes.join(', ')}`
85
- // );
86
-
87
- // Formatted as input-values
88
- var O = token.scopes.map((e) => ('"' + e + '",')).join(' ').replace(/,\s*$/, "");
89
- if (j < r.tokens.length - 1 ) {
90
- console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] }, // '${line.substring(token.startIndex, token.endIndex)}'`,);
91
- } else {
92
- console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] } // '${line.substring(token.startIndex, token.endIndex)}'`,);
93
- }
94
- }
95
- // Formatted as input-values
96
- console.log(`],`);
97
- });
98
- }
99
- assert.deepEqual(tokenResult.tokens, expectedTokens, JSON.stringify(tokenResult.tokens));
100
- })
101
- })
102
- })
103
- }
104
- }
@@ -1,52 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- // the :R in the method name should not be marked as a string colon-R
6
- let statement = `if valid-object(oEventArgs:ResponseBody) then
7
- assign oResponse:ContentType = "application/json":u
8
- oResponse:Entity = oEventArgs:ResponseBody.`;
9
- let expectedTokens = [
10
- [
11
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
12
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
13
- { "startIndex": 3, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'valid-object'
14
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
15
- { "startIndex": 16, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oEventArgs'
16
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
17
- { "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'ResponseBody'
18
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
19
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
20
- { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
21
- ],
22
- [
23
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
24
- { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
25
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
26
- { "startIndex": 11, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'oResponse'
27
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
28
- { "startIndex": 21, "endIndex": 32, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ContentType'
29
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
30
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
31
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
32
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
33
- { "startIndex": 36, "endIndex": 52, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'application/json'
34
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
35
- { "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] } // ':u'
36
- ],
37
- [
38
- { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
39
- { "startIndex": 12, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] }, // 'oResponse'
40
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
41
- { "startIndex": 22, "endIndex": 28, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Entity'
42
- { "startIndex": 28, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
43
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
44
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
45
- { "startIndex": 36, "endIndex": 46, "scopes": ["source.abl", "variable.other.abl"] }, // 'oEventArgs'
46
- { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
47
- { "startIndex": 47, "endIndex": 59, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ResponseBody'
48
- { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
49
- ]
50
- ];
51
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
52
- })
@@ -1,109 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement =
6
- `def var DirChar as char no-undo.
7
- DirChar = if opsys begins 'win':u then '\\':u else '/':u.`;
8
- let expectedTokens = [
9
- [
10
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'def'
11
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
12
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
13
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
14
- { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'DirChar'
15
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
16
- { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
17
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
18
- { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'char'
19
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
20
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
21
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
22
- ],
23
- [
24
- { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'DirChar'
25
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
26
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
27
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
28
- { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
29
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
30
- { "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "support.function.abl"] }, // 'opsys'
31
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
32
- { "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'begins'
33
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
34
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
35
- { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'win'
36
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
37
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "string.quoted.single.abl", "support.other.abl"] }, // ':u'
38
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
39
- { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
40
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
41
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
42
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.quoted.single.abl"] }, // '\'
43
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
44
- { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "string.quoted.single.abl", "support.other.abl"] }, // ':u'
45
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
46
- { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
47
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
48
- { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
49
- { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.quoted.single.abl"] }, // '/'
50
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
51
- { "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "string.quoted.single.abl", "support.other.abl"] }, // ':u'
52
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
53
- ]
54
- ];
55
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
56
- })
57
- describe('', () => {
58
- let statement =
59
- `def var DirChar as char no-undo.
60
- DirChar = if opsys begins "win":u then "\\":u else "/":u.`;
61
- let expectedTokens = [
62
- [
63
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'def'
64
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
65
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
66
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
67
- { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'DirChar'
68
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
69
- { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
70
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
71
- { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'char'
72
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
73
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
74
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
75
- ],
76
- [
77
- { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'DirChar'
78
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
79
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
80
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
81
- { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
82
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
83
- { "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "support.function.abl"] }, // 'opsys'
84
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
85
- { "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'begins'
86
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
87
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
88
- { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'win'
89
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
90
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
91
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
92
- { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
93
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
94
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
95
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.quoted.double.abl"] }, // '\'
96
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
97
- { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
98
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
99
- { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
100
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
101
- { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
102
- { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.quoted.double.abl"] }, // '/'
103
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
104
- { "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
105
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
106
- ]
107
- ];
108
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
109
- })
@@ -1,31 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `replace("123", "1", ")"). message 1.`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'replace'
8
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
9
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
10
- { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '123'
11
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
12
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
13
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
14
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
15
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '1'
16
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
17
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
18
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
19
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
20
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // ')'
21
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
22
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
23
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
24
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
25
- { "startIndex": 26, "endIndex": 33, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
26
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
27
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1'
28
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
29
- ];
30
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
31
- })
@@ -1,207 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
-
5
- describe('', () => {
6
- let statement = `new foo.bar(y, foo.bar.baz:Property) `;
7
-
8
- let expectedTokens = [
9
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
10
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
11
- { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar'
12
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
13
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'y'
14
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
15
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
16
- { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
17
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
18
- { "startIndex": 27, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'Property'
19
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
20
- { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl"] } // ' '
21
- ];
22
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
23
- })
24
-
25
- describe('', () => {
26
- let statement = `new foo.bar("y":L9, new foo.bar.baz()) `;
27
- let expectedTokens = [
28
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
29
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
30
- { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar'
31
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
32
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
33
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'y'
34
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
35
- { "startIndex": 15, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':L9'
36
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
37
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
38
- { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'new'
39
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
40
- { "startIndex": 24, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
41
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
42
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
43
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
44
- { "startIndex": 38, "endIndex": 40, "scopes": ["source.abl"] } // ' '
45
- ];
46
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
47
- })
48
-
49
- describe('', () => {
50
- let statement = `x = new baz (true, today, now, ?, -12).`;
51
-
52
- let expectedTokens = [
53
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
54
- { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
55
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
56
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
57
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
58
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
59
- { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'baz'
60
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
61
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
62
- { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
63
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
64
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
65
- { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'today'
66
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
67
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
68
- { "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'now'
69
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
70
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
71
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
72
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
73
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
74
- { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '-12'
75
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
76
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
77
-
78
- ];
79
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
80
- })
81
-
82
- describe('', () => {
83
- let statement = `cast ( q:Prop, foo.bar.baz ) `;
84
-
85
- let expectedTokens = [
86
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
87
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
88
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
89
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
90
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
91
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
92
- { "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Prop'
93
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
94
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
95
- { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
96
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
97
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
98
- { "startIndex": 28, "endIndex": 30, "scopes": ["source.abl"] } // ' '
99
- ];
100
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
101
- })
102
-
103
- describe('', () => {
104
- let statement = `cast ( ttable.field, foo.bar.baz ) `;
105
-
106
- let expectedTokens = [
107
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
108
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
109
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
110
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
111
- { "startIndex": 7, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "storage.data.table.abl"] }, // 'ttable.field'
112
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
113
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
114
- { "startIndex": 21, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
115
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
116
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
117
- { "startIndex": 34, "endIndex": 36, "scopes": ["source.abl"] } // ' '
118
- ];
119
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
120
- })
121
-
122
- describe('', () => {
123
- let statement = `cast ( q, foo.bar.baz ) `;
124
-
125
- let expectedTokens = [
126
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
127
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
128
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
129
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
130
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
131
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
132
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
133
- { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
134
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
135
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
136
- { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl"] } // ' '
137
- ];
138
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
139
- })
140
-
141
- describe('', () => {
142
- let statement = `cast ( q, "foo.bar.baz" ) `;
143
-
144
- let expectedTokens = [
145
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
146
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
147
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
148
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
149
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
150
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
151
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
152
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
153
- { "startIndex": 11, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl"] }, // 'foo.bar.baz'
154
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
155
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
156
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
157
- { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] } // ' '
158
- ];
159
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
160
- })
161
-
162
- describe('', () => {
163
- let statement = `cast ( q, "foo.bar.baz":u ) `;
164
-
165
- let expectedTokens = [
166
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
167
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
168
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
169
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
170
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
171
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
172
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
173
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
174
- { "startIndex": 11, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl"] }, // 'foo.bar.baz'
175
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
176
- { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
177
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
178
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
179
- { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl"] } // ' '
180
- ];
181
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
182
- })
183
-
184
- describe('', () => {
185
- let statement = `cast ( q, Map<foo.bar, baz> ) `;
186
-
187
- let expectedTokens = [
188
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
189
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
190
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
191
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
192
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
193
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
194
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl"] }, // ' '
195
- { "startIndex": 10, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Map'
196
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "punctuation.definition.generic.begin.abl"] }, // '<'
197
- { "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'foo.bar'
198
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "punctuation.separator.comma.abl"] }, // ','
199
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl"] }, // ' '
200
- { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'baz'
201
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.generic.abl", "punctuation.definition.generic.end.abl"] }, // '>'
202
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
203
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
204
- { "startIndex": 29, "endIndex": 31, "scopes": ["source.abl"] } // ' '
205
- ];
206
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
207
- })