abl-tmlanguage 1.3.4 → 1.3.5

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.
@@ -64,3 +64,148 @@ describe('', () => {
64
64
  ];
65
65
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
66
66
  })
67
+
68
+ describe('', () => {
69
+ let statement = `define dataset dsFoo
70
+ namespace-uri "ns-uri"
71
+ namespace-prefix "ns-prefix"
72
+ xml-node-name "foo"
73
+ // scope (xml-node-type): storage.data.table.abl meta.define.abl source.abl
74
+ // scope (serialize-hidden): storage.data.table.abl meta.define.abl source.abl
75
+ serialize-name "foo" xml-node-type "ELEMENT" serialize-hidden
76
+ for ttFoo, ttBar
77
+ // scope (foreign-key-hidden): storage.data.table.abl meta.define.abl source.abl
78
+ data-relation dr01 for ttFoo, ttBar relation-fields (FooId, FooId) reposition nested foreign-key-hidden not-active
79
+ // scope (recursive):storage.data.table.abl meta.define.abl source.abl
80
+ data-relation dr02 for ttFoo, ttFoo relation-fields (FooId, FooId) recursive.`;
81
+ let expectedTokens = [
82
+ [
83
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
84
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
85
+ { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'dataset'
86
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
87
+ { "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "storage.data.dataset.abl"] } // 'dsFoo'
88
+ ],
89
+ [
90
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
91
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'namespace-uri'
92
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
93
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
94
+ { "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'ns-uri'
95
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
96
+ ],
97
+ [
98
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
99
+ { "startIndex": 4, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'namespace-prefix'
100
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
101
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
102
+ { "startIndex": 22, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'ns-prefix'
103
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
104
+ ],
105
+ [
106
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
107
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-name'
108
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
109
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
110
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'foo'
111
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
112
+ ],
113
+ [
114
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
115
+ { "startIndex": 4, "endIndex": 79, "scopes": ["source.abl", "meta.define.abl", "comment.line.double-slash.abl"] } // '// scope (xml-node-type): storage.data.table.abl meta.define.abl source.abl'
116
+ ],
117
+ [
118
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
119
+ { "startIndex": 4, "endIndex": 83, "scopes": ["source.abl", "meta.define.abl", "comment.line.double-slash.abl"] } // '// scope (serialize-hidden): storage.data.table.abl meta.define.abl source.abl'
120
+ ],
121
+ [
122
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
123
+ { "startIndex": 4, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'serialize-name'
124
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
125
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
126
+ { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'foo'
127
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
128
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
129
+ { "startIndex": 25, "endIndex": 38, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'xml-node-type'
130
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
131
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
132
+ { "startIndex": 40, "endIndex": 47, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'ELEMENT'
133
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
134
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
135
+ { "startIndex": 49, "endIndex": 65, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] } // 'serialize-hidden'
136
+ ],
137
+ [
138
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
139
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'for'
140
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
141
+ { "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttFoo'
142
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "punctuation.separator.comma.abl"] }, // ','
143
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
144
+ { "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] } // 'ttBar'
145
+ ],
146
+ [
147
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
148
+ { "startIndex": 4, "endIndex": 85, "scopes": ["source.abl", "meta.define.abl", "comment.line.double-slash.abl"] } // '// scope (foreign-key-hidden): storage.data.table.abl meta.define.abl source.abl'
149
+ ],
150
+ [
151
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
152
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'data-relation'
153
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
154
+ { "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "storage.data.dataset.abl"] }, // 'dr01'
155
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
156
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'for'
157
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
158
+ { "startIndex": 27, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttFoo'
159
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl", "punctuation.separator.comma.abl"] }, // ','
160
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
161
+ { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttBar'
162
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
163
+ { "startIndex": 40, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "support.function.abl"] }, // 'relation-fields'
164
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
165
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.abl", "meta.brace.round.js"] }, // '('
166
+ { "startIndex": 57, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
167
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.abl", "punctuation.separator.comma.abl"] }, // ','
168
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
169
+ { "startIndex": 64, "endIndex": 69, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
170
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.abl", "meta.brace.round.js"] }, // ')'
171
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
172
+ { "startIndex": 71, "endIndex": 81, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'reposition'
173
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
174
+ { "startIndex": 82, "endIndex": 88, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'nested'
175
+ { "startIndex": 88, "endIndex": 89, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
176
+ { "startIndex": 89, "endIndex": 107, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'foreign-key-hidden'
177
+ { "startIndex": 107, "endIndex": 108, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
178
+ { "startIndex": 108, "endIndex": 118, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'not-active'
179
+ ],
180
+ [
181
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
182
+ { "startIndex": 4, "endIndex": 74, "scopes": ["source.abl", "meta.define.abl", "comment.line.double-slash.abl"] } // '// scope (recursive):storage.data.table.abl meta.define.abl source.abl'
183
+ ],
184
+ [
185
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
186
+ { "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'data-relation'
187
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
188
+ { "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "storage.data.dataset.abl"] }, // 'dr02'
189
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
190
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'for'
191
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
192
+ { "startIndex": 27, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttFoo'
193
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl", "punctuation.separator.comma.abl"] }, // ','
194
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
195
+ { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttFoo'
196
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
197
+ { "startIndex": 40, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "support.function.abl"] }, // 'relation-fields'
198
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
199
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.abl", "meta.brace.round.js"] }, // '('
200
+ { "startIndex": 57, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
201
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.abl", "punctuation.separator.comma.abl"] }, // ','
202
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
203
+ { "startIndex": 64, "endIndex": 69, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
204
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.abl", "meta.brace.round.js"] }, // ')'
205
+ { "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
206
+ { "startIndex": 71, "endIndex": 80, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'recursive'
207
+ { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
208
+ ]
209
+ ];
210
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
211
+ })
@@ -269,4 +269,85 @@ describe('', () => {
269
269
  ]
270
270
  ];
271
271
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
272
+ })
273
+
274
+ describe('', () => {
275
+ let statement = `define temp-table ttFoo no-undo
276
+ namespace-uri "foo"
277
+ namespace-prefix "prefix"
278
+ xml-node-name "Foo"
279
+ serialize-name "Foo"
280
+ // scope (xml-node-name): entity.name.type.abl meta.define.abl source.abl
281
+ field FooId as integer xml-node-name "id" serialize-name "id".`;
282
+ let expectedTokens = [
283
+ [
284
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
285
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
286
+ { "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
287
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
288
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttFoo'
289
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
290
+ { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
291
+ ],
292
+ [
293
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
294
+ { "startIndex": 8, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'namespace-uri'
295
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
296
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
297
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'foo'
298
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
299
+ ],
300
+ [
301
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
302
+ { "startIndex": 8, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'namespace-prefix'
303
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
304
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
305
+ { "startIndex": 26, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'prefix'
306
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
307
+ ],
308
+ [
309
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
310
+ { "startIndex": 8, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-name'
311
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
312
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
313
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'Foo'
314
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
315
+ ],
316
+ [
317
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
318
+ { "startIndex": 8, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'serialize-name'
319
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
320
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
321
+ { "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'Foo'
322
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
323
+ ],
324
+ [
325
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
326
+ { "startIndex": 4, "endIndex": 78, "scopes": ["source.abl", "meta.define.abl", "comment.line.double-slash.abl"] } // '// scope (xml-node-name): entity.name.type.abl meta.define.abl source.abl'
327
+ ],
328
+ [
329
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
330
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
331
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
332
+ { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
333
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
334
+ { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
335
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
336
+ { "startIndex": 19, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'integer'
337
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
338
+ { "startIndex": 27, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-name'
339
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
340
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
341
+ { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'id'
342
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
343
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
344
+ { "startIndex": 46, "endIndex": 60, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'serialize-name'
345
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
346
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
347
+ { "startIndex": 62, "endIndex": 64, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'id'
348
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
349
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
350
+ ]
351
+ ];
352
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
272
353
  })
@@ -0,0 +1,83 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `// scope (break): storage.data.table.abl source.abl
6
+ for each Customer
7
+ no-lock
8
+ break by Customer.CustNum by Customer.name:
9
+ end. /* */`;
10
+ let expectedTokens = [
11
+ [
12
+ { "startIndex": 0, "endIndex": 52, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// scope (break): storage.data.table.abl source.abl'
13
+ ],
14
+ [
15
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
16
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
17
+ { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
18
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
19
+ { "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "storage.data.table.abl"] } // 'Customer'
20
+ ],
21
+ [
22
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
23
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] } // 'no-lock'
24
+ ],
25
+ [
26
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
27
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'break'
28
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
29
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
30
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
31
+ { "startIndex": 13, "endIndex": 29, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.CustNum'
32
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
33
+ { "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
34
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
35
+ { "startIndex": 33, "endIndex": 46, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.name'
36
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
37
+ ],
38
+ [
39
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
40
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
41
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
42
+ { "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
43
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' '
44
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
45
+ ]
46
+ ];
47
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
48
+ })
49
+
50
+ describe('', () => {
51
+ let statement = `for first Customer no-lock by Customer.CustNum by Customer.name:
52
+ end. /* */`;
53
+ let expectedTokens = [
54
+ [
55
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
56
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
57
+ { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
58
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
59
+ { "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer'
60
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
61
+ { "startIndex": 19, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
62
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
63
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
64
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
65
+ { "startIndex": 30, "endIndex": 46, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.CustNum'
66
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl"] }, // ' '
67
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
68
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
69
+ { "startIndex": 50, "endIndex": 63, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.name'
70
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
71
+ ],
72
+ [
73
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
74
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
75
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
76
+ { "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
77
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' '
78
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
79
+ ]
80
+ ];
81
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
82
+ })
83
+