abl-tmlanguage 1.3.9 → 1.3.10
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/CHANGELOG.md +3 -3
- package/README.md +44 -41
- package/abl.tmLanguage.json +639 -311
- package/index.js +109 -71
- package/package.json +6 -6
- package/spec/array-extent/issue#5.spec.js +9 -9
- package/spec/comments/spacious-comment.spec.js +73 -0
- package/spec/create-widgets/create-window.spec.js +221 -0
- package/spec/db-table-and-field/create-alias.spec.js +101 -0
- package/spec/db-table-and-field/create-record.spec.js +43 -0
- package/spec/db-table-and-field/find-record.spec.js +91 -0
- package/spec/define/define-browse.spec.js +40 -40
- package/spec/define/define-query.spec.js +14 -13
- package/spec/define-variable/extent.spec.js +6 -6
- package/spec/define-variable/var-statement.spec.js +375 -0
- package/spec/include/include-file-name.spec.js +224 -0
- package/spec/include/vscode-abl-issue#77.spec.js +2 -2
- package/spec/input-output/input-from.spec.js +501 -0
- package/spec/input-output/output-to.spec.js +456 -0
- package/spec/method-attribute-property-call/get-set-method-name.spec.js +50 -5
- package/spec/method-definition/method.spec.js +184 -0
- package/spec/misc-statements/array-for.spec.js +2 -2
- package/spec/misc-statements/if-then.spec.js +118 -1
- package/spec/preprocesors/proparse-preprocessor.spec.js +3 -3
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +6 -6
- package/spec/type-name/parameter-as.spec.js +9 -9
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement =
|
|
6
|
+
`input from c:/temp/blah3.txt.`;
|
|
7
|
+
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
10
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
12
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 11, "endIndex": 28, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:/temp/blah3.txt'
|
|
14
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
describe('', () => {
|
|
21
|
+
let statement =
|
|
22
|
+
`input from c:\\temp\\blah3.txt.`;
|
|
23
|
+
|
|
24
|
+
let expectedTokens = [
|
|
25
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
26
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
27
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
28
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 11, "endIndex": 28, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:\temp\blah3.txt'
|
|
30
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
describe('', () => {
|
|
37
|
+
let statement =
|
|
38
|
+
`input stream-handle hhh from c:/temp/blah3.txt.`;
|
|
39
|
+
|
|
40
|
+
let expectedTokens = [
|
|
41
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
42
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
43
|
+
{ "startIndex": 6, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'stream-handle'
|
|
44
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
45
|
+
{ "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "variable.other.abl"] }, // 'hhh'
|
|
46
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
|
|
47
|
+
{ "startIndex": 24, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
48
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
49
|
+
{ "startIndex": 29, "endIndex": 46, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:/temp/blah3.txt'
|
|
50
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
51
|
+
];
|
|
52
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
describe('', () => {
|
|
56
|
+
let statement =
|
|
57
|
+
`input stream streamS from c:/temp/blah3.txt.`;
|
|
58
|
+
|
|
59
|
+
let expectedTokens = [
|
|
60
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
61
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
62
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'stream'
|
|
63
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
64
|
+
{ "startIndex": 13, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'streamS'
|
|
65
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
66
|
+
{ "startIndex": 21, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
67
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 26, "endIndex": 43, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:/temp/blah3.txt'
|
|
69
|
+
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
70
|
+
];
|
|
71
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
describe('', () => {
|
|
75
|
+
let statement =
|
|
76
|
+
`input stream streamS from c:\\temp\\blah3.txt.`;
|
|
77
|
+
|
|
78
|
+
let expectedTokens = [
|
|
79
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
80
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
81
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'stream'
|
|
82
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
83
|
+
{ "startIndex": 13, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'streamS'
|
|
84
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
85
|
+
{ "startIndex": 21, "endIndex": 25, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
86
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
|
|
87
|
+
{ "startIndex": 26, "endIndex": 43, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:\temp\blah3.txt'
|
|
88
|
+
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
89
|
+
];
|
|
90
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
describe('', () => {
|
|
94
|
+
let statement =
|
|
95
|
+
`input from c:/blah.`;
|
|
96
|
+
|
|
97
|
+
let expectedTokens = [
|
|
98
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
99
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
100
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
101
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
102
|
+
{ "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:/blah'
|
|
103
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
104
|
+
];
|
|
105
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
describe('', () => {
|
|
109
|
+
let statement =
|
|
110
|
+
`input from c:/blah .`;
|
|
111
|
+
|
|
112
|
+
let expectedTokens = [
|
|
113
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
114
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
115
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
116
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
117
|
+
{ "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // 'c:/blah'
|
|
118
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
119
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
120
|
+
];
|
|
121
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
describe('', () => {
|
|
125
|
+
let statement =
|
|
126
|
+
`input from "c:/blah".`;
|
|
127
|
+
|
|
128
|
+
let expectedTokens = [
|
|
129
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
130
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
131
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
132
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
134
|
+
{ "startIndex": 12, "endIndex": 19, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'c:/blah'
|
|
135
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
136
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
137
|
+
];
|
|
138
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
describe('', () => {
|
|
142
|
+
let statement =
|
|
143
|
+
`input from /blah/path/to/file.bin.`;
|
|
144
|
+
|
|
145
|
+
let expectedTokens = [
|
|
146
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
147
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
148
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
149
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
150
|
+
{ "startIndex": 11, "endIndex": 33, "scopes": ["source.abl", "storage.other.opsys-device.abl"] }, // '/blah/path/to/file.bin'
|
|
151
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
152
|
+
];
|
|
153
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
describe('', () => {
|
|
157
|
+
let statement =
|
|
158
|
+
`input from terminal .`;
|
|
159
|
+
|
|
160
|
+
let expectedTokens = [
|
|
161
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
162
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
163
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
164
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
165
|
+
{ "startIndex": 11, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'terminal'
|
|
166
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
167
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
168
|
+
];
|
|
169
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
describe('', () => {
|
|
173
|
+
let statement =
|
|
174
|
+
`input from value("path/to/file") .`;
|
|
175
|
+
|
|
176
|
+
let expectedTokens = [
|
|
177
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
178
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
179
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
180
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
181
|
+
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'value'
|
|
182
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
183
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
184
|
+
{ "startIndex": 18, "endIndex": 30, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'path/to/file'
|
|
185
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
186
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
187
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
188
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
189
|
+
];
|
|
190
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
describe('', () => {
|
|
194
|
+
let statement =
|
|
195
|
+
`input from value(cv-file-name) .`;
|
|
196
|
+
|
|
197
|
+
let expectedTokens = [
|
|
198
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
199
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
200
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
201
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
202
|
+
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'value'
|
|
203
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
204
|
+
{ "startIndex": 17, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cv-file-name'
|
|
205
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
206
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
207
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
208
|
+
];
|
|
209
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
210
|
+
})
|
|
211
|
+
|
|
212
|
+
describe('', () => {
|
|
213
|
+
let statement =
|
|
214
|
+
`input STREAM dump from VALUE(fil) LOB-DIR VALUE(lobdir)
|
|
215
|
+
NO-ECHO NO-MAP NO-CONVERT.`;
|
|
216
|
+
|
|
217
|
+
let expectedTokens = [
|
|
218
|
+
[
|
|
219
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
220
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
221
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'STREAM'
|
|
222
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
223
|
+
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'dump'
|
|
224
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
|
|
225
|
+
{ "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
226
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
227
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
228
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
229
|
+
{ "startIndex": 29, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'fil'
|
|
230
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
231
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
232
|
+
{ "startIndex": 34, "endIndex": 41, "scopes": ["source.abl", "keyword.other.abl"] }, // 'LOB-DIR'
|
|
233
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
234
|
+
{ "startIndex": 42, "endIndex": 47, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
235
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
236
|
+
{ "startIndex": 48, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lobdir'
|
|
237
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
|
|
238
|
+
],
|
|
239
|
+
[
|
|
240
|
+
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
241
|
+
{ "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-ECHO'
|
|
242
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
243
|
+
{ "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-MAP'
|
|
244
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
|
|
245
|
+
{ "startIndex": 22, "endIndex": 32, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-CONVERT'
|
|
246
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
247
|
+
]
|
|
248
|
+
];
|
|
249
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
250
|
+
})
|
|
251
|
+
|
|
252
|
+
describe('', () => {
|
|
253
|
+
let statement =
|
|
254
|
+
`input STREAM dump from VALUE(fil) NO-ECHO
|
|
255
|
+
MAP VALUE(SUBSTRING(user_env[3],5,-1,"character"))
|
|
256
|
+
NO-CONVERT.`;
|
|
257
|
+
|
|
258
|
+
let expectedTokens = [
|
|
259
|
+
[
|
|
260
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
261
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
262
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'STREAM'
|
|
263
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
264
|
+
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'dump'
|
|
265
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
|
|
266
|
+
{ "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
267
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
268
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
269
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
270
|
+
{ "startIndex": 29, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'fil'
|
|
271
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
272
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
273
|
+
{ "startIndex": 34, "endIndex": 41, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-ECHO'
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
277
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'MAP'
|
|
278
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
279
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
280
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
281
|
+
{ "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBSTRING'
|
|
282
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
283
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'user_env'
|
|
284
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
285
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '3'
|
|
286
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
287
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
288
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '5'
|
|
289
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
290
|
+
{ "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '-1'
|
|
291
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
292
|
+
{ "startIndex": 45, "endIndex": 46, "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"] }, // '"'
|
|
293
|
+
{ "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'character'
|
|
294
|
+
{ "startIndex": 55, "endIndex": 56, "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"] }, // '"'
|
|
295
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
296
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
|
|
297
|
+
],
|
|
298
|
+
[
|
|
299
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
300
|
+
{ "startIndex": 8, "endIndex": 18, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-CONVERT'
|
|
301
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
302
|
+
]
|
|
303
|
+
];
|
|
304
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
describe('', () => {
|
|
308
|
+
let statement =
|
|
309
|
+
`input STREAM dump from VALUE(fil) LOB-DIR VALUE(lobdir) NO-ECHO
|
|
310
|
+
MAP VALUE(SUBSTRING(user_env[3],5,-1,"character"))
|
|
311
|
+
CONVERT SOURCE SESSION:CHARSET TARGET user_env[5].`;
|
|
312
|
+
|
|
313
|
+
let expectedTokens = [
|
|
314
|
+
[
|
|
315
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
316
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
317
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'STREAM'
|
|
318
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
319
|
+
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'dump'
|
|
320
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
|
|
321
|
+
{ "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
322
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
323
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
324
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
325
|
+
{ "startIndex": 29, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'fil'
|
|
326
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
327
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
328
|
+
{ "startIndex": 34, "endIndex": 41, "scopes": ["source.abl", "keyword.other.abl"] }, // 'LOB-DIR'
|
|
329
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
330
|
+
{ "startIndex": 42, "endIndex": 47, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
331
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
332
|
+
{ "startIndex": 48, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lobdir'
|
|
333
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
334
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl"] }, // ' '
|
|
335
|
+
{ "startIndex": 56, "endIndex": 63, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-ECHO'
|
|
336
|
+
],
|
|
337
|
+
[
|
|
338
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
339
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'MAP'
|
|
340
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
341
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
342
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
343
|
+
{ "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBSTRING'
|
|
344
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
345
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'user_env'
|
|
346
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
347
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '3'
|
|
348
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
349
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
350
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '5'
|
|
351
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
352
|
+
{ "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '-1'
|
|
353
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
354
|
+
{ "startIndex": 45, "endIndex": 46, "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"] }, // '"'
|
|
355
|
+
{ "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'character'
|
|
356
|
+
{ "startIndex": 55, "endIndex": 56, "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"] }, // '"'
|
|
357
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
358
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
|
|
359
|
+
],
|
|
360
|
+
[
|
|
361
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
362
|
+
{ "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'CONVERT'
|
|
363
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
|
|
364
|
+
{ "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'SOURCE'
|
|
365
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
366
|
+
{ "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "variable.language.abl"] }, // 'SESSION'
|
|
367
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
368
|
+
{ "startIndex": 31, "endIndex": 38, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'CHARSET'
|
|
369
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
|
|
370
|
+
{ "startIndex": 39, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] }, // 'TARGET'
|
|
371
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
372
|
+
{ "startIndex": 46, "endIndex": 54, "scopes": ["source.abl", "variable.other.abl"] }, // 'user_env'
|
|
373
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
374
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '5'
|
|
375
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
376
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
377
|
+
]
|
|
378
|
+
];
|
|
379
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
380
|
+
})
|
|
381
|
+
|
|
382
|
+
describe('', () => {
|
|
383
|
+
let statement =
|
|
384
|
+
`input STREAM dump from VALUE(fil) LOB-DIR VALUE(lobdir) NO-ECHO
|
|
385
|
+
MAP VALUE(SUBSTRING(user_env[3],5,-1,"character"))
|
|
386
|
+
CONVERT SOURCE user_env[4] TARGET user_env[5].`;
|
|
387
|
+
|
|
388
|
+
let expectedTokens = [
|
|
389
|
+
[
|
|
390
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'input'
|
|
391
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
392
|
+
{ "startIndex": 6, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'STREAM'
|
|
393
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
394
|
+
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'dump'
|
|
395
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
|
|
396
|
+
{ "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'from'
|
|
397
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
398
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
399
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
400
|
+
{ "startIndex": 29, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'fil'
|
|
401
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
402
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
403
|
+
{ "startIndex": 34, "endIndex": 41, "scopes": ["source.abl", "keyword.other.abl"] }, // 'LOB-DIR'
|
|
404
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
405
|
+
{ "startIndex": 42, "endIndex": 47, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
406
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
407
|
+
{ "startIndex": 48, "endIndex": 54, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lobdir'
|
|
408
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
409
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl"] }, // ' '
|
|
410
|
+
{ "startIndex": 56, "endIndex": 63, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-ECHO'
|
|
411
|
+
],
|
|
412
|
+
[
|
|
413
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
414
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'MAP'
|
|
415
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
416
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
417
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
418
|
+
{ "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'SUBSTRING'
|
|
419
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
420
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'user_env'
|
|
421
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
422
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '3'
|
|
423
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
424
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
425
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '5'
|
|
426
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
427
|
+
{ "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '-1'
|
|
428
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
429
|
+
{ "startIndex": 45, "endIndex": 46, "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"] }, // '"'
|
|
430
|
+
{ "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'character'
|
|
431
|
+
{ "startIndex": 55, "endIndex": 56, "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"] }, // '"'
|
|
432
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
433
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
|
|
434
|
+
],
|
|
435
|
+
[
|
|
436
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
437
|
+
{ "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'CONVERT'
|
|
438
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
|
|
439
|
+
{ "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] }, // 'SOURCE'
|
|
440
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
441
|
+
{ "startIndex": 23, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'user_env'
|
|
442
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
443
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '4'
|
|
444
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
445
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
446
|
+
{ "startIndex": 35, "endIndex": 41, "scopes": ["source.abl", "keyword.other.abl"] }, // 'TARGET'
|
|
447
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl"] }, // ' '
|
|
448
|
+
{ "startIndex": 42, "endIndex": 50, "scopes": ["source.abl", "variable.other.abl"] }, // 'user_env'
|
|
449
|
+
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
450
|
+
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '5'
|
|
451
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
452
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
453
|
+
]
|
|
454
|
+
];
|
|
455
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
456
|
+
})
|
|
457
|
+
|
|
458
|
+
describe('', () => {
|
|
459
|
+
let statement =
|
|
460
|
+
`INPUT FROM OS-DIR(CurDir) ECHO.`;
|
|
461
|
+
|
|
462
|
+
let expectedTokens = [
|
|
463
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'INPUT'
|
|
464
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
465
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FROM'
|
|
466
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
467
|
+
{ "startIndex": 11, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'OS-DIR'
|
|
468
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
469
|
+
{ "startIndex": 18, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'CurDir'
|
|
470
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
471
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
|
|
472
|
+
{ "startIndex": 26, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ECHO'
|
|
473
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
474
|
+
];
|
|
475
|
+
|
|
476
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
477
|
+
})
|
|
478
|
+
|
|
479
|
+
describe('', () => {
|
|
480
|
+
let statement =
|
|
481
|
+
`INPUT FROM VALUE (s_logfile) NO-ECHO {&NO-MAP}.`;
|
|
482
|
+
|
|
483
|
+
let expectedTokens = [
|
|
484
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'INPUT'
|
|
485
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
486
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FROM'
|
|
487
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
488
|
+
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'VALUE'
|
|
489
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
490
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
491
|
+
{ "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 's_logfile'
|
|
492
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
493
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
494
|
+
{ "startIndex": 29, "endIndex": 36, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-ECHO'
|
|
495
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
|
|
496
|
+
{ "startIndex": 37, "endIndex": 46, "scopes": ["source.abl", "storage.type.function.abl"] }, // '{&NO-MAP}'
|
|
497
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
498
|
+
];
|
|
499
|
+
|
|
500
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
501
|
+
})
|