abl-tmlanguage 1.3.0 → 1.3.2
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 +12 -6
- package/abl.tmLanguage.json +2941 -2109
- package/index.js +293 -27
- package/package.json +1 -1
- package/spec/blocks/on-quit.spec.js +1 -1
- package/spec/comments/comment-in-block-statement.spec.js +147 -0
- package/spec/comments/comment-in-function-args.spec.js +45 -0
- package/spec/comments/vscode-abl-issue#127.spec.js +46 -46
- package/spec/db-table-and-field/field-in-function.spec.js +58 -0
- package/spec/define-enum/type-name.spec.js +200 -0
- package/spec/define-event/simple-single-line.spec.js +61 -0
- package/spec/define-property/property-getter.spec.js +165 -0
- package/spec/define-stream/simple-single-line.spec.js +3 -4
- package/spec/define-temp-table/define-dataset.spec.js +66 -0
- package/spec/define-temp-table/define-index.spec.js +135 -1
- package/spec/do/do-blocks.spec.js +26 -66
- package/spec/do/issue#3.spec.js +2 -2
- package/spec/do/stop-after.spec.js +79 -0
- package/spec/function-call/nested-functions.spec.js +121 -3
- package/spec/function-call/pass-table.spec.js +35 -0
- package/spec/function-call/set-size.spec.js +19 -0
- package/spec/function-call/vscode-abl-issue#19.spec.js +3 -3
- package/spec/include/abl-tmlanguage-issues#5.spec.js +2 -2
- package/spec/include/unnamed-arguments.spec.js +39 -0
- package/spec/include/vscode-abl-issue#45.spec.js +1 -1
- package/spec/include/vscode-abl-issue#77.spec.js +5 -5
- package/spec/include/vscode-abl-issue#80.spec.js +5 -4
- package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +4 -4
- package/spec/method-attribute-property-call/method-call.spec.js +2 -2
- package/spec/method-attribute-property-call/unqualified-method-call.spec.js +42 -0
- package/spec/misc-statements/def-in-name.spec.js +20 -0
- package/spec/misc-statements/do-in-name.spec.js +259 -0
- package/spec/misc-statements/event-subscribe.spec.js +309 -0
- package/spec/misc-statements/if-then.spec.js +44 -2
- package/spec/misc-statements/release.spec.js +42 -0
- package/spec/misc-statements/return-statement.spec.js +11 -11
- package/spec/operators/operators.spec.js +1 -1
- package/spec/procedure-definition/empty-proc.spec.js +28 -3
- package/spec/procedure-definition/vscode-abl-issue#22.spec.js +1 -1
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +2 -2
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +1 -1
- package/spec/run-statement/run-statement.spec.js +7 -7
- package/spec/strings/translation-attribute.spec.js +1 -1
- package/spec/strings/vscode-abl-issue#11.spec.js +12 -13
- package/spec/type-name/argument.spec.js +2 -2
- package/spec/type-name/cast.spec.js +3 -3
- package/spec/type-name/define-property.spec.js +48 -106
- package/spec/type-name/define-variable-property.spec.js +40 -40
- package/spec/type-name/new.spec.js +2 -3
- package/spec/type-name/parameter-as.spec.js +49 -3
- package/spec/type-name/type-name.spec.js +3 -3
|
@@ -32,7 +32,7 @@ END.`;
|
|
|
32
32
|
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
33
33
|
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
34
34
|
{ "startIndex": 30, "endIndex": 35, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'throw'
|
|
35
|
-
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "
|
|
35
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
36
36
|
],
|
|
37
37
|
[
|
|
38
38
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
@@ -48,49 +48,6 @@ END.`;
|
|
|
48
48
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
49
49
|
})
|
|
50
50
|
|
|
51
|
-
describe('', () => {
|
|
52
|
-
//label-with-a-dot-inside.spec
|
|
53
|
-
let statement = `
|
|
54
|
-
DO WHILE mI <= 10:
|
|
55
|
-
mI = mI + 1.
|
|
56
|
-
END.`;
|
|
57
|
-
let expectedTokens = [
|
|
58
|
-
[
|
|
59
|
-
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
60
|
-
],
|
|
61
|
-
[
|
|
62
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'DO'
|
|
63
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
64
|
-
{ "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'WHILE'
|
|
65
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
66
|
-
{ "startIndex": 9, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'mI'
|
|
67
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
68
|
-
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // '<='
|
|
69
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
70
|
-
{ "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '10'
|
|
71
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "punctuation.terminator.abl"] } // ':'
|
|
72
|
-
],
|
|
73
|
-
[
|
|
74
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
75
|
-
{ "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "variable.other.abl"] }, // 'mI'
|
|
76
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
77
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
78
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
79
|
-
{ "startIndex": 9, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'mI'
|
|
80
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
81
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+'
|
|
82
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
83
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1'
|
|
84
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
85
|
-
],
|
|
86
|
-
[
|
|
87
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
|
|
88
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
89
|
-
]
|
|
90
|
-
];
|
|
91
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
92
|
-
})
|
|
93
|
-
|
|
94
51
|
describe('', () => {
|
|
95
52
|
let statement = `if plcSerializable begins "~{":U then do on error undo, throw:
|
|
96
53
|
END.`;
|
|
@@ -105,12 +62,12 @@ END.`;
|
|
|
105
62
|
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
106
63
|
{ "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~{'
|
|
107
64
|
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
108
|
-
{ "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "support.other.abl"] }, // ':U'
|
|
65
|
+
{ "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
|
|
109
66
|
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
110
67
|
{ "startIndex": 33, "endIndex": 37, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
111
68
|
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
112
69
|
{ "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
113
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
70
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
114
71
|
{ "startIndex": 41, "endIndex": 43, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
|
|
115
72
|
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
116
73
|
{ "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'error'
|
|
@@ -180,29 +137,32 @@ end.`;
|
|
|
180
137
|
{ "startIndex": 66, "endIndex": 88, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "entity.name.type.abl"] } // 'StopConditionException'
|
|
181
138
|
],
|
|
182
139
|
[
|
|
183
|
-
{ "startIndex": 0, "endIndex":
|
|
184
|
-
{ "startIndex":
|
|
185
|
-
{ "startIndex":
|
|
186
|
-
{ "startIndex":
|
|
187
|
-
{ "startIndex":
|
|
188
|
-
{ "startIndex":
|
|
189
|
-
{ "startIndex":
|
|
190
|
-
{ "startIndex":
|
|
191
|
-
{ "startIndex":
|
|
192
|
-
{ "startIndex":
|
|
140
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
141
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
142
|
+
{ "startIndex": 3, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'substitute'
|
|
143
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
144
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
146
|
+
{ "startIndex": 16, "endIndex": 70, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'A stop condition raised while waiting for the backend.'
|
|
147
|
+
{ "startIndex": 70, "endIndex": 72, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~n'
|
|
148
|
+
{ "startIndex": 72, "endIndex": 80, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'Comp: &1'
|
|
149
|
+
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
150
|
+
{ "startIndex": 81, "endIndex": 88, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.type.function.abl"] }, // '{&TRAN}'
|
|
151
|
+
{ "startIndex": 88, "endIndex": 89, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
|
|
193
152
|
],
|
|
194
153
|
[
|
|
195
|
-
{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
196
|
-
{ "startIndex": 14, "endIndex": 26, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'pcEntityName'
|
|
197
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.block.abl"] }, // ')'
|
|
198
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] } // ','
|
|
154
|
+
{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
155
|
+
{ "startIndex": 14, "endIndex": 26, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'pcEntityName'
|
|
156
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
157
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
|
|
199
158
|
],
|
|
200
159
|
[
|
|
201
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
202
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '0'
|
|
203
|
-
{ "startIndex": 5, "endIndex":
|
|
204
|
-
{ "startIndex":
|
|
205
|
-
{ "startIndex":
|
|
160
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl"] }, // ' '
|
|
161
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '0'
|
|
162
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "meta.brace.round.js"] }, // ')'
|
|
163
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
164
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "storage.type.function.abl"] }, // '&endif'
|
|
165
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
|
|
206
166
|
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
207
167
|
],
|
|
208
168
|
[
|
|
@@ -212,7 +172,7 @@ end.`;
|
|
|
212
172
|
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
213
173
|
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
|
|
214
174
|
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
215
|
-
{ "startIndex": 7, "endIndex": 12, "scopes": ["source.abl", "
|
|
175
|
+
{ "startIndex": 7, "endIndex": 12, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'goo.p'
|
|
216
176
|
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
217
177
|
],
|
|
218
178
|
[
|
package/spec/do/issue#3.spec.js
CHANGED
|
@@ -23,7 +23,7 @@ END.`;
|
|
|
23
23
|
{ "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'TO'
|
|
24
24
|
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
25
25
|
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '3'
|
|
26
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "
|
|
26
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
27
27
|
],
|
|
28
28
|
[
|
|
29
29
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
@@ -59,7 +59,7 @@ END.`;
|
|
|
59
59
|
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // '<='
|
|
60
60
|
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
61
61
|
{ "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '10'
|
|
62
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "
|
|
62
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
63
63
|
],
|
|
64
64
|
[
|
|
65
65
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
//label-with-a-dot-inside.spec
|
|
6
|
+
let statement = `do stop-after 12:
|
|
7
|
+
/* comment */
|
|
8
|
+
end.`;
|
|
9
|
+
let expectedTokens = [
|
|
10
|
+
[
|
|
11
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
12
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 3, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'stop-after'
|
|
14
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '12'
|
|
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": 4, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
21
|
+
{ "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' comment '
|
|
22
|
+
{ "startIndex": 13, "endIndex": 15, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
26
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
27
|
+
]
|
|
28
|
+
]
|
|
29
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
describe('', () => {
|
|
33
|
+
let statement = `do stop-after poParameter:StopAfter:
|
|
34
|
+
if something then return.
|
|
35
|
+
else
|
|
36
|
+
super:Fn().
|
|
37
|
+
end.`;
|
|
38
|
+
let expectedTokens = [
|
|
39
|
+
[
|
|
40
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
41
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
42
|
+
{ "startIndex": 3, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'stop-after'
|
|
43
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
44
|
+
{ "startIndex": 14, "endIndex": 25, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'poParameter'
|
|
45
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
46
|
+
{ "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'StopAfter'
|
|
47
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
51
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
52
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
53
|
+
{ "startIndex": 5, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] }, // 'something'
|
|
54
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
55
|
+
{ "startIndex": 15, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
56
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
57
|
+
{ "startIndex": 20, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] }, // 'return'
|
|
58
|
+
{ "startIndex": 26, "endIndex": 27, "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"] } // 'else'
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
66
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "variable.language.abl"] }, // 'super'
|
|
67
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
68
|
+
{ "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Fn'
|
|
69
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
70
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
71
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
75
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
76
|
+
]
|
|
77
|
+
]
|
|
78
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
79
|
+
})
|
|
@@ -32,7 +32,7 @@ describe('', () => {
|
|
|
32
32
|
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
33
33
|
{ "startIndex": 18, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'characterValues'
|
|
34
34
|
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
35
|
-
{ "startIndex": 34, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
|
|
35
|
+
{ "startIndex": 34, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
|
|
36
36
|
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
|
|
37
37
|
],
|
|
38
38
|
[
|
|
@@ -90,7 +90,7 @@ describe('', () => {
|
|
|
90
90
|
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
91
91
|
{ "startIndex": 18, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '&1 = &2'
|
|
92
92
|
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
93
|
-
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
|
|
93
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
|
|
94
94
|
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
|
|
95
95
|
],
|
|
96
96
|
[
|
|
@@ -117,7 +117,7 @@ describe('', () => {
|
|
|
117
117
|
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
118
118
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '.'
|
|
119
119
|
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
120
|
-
{ "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':u'
|
|
120
|
+
{ "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "support.other.abl"] }, // ':u'
|
|
121
121
|
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
122
122
|
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
123
123
|
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
@@ -126,3 +126,121 @@ describe('', () => {
|
|
|
126
126
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
127
127
|
})
|
|
128
128
|
|
|
129
|
+
describe('', () => {
|
|
130
|
+
let statement = `cParameterField = SUBST("&1&2", LOWER(SUBSTRING(ttUniqueIndex.FieldDataType, 1, 1)), CamelCase(ttUniqueIndex.IndexField)).
|
|
131
|
+
/* don't add a field that is already there, that is bad. */
|
|
132
|
+
IF LOOKUP(SUBST(" &1 AS &2", cParameterField, CAPS(ttUniqueIndex.FieldDataType)), cParameterDefForReplicate) = 0 THEN DO:
|
|
133
|
+
cParameterDefForReplicate = SUBST("&1, &2 AS &3", cParameterDefForReplicate, cParameterField, CAPS(ttUniqueIndex.FieldDataType)).
|
|
134
|
+
END.`;
|
|
135
|
+
|
|
136
|
+
let expectedTokens = [
|
|
137
|
+
[
|
|
138
|
+
{ "startIndex": 0, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'cParameterField'
|
|
139
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
|
|
140
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
141
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
142
|
+
{ "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBST'
|
|
143
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
144
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
145
|
+
{ "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '&1&2'
|
|
146
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
147
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
148
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl"] }, // ' '
|
|
149
|
+
{ "startIndex": 32, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'LOWER'
|
|
150
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
151
|
+
{ "startIndex": 38, "endIndex": 47, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBSTRING'
|
|
152
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
153
|
+
{ "startIndex": 48, "endIndex": 75, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
|
|
154
|
+
{ "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
155
|
+
{ "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
156
|
+
{ "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
|
|
157
|
+
{ "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
158
|
+
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
159
|
+
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
|
|
160
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
161
|
+
{ "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
162
|
+
{ "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
163
|
+
{ "startIndex": 84, "endIndex": 85, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
164
|
+
{ "startIndex": 85, "endIndex": 94, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'CamelCase'
|
|
165
|
+
{ "startIndex": 94, "endIndex": 95, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
166
|
+
{ "startIndex": 95, "endIndex": 119, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.IndexField'
|
|
167
|
+
{ "startIndex": 119, "endIndex": 120, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
168
|
+
{ "startIndex": 120, "endIndex": 121, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
169
|
+
{ "startIndex": 121, "endIndex": 122, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
173
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
174
|
+
{ "startIndex": 4, "endIndex": 59, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' don't add a field that is already there, that is bad. '
|
|
175
|
+
{ "startIndex": 59, "endIndex": 61, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
179
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
|
|
180
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
181
|
+
{ "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'LOOKUP'
|
|
182
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
183
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBST'
|
|
184
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
185
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
186
|
+
{ "startIndex": 19, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // ' &1 AS &2'
|
|
187
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
188
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
189
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
190
|
+
{ "startIndex": 31, "endIndex": 46, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterField'
|
|
191
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
192
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl"] }, // ' '
|
|
193
|
+
{ "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'CAPS'
|
|
194
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
195
|
+
{ "startIndex": 53, "endIndex": 80, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
|
|
196
|
+
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
197
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
198
|
+
{ "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
199
|
+
{ "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
200
|
+
{ "startIndex": 84, "endIndex": 109, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
|
|
201
|
+
{ "startIndex": 109, "endIndex": 110, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
202
|
+
{ "startIndex": 110, "endIndex": 111, "scopes": ["source.abl"] }, // ' '
|
|
203
|
+
{ "startIndex": 111, "endIndex": 112, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
204
|
+
{ "startIndex": 112, "endIndex": 113, "scopes": ["source.abl"] }, // ' '
|
|
205
|
+
{ "startIndex": 113, "endIndex": 114, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '0'
|
|
206
|
+
{ "startIndex": 114, "endIndex": 115, "scopes": ["source.abl"] }, // ' '
|
|
207
|
+
{ "startIndex": 115, "endIndex": 119, "scopes": ["source.abl", "keyword.other.abl"] }, // 'THEN'
|
|
208
|
+
{ "startIndex": 119, "endIndex": 120, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
209
|
+
{ "startIndex": 120, "endIndex": 122, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'DO'
|
|
210
|
+
{ "startIndex": 122, "endIndex": 123, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
214
|
+
{ "startIndex": 6, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
|
|
215
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
|
|
216
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
217
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
218
|
+
{ "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBST'
|
|
219
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
220
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
221
|
+
{ "startIndex": 41, "endIndex": 53, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '&1, &2 AS &3'
|
|
222
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
223
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
224
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
225
|
+
{ "startIndex": 56, "endIndex": 81, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
|
|
226
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
227
|
+
{ "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
|
|
228
|
+
{ "startIndex": 83, "endIndex": 98, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterField'
|
|
229
|
+
{ "startIndex": 98, "endIndex": 99, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
230
|
+
{ "startIndex": 99, "endIndex": 100, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl"] }, // ' '
|
|
231
|
+
{ "startIndex": 100, "endIndex": 104, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'CAPS'
|
|
232
|
+
{ "startIndex": 104, "endIndex": 105, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
233
|
+
{ "startIndex": 105, "endIndex": 132, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
|
|
234
|
+
{ "startIndex": 132, "endIndex": 133, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
235
|
+
{ "startIndex": 133, "endIndex": 134, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
236
|
+
{ "startIndex": 134, "endIndex": 135, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
240
|
+
{ "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
|
|
241
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
242
|
+
]
|
|
243
|
+
];
|
|
244
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
245
|
+
})
|
|
246
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `CopyTable(table copytable by-reference).`;
|
|
6
|
+
let expectedTokens = [
|
|
7
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'CopyTable'
|
|
8
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
9
|
+
{ "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'table'
|
|
10
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 16, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'copytable'
|
|
12
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 26, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'by-reference'
|
|
14
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
15
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
16
|
+
];
|
|
17
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
describe('', () => {
|
|
21
|
+
let statement = `CopyDataset(dataset dsData by-reference).`;
|
|
22
|
+
let expectedTokens = [
|
|
23
|
+
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'CopyDataset'
|
|
24
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
25
|
+
{ "startIndex": 12, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'dataset'
|
|
26
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
27
|
+
{ "startIndex": 20, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'dsData'
|
|
28
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'by-reference'
|
|
30
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
31
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
32
|
+
];
|
|
33
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
34
|
+
})
|
|
35
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `set-size(memPtr) = 27.`;
|
|
6
|
+
let expectedTokens = [
|
|
7
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
|
|
8
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
9
|
+
{ "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'memPtr'
|
|
10
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
11
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
12
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
13
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
14
|
+
{ "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
|
|
15
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
16
|
+
];
|
|
17
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
18
|
+
})
|
|
19
|
+
|
|
@@ -30,7 +30,7 @@ trim(c_test)`;
|
|
|
30
30
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
31
31
|
{ "startIndex": 10, "endIndex": 22, "scopes": ["source.abl", "string.single.complex.abl"] }, // 'Test message'
|
|
32
32
|
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
33
|
-
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
|
|
33
|
+
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "string.single.complex.abl", "support.other.abl"] }, // ':u'
|
|
34
34
|
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
35
35
|
],
|
|
36
36
|
[
|
|
@@ -72,7 +72,7 @@ trim( c_test)`;
|
|
|
72
72
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
73
73
|
{ "startIndex": 10, "endIndex": 22, "scopes": ["source.abl", "string.single.complex.abl"] }, // 'Test message'
|
|
74
74
|
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
75
|
-
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
|
|
75
|
+
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "string.single.complex.abl", "support.other.abl"] }, // ':u'
|
|
76
76
|
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
77
77
|
],
|
|
78
78
|
[
|
|
@@ -114,7 +114,7 @@ trim(c_test )`;
|
|
|
114
114
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
115
115
|
{ "startIndex": 10, "endIndex": 22, "scopes": ["source.abl", "string.single.complex.abl"] }, // 'Test message'
|
|
116
116
|
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
117
|
-
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
|
|
117
|
+
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "string.single.complex.abl", "support.other.abl"] }, // ':u'
|
|
118
118
|
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
119
119
|
],
|
|
120
120
|
[
|
|
@@ -7,7 +7,7 @@ describe('', () => {
|
|
|
7
7
|
|
|
8
8
|
let expectedTokens = [
|
|
9
9
|
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
10
|
-
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "
|
|
10
|
+
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "entity.name.include.abl"] }, // 'assigned'
|
|
11
11
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
12
12
|
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
13
13
|
{ "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'mExtVar'
|
|
@@ -27,7 +27,7 @@ describe('', () => {
|
|
|
27
27
|
|
|
28
28
|
let expectedTokens = [
|
|
29
29
|
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
30
|
-
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "
|
|
30
|
+
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "entity.name.include.abl"] }, // 'assigned'
|
|
31
31
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
32
32
|
{ "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&ExtVar'
|
|
33
33
|
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '}'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `{Consultingwerk/linqGeneric.i SerializableAnnotation oAnnotation in oMethod:Annotations
|
|
6
|
+
WHERE Name EQ "'@ParameterSchema'":U}`;
|
|
7
|
+
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
[
|
|
10
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
11
|
+
{ "startIndex": 1, "endIndex": 29, "scopes": ["source.abl", "meta.include.abl", "entity.name.include.abl"] }, // 'Consultingwerk/linqGeneric.i'
|
|
12
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 30, "endIndex": 52, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'SerializableAnnotation'
|
|
14
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 53, "endIndex": 64, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'oAnnotation'
|
|
16
|
+
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'in'
|
|
18
|
+
{ "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
19
|
+
{ "startIndex": 68, "endIndex": 87, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] } // 'oMethod:Annotations'
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
23
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'WHERE'
|
|
24
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
25
|
+
{ "startIndex": 8, "endIndex": 12, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'Name'
|
|
26
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
27
|
+
{ "startIndex": 13, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // 'EQ'
|
|
28
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
30
|
+
{ "startIndex": 17, "endIndex": 35, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // ''@ParameterSchema''
|
|
31
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
32
|
+
{ "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "support.other.abl"] }, // ':U'
|
|
33
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
|
|
34
|
+
]
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
38
|
+
})
|
|
39
|
+
|