abl-tmlanguage 1.1.2 → 1.2.0
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 +4 -0
- package/README.md +12 -0
- package/abl.tmLanguage.json +2734 -229
- package/azure-pipelines.yml +3 -2
- package/package.json +9 -9
- package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
- package/spec/array-extent/issue#5.spec.js +18 -18
- package/spec/define-buffer/simple-single-line.spec.js +138 -0
- package/spec/define-parameter/simple-single-line.spec.js +103 -75
- package/spec/define-stream/simple-single-line.spec.js +32 -31
- package/spec/define-variable/extent.spec.js +228 -0
- package/spec/define-variable/issue#6.spec.js +256 -198
- package/spec/define-variable/issue#9.spec.js +38 -32
- package/spec/define-variable/simple-single-line.spec.js +87 -87
- package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
- package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
- package/spec/define-variable/tm-issue#2.spec.js +20 -20
- package/spec/do/do-blocks.spec.js +89 -0
- package/spec/do/issue#3.spec.js +67 -60
- package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
- package/spec/global-scoped-define/global-define.spec.js +11 -11
- package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
- package/spec/include/abl-tmlanguage-issues#5.spec.js +44 -44
- package/spec/include/vscode-abl-issue#45.spec.js +14 -14
- package/spec/include/vscode-abl-issue#80.spec.js +26 -26
- package/spec/method-definition/constructor.spec.js +174 -0
- package/spec/method-definition/method.spec.js +185 -0
- package/spec/procedure-definition/empty-proc.spec.js +20 -18
- package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
- package/spec/shared.js +84 -42
- package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
- package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
- package/spec/type-name/argument.spec.js +209 -0
- package/spec/type-name/cast.spec.js +165 -0
- package/spec/type-name/define-class.spec.js +471 -0
- package/spec/type-name/define-enum.spec.js +44 -0
- package/spec/type-name/define-interface.spec.js +159 -0
- package/spec/type-name/define-property.spec.js +301 -0
- package/spec/type-name/define-temp-table.spec.js +434 -0
- package/spec/type-name/define-type-spec.js +435 -0
- package/spec/type-name/define-variable-property.spec.js +264 -0
- package/spec/type-name/define-variable.spec.js +504 -0
- package/spec/type-name/get-class.spec.js +91 -0
- package/spec/type-name/new.spec.js +126 -0
- package/spec/type-name/parameter-as.spec.js +838 -0
- package/spec/type-name/type-name-spec.js +587 -0
- package/spec/type-name/using.spec.js +115 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
describe('', () => {
|
|
6
|
+
let statement = `CLASS foo.bar.baz :`;
|
|
7
|
+
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
10
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
11
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
12
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
13
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] }
|
|
14
|
+
];
|
|
15
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
describe('', () => {
|
|
19
|
+
let statement = `CLASS foo.bar.baz ABSTRACT:`;
|
|
20
|
+
|
|
21
|
+
let expectedTokens = [
|
|
22
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
23
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
24
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
25
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
26
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
27
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] }
|
|
28
|
+
];
|
|
29
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
describe('', () => {
|
|
33
|
+
let statement = `CLASS foo.bar.baz:`;
|
|
34
|
+
|
|
35
|
+
let expectedTokens = [
|
|
36
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
37
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
38
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
39
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] }
|
|
40
|
+
];
|
|
41
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
describe('', () => {
|
|
47
|
+
let statement = `ENUM package.type :`;
|
|
48
|
+
|
|
49
|
+
let expectedTokens = [
|
|
50
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
|
|
51
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
52
|
+
{ "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
|
|
53
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
54
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
|
|
55
|
+
];
|
|
56
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
describe('', () => {
|
|
60
|
+
let statement = `ENUM package.type flags :`;
|
|
61
|
+
|
|
62
|
+
let expectedTokens = [
|
|
63
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
|
|
64
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
65
|
+
{ "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
|
|
66
|
+
{ "startIndex": 17, "endIndex": 20, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
67
|
+
{ "startIndex": 20, "endIndex": 25, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
|
|
68
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
69
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
|
|
70
|
+
];
|
|
71
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
describe('', () => {
|
|
75
|
+
let statement = `ENUM package.flagsenum flags:`;
|
|
76
|
+
|
|
77
|
+
let expectedTokens = [
|
|
78
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
|
|
79
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
80
|
+
{ "startIndex": 5, "endIndex": 22, "scopes": ["source.abl", "meta.define.enum.abl", "entity.name.type.abl"] },
|
|
81
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.enum.abl"] },
|
|
82
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.enum.abl", "keyword.other.abl"] },
|
|
83
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.enum.abl", "punctuation.terminator.abl"] }
|
|
84
|
+
];
|
|
85
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
describe('', () => {
|
|
90
|
+
let statement = `interface foo.IBar inherits bar.IFoo:`;
|
|
91
|
+
|
|
92
|
+
let expectedTokens = [
|
|
93
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
94
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
95
|
+
{ "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
96
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
97
|
+
{ "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits.abl", "keyword.other.abl"] },
|
|
98
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits.abl"] },
|
|
99
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits.abl", "entity.name.type.abl"] },
|
|
100
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define-type.abl", "punctuation.terminator.abl"] }
|
|
101
|
+
];
|
|
102
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
describe('', () => {
|
|
106
|
+
let statement = `interface foo.IBar inherits bar.IFoo,baz,IBaz:`;
|
|
107
|
+
|
|
108
|
+
let expectedTokens = [
|
|
109
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
110
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
111
|
+
{ "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
112
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
113
|
+
{ "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "keyword.other.abl"] },
|
|
114
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] },
|
|
115
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
116
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
|
|
117
|
+
{ "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
118
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
|
|
119
|
+
{ "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
120
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] }
|
|
121
|
+
];
|
|
122
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
describe('', () => {
|
|
126
|
+
let statement = `INTERFACE foo.IBar INHERITS bar.IFoo,baz,IBaz:`;
|
|
127
|
+
|
|
128
|
+
let expectedTokens = [
|
|
129
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
130
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
131
|
+
{ "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
132
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
133
|
+
{ "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "keyword.other.abl"] },
|
|
134
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] },
|
|
135
|
+
{ "startIndex": 28, "endIndex": 36, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
136
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
|
|
137
|
+
{ "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
138
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "punctuation.separator.comma.abl"] },
|
|
139
|
+
{ "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl", "entity.name.type.abl"] },
|
|
140
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define-type.abl", "meta.define-type.inherits-implements.abl"] }
|
|
141
|
+
];
|
|
142
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
describe('', () => {
|
|
146
|
+
let statement = `interface foo.IBar
|
|
147
|
+
inherits bar.IFoo,
|
|
148
|
+
baz,
|
|
149
|
+
IBaz`;
|
|
150
|
+
|
|
151
|
+
let expectedTokens = [
|
|
152
|
+
[
|
|
153
|
+
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
|
|
154
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.using.abl"] },
|
|
155
|
+
{ "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
|
|
156
|
+
{ "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.using.abl"] }
|
|
157
|
+
],
|
|
158
|
+
[
|
|
159
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.using.abl"] },
|
|
160
|
+
{ "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
|
|
161
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
|
|
162
|
+
{ "startIndex": 13, "endIndex": 21, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
|
|
163
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] }
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
{ "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
|
|
167
|
+
{ "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
|
|
168
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] }
|
|
169
|
+
],
|
|
170
|
+
[
|
|
171
|
+
{ "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
|
|
172
|
+
{ "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
|
|
173
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] }
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
{ "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl"] },
|
|
177
|
+
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] }
|
|
178
|
+
]
|
|
179
|
+
];
|
|
180
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
describe('', () => {
|
|
185
|
+
let statement = `interface foo.IBar
|
|
186
|
+
inherits bar.IFoo,
|
|
187
|
+
baz,another.ISpa,thing
|
|
188
|
+
IBaz,
|
|
189
|
+
IYes, Inow
|
|
190
|
+
:`
|
|
191
|
+
|
|
192
|
+
let expectedTokens = [
|
|
193
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.using.abl", "keyword.other.abl"] },
|
|
194
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.using.abl"] },
|
|
195
|
+
{ "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "meta.using.abl", "entity.name.type.abl"] },
|
|
196
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] },
|
|
197
|
+
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl"] },
|
|
198
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] },
|
|
199
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] }
|
|
200
|
+
];
|
|
201
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
describe('', () => {
|
|
205
|
+
let statement = `CLASS foo.bar.baz ABSTRACT
|
|
206
|
+
|
|
207
|
+
inherits parent.class
|
|
208
|
+
implements one.interface,
|
|
209
|
+
anotehr.iface
|
|
210
|
+
|
|
211
|
+
:`;
|
|
212
|
+
|
|
213
|
+
let expectedTokens = [
|
|
214
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
215
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
216
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
217
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
218
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
219
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
220
|
+
];
|
|
221
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
describe('', () => {
|
|
225
|
+
let statement = `CLASS foo.bar.baz inherits parent.class
|
|
226
|
+
implements one.interface,
|
|
227
|
+
anotehr.iface
|
|
228
|
+
abstract
|
|
229
|
+
use-widget-pool:
|
|
230
|
+
def var x as int.
|
|
231
|
+
`;
|
|
232
|
+
|
|
233
|
+
let expectedTokens = [
|
|
234
|
+
[
|
|
235
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
236
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
237
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
238
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
239
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
240
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
241
|
+
{ "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
242
|
+
{ "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "meta.define.class.abl"] }
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
246
|
+
{ "startIndex": 4, "endIndex": 14, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
247
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
248
|
+
{ "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] },
|
|
249
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.separator.comma.abl"] }
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
253
|
+
{ "startIndex": 4, "endIndex": 17, "scopes": ["source.abl", "meta.define.class.abl", "entity.name.type.abl"] }
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
257
|
+
{ "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
258
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.class.abl"] }
|
|
259
|
+
],
|
|
260
|
+
[
|
|
261
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.class.abl"] },
|
|
262
|
+
{ "startIndex": 4, "endIndex": 19, "scopes": ["source.abl", "meta.define.class.abl", "keyword.other.abl"] },
|
|
263
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.class.abl", "punctuation.terminator.abl"] }
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl"] },
|
|
267
|
+
{ "startIndex": 6, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] },
|
|
268
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] },
|
|
269
|
+
{ "startIndex": 10, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl", "keyword.other.abl"] },
|
|
270
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl"] },
|
|
271
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl", "variable.others.abl"] },
|
|
272
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl"] },
|
|
273
|
+
{ "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl", "keyword.other.abl"] },
|
|
274
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl"] },
|
|
275
|
+
{ "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "meta.define.variable.abl", "storage.type.abl"] },
|
|
276
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.terminator.abl"] }
|
|
277
|
+
],
|
|
278
|
+
[
|
|
279
|
+
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl"] }
|
|
280
|
+
]
|
|
281
|
+
];
|
|
282
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
283
|
+
})
|
|
284
|
+
|
|
285
|
+
describe('', () => {
|
|
286
|
+
let statement = `CLASS foo.bar.baz serializable inherits parent.class implements one.interface,anotehr.iface abstract use-widget-pool:`;
|
|
287
|
+
|
|
288
|
+
let expectedTokens = [
|
|
289
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
290
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
291
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
292
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
293
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
294
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
295
|
+
];
|
|
296
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
describe('', () => {
|
|
300
|
+
let statement = `CLASS foo.bar.baz inherits parent.class
|
|
301
|
+
implements one.interface,
|
|
302
|
+
anotehr.iface
|
|
303
|
+
abstract
|
|
304
|
+
use-widget-pool serializable
|
|
305
|
+
:`;
|
|
306
|
+
|
|
307
|
+
let expectedTokens = [
|
|
308
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
309
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
310
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
311
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
312
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
313
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
314
|
+
];
|
|
315
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
316
|
+
})
|
|
317
|
+
|
|
318
|
+
describe('', () => {
|
|
319
|
+
let statement = `CLASS foo.bar.baz use-widget-pool:`;
|
|
320
|
+
|
|
321
|
+
let expectedTokens = [
|
|
322
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
323
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
324
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
325
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
326
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
327
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
328
|
+
];
|
|
329
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
330
|
+
})
|
|
331
|
+
|
|
332
|
+
describe('', () => {
|
|
333
|
+
let statement = `CLASS foo.bar.baz
|
|
334
|
+
use-widget-pool:`;
|
|
335
|
+
|
|
336
|
+
let expectedTokens = [
|
|
337
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
338
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
339
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
340
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
341
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
342
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
343
|
+
];
|
|
344
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
345
|
+
})
|
|
346
|
+
|
|
347
|
+
describe('', () => {
|
|
348
|
+
let statement = `CLASS foo.bar.baz inherits boo.scoo
|
|
349
|
+
use-widget-pool:`;
|
|
350
|
+
|
|
351
|
+
let expectedTokens = [
|
|
352
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
353
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
354
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
355
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
356
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
357
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
358
|
+
];
|
|
359
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
describe('', () => {
|
|
363
|
+
let statement = `CLASS foo.bar.baz
|
|
364
|
+
INheriTS boo.scoo
|
|
365
|
+
use-widget-POOL
|
|
366
|
+
:`;
|
|
367
|
+
|
|
368
|
+
let expectedTokens = [
|
|
369
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
370
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
371
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
372
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
373
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
374
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
375
|
+
];
|
|
376
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
377
|
+
})
|
|
378
|
+
|
|
379
|
+
describe('', () => {
|
|
380
|
+
let statement = `CLASS foo.bar.baz
|
|
381
|
+
INheriTS
|
|
382
|
+
boo.scoo
|
|
383
|
+
|
|
384
|
+
:`;
|
|
385
|
+
|
|
386
|
+
let expectedTokens = [
|
|
387
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
388
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
389
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
390
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
391
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
392
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
393
|
+
];
|
|
394
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
395
|
+
})
|
|
396
|
+
|
|
397
|
+
describe('', () => {
|
|
398
|
+
let statement = `CLASS
|
|
399
|
+
foo.bar.baz
|
|
400
|
+
INheriTS
|
|
401
|
+
boo.scoo
|
|
402
|
+
:`;
|
|
403
|
+
|
|
404
|
+
let expectedTokens = [
|
|
405
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
406
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
407
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
408
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
409
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
410
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
411
|
+
];
|
|
412
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
413
|
+
})
|
|
414
|
+
|
|
415
|
+
describe('', () => {
|
|
416
|
+
let statement = `CLASS foo.bar.baz INheriTS boo.scoo implements a.b, c.def, ijk :`;
|
|
417
|
+
|
|
418
|
+
let expectedTokens = [
|
|
419
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define-type.abl", "keyword.other.abl"] },
|
|
420
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define-type.abl"] },
|
|
421
|
+
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.define-type.abl", "entity.name.type.abl"] },
|
|
422
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] },
|
|
423
|
+
{ "startIndex": 18, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] },
|
|
424
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl"] }
|
|
425
|
+
];
|
|
426
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
427
|
+
})
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|