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.
@@ -0,0 +1,375 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `var longchar[] names.`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
8
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
9
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'longchar'
10
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
11
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
12
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
13
+ { "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'names'
14
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
15
+ ]
16
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
17
+ })
18
+
19
+ describe('', () => {
20
+ let statement = `var integer cnt, loop.`;
21
+ let expectedTokens = [
22
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
23
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
24
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'integer'
25
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
26
+ { "startIndex": 12, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cnt'
27
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
28
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
29
+ { "startIndex": 17, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] }, // 'loop'
30
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
31
+ ]
32
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
33
+ })
34
+
35
+ describe('', () => {
36
+ let statement = `var Property prop.`;
37
+ let expectedTokens = [
38
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
39
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
40
+ { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'Property'
41
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
42
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'prop'
43
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
44
+ ]
45
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
46
+ })
47
+
48
+ describe('', () => {
49
+ let statement = `var character propName.`;
50
+ let expectedTokens = [
51
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
52
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
53
+ { "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'character'
54
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
55
+ { "startIndex": 14, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'propName'
56
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
57
+ ]
58
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
59
+ })
60
+
61
+ describe('', () => {
62
+ let statement = `var character[] chrArray.`;
63
+ let expectedTokens = [
64
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
65
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
66
+ { "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'character'
67
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
68
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
69
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
70
+ { "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'chrArray'
71
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
72
+ ]
73
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
74
+ })
75
+
76
+ describe('', () => {
77
+ let statement = `var JsonArray ja.`;
78
+ let expectedTokens = [
79
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
80
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
81
+ { "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'JsonArray'
82
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
83
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'ja'
84
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
85
+ ]
86
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
87
+ })
88
+
89
+ describe('', () => {
90
+ let statement = `var class JsonArray ja.`;
91
+ let expectedTokens = [
92
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
93
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
94
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'class'
95
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
96
+ { "startIndex": 10, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'JsonArray'
97
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
98
+ { "startIndex": 20, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'ja'
99
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
100
+ ]
101
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
102
+ })
103
+
104
+ describe('', () => {
105
+ let statement = `var IPrimitiveHolder[4] ph.`;
106
+ let expectedTokens = [
107
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
108
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
109
+ { "startIndex": 4, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'IPrimitiveHolder'
110
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
111
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '4'
112
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
113
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
114
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'ph'
115
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
116
+ ]
117
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
118
+ })
119
+
120
+ describe('', () => {
121
+ let statement = `var int i.`;
122
+ let expectedTokens = [
123
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
124
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
125
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'int'
126
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
127
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'i'
128
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
129
+ ]
130
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
131
+ })
132
+
133
+ describe('', () => {
134
+ let statement = `var Object c.`;
135
+ let expectedTokens = [
136
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
137
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
138
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'Object'
139
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
140
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'c'
141
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
142
+ ]
143
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
144
+ })
145
+
146
+ describe('', () => {
147
+ let statement = `var static longchar[] names.`;
148
+ let expectedTokens = [
149
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
150
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
151
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'static'
152
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
153
+ { "startIndex": 11, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'longchar'
154
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
155
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
156
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
157
+ { "startIndex": 22, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'names'
158
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
159
+ ]
160
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
161
+ })
162
+
163
+ describe('', () => {
164
+ let statement = `var package-protected int64 names.`;
165
+ let expectedTokens = [
166
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
167
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
168
+ { "startIndex": 4, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'package-protected'
169
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
170
+ { "startIndex": 22, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'int64'
171
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
172
+ { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'names'
173
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
174
+ ]
175
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
176
+ })
177
+
178
+ describe('', () => {
179
+ let statement = `var public static datetime dtz1 = now`;
180
+ let expectedTokens = [
181
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
182
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
183
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'public'
184
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
185
+ { "startIndex": 11, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'static'
186
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
187
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'datetime'
188
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
189
+ { "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'dtz1'
190
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
191
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
192
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
193
+ { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "constant.language.abl"] } // 'now'
194
+ ]
195
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
196
+ })
197
+
198
+ describe('', () => {
199
+ let statement = `var public static datetime dtz1 = now, dtz2 = add-interval(now, 12, 'milliseconds').`;
200
+ let expectedTokens = [
201
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
202
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
203
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'public'
204
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
205
+ { "startIndex": 11, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'static'
206
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
207
+ { "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'datetime'
208
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
209
+ { "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'dtz1'
210
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
211
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
212
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
213
+ { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "constant.language.abl"] }, // 'now'
214
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
215
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
216
+ { "startIndex": 39, "endIndex": 43, "scopes": ["source.abl", "variable.other.abl"] }, // 'dtz2'
217
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl"] }, // ' '
218
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
219
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
220
+ { "startIndex": 46, "endIndex": 58, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'add-interval'
221
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
222
+ { "startIndex": 59, "endIndex": 62, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'now'
223
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
224
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
225
+ { "startIndex": 64, "endIndex": 66, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '12'
226
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
227
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
228
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
229
+ { "startIndex": 69, "endIndex": 81, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.single.complex.abl"] }, // 'milliseconds'
230
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
231
+ { "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
232
+ { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
233
+ ]
234
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
235
+ })
236
+
237
+ describe('', () => {
238
+ let statement = `var public /*must be public*/ static datetime[{&MAX-SIZE}] dtz1 = now`;
239
+ let expectedTokens = [
240
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
241
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
242
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'public'
243
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
244
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "comment.block.source.abl"] }, // '/*'
245
+ { "startIndex": 13, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "comment.block.source.abl", "comment"] }, // 'must be public'
246
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "comment.block.source.abl"] }, // '*/'
247
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
248
+ { "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'static'
249
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
250
+ { "startIndex": 37, "endIndex": 45, "scopes": ["source.abl", "storage.type.abl"] }, // 'datetime'
251
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
252
+ { "startIndex": 46, "endIndex": 57, "scopes": ["source.abl", "meta.array.literal.abl", "storage.type.function.abl"] }, // '{&MAX-SIZE}'
253
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
254
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl"] }, // ' '
255
+ { "startIndex": 59, "endIndex": 63, "scopes": ["source.abl", "variable.other.abl"] }, // 'dtz1'
256
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl"] }, // ' '
257
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
258
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl"] }, // ' '
259
+ { "startIndex": 66, "endIndex": 69, "scopes": ["source.abl", "constant.language.abl"] } // 'now'
260
+ ]
261
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
262
+ })
263
+
264
+ describe('', () => {
265
+ let statement = ` var Progress.Collections.IIterator<KeyValuePair<Object, Object>> iter.
266
+ var ISet mapKeys = new Set().`;
267
+ let expectedTokens = [
268
+ [
269
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
270
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
271
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
272
+ { "startIndex": 12, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Progress.Collections.IIterator'
273
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "punctuation.definition.generic.begin.abl"] }, // '<'
274
+ { "startIndex": 43, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'KeyValuePair'
275
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "punctuation.definition.generic.begin.abl"] }, // '<'
276
+ { "startIndex": 56, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Object'
277
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "punctuation.separator.comma.abl"] }, // ','
278
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl"] }, // ' '
279
+ { "startIndex": 64, "endIndex": 70, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "entity.name.type.abl"] }, // 'Object'
280
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "meta.generic.abl", "punctuation.definition.generic.end.abl"] }, // '>'
281
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.abl", "meta.generic.abl", "punctuation.definition.generic.end.abl"] }, // '>'
282
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
283
+ { "startIndex": 73, "endIndex": 77, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'iter'
284
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
285
+ ],
286
+ [
287
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
288
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
289
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
290
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'ISet'
291
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
292
+ { "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'mapKeys'
293
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
294
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
295
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
296
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
297
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
298
+ { "startIndex": 31, "endIndex": 34, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'Set'
299
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
300
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
301
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
302
+ ]
303
+ ]
304
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
305
+ })
306
+
307
+ describe('', () => {
308
+ let statement = `var integer loop, cnt, idx = mBackingList:IndexOf(pItem).`;
309
+ let expectedTokens = [
310
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
311
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
312
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'integer'
313
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
314
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'loop'
315
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
316
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
317
+ { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "variable.other.abl"] }, // 'cnt'
318
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
319
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
320
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "variable.other.abl"] }, // 'idx'
321
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
322
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
323
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
324
+ { "startIndex": 29, "endIndex": 41, "scopes": ["source.abl", "variable.other.abl"] }, // 'mBackingList'
325
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
326
+ { "startIndex": 42, "endIndex": 49, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IndexOf'
327
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
328
+ { "startIndex": 50, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'pItem'
329
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
330
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
331
+ ]
332
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
333
+ })
334
+
335
+ describe('', () => {
336
+ let statement = `var class memptr mData`;
337
+ let expectedTokens = [
338
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
339
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
340
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'class'
341
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
342
+ { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'memptr'
343
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
344
+ { "startIndex": 17, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'mData'
345
+ ]
346
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
347
+ })
348
+
349
+ describe('', () => {
350
+ let statement = `var memptr mData`;
351
+ let expectedTokens = [
352
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
353
+ { "startIndex": 3, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
354
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'memptr'
355
+ { "startIndex": 13, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
356
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
357
+ { "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'mData'
358
+ ]
359
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
360
+ })
361
+
362
+ describe('', () => {
363
+ let statement = `var class George oGeorge.`;
364
+ let expectedTokens = [
365
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
366
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
367
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'class'
368
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
369
+ { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'George'
370
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
371
+ { "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'oGeorge'
372
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
373
+ ]
374
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
375
+ })