abl-tmlanguage 1.3.6 → 1.3.8
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/abl.tmLanguage.json +175 -68
- package/azure-pipelines.yml +2 -2
- package/index.js +74 -49
- package/package.json +1 -1
- package/spec/blocks/on-quit.spec.js +32 -32
- package/spec/comments/comment-in-block-statement.spec.js +18 -18
- package/spec/define/define-button.spec.js +233 -0
- package/spec/define-frame/issue#173.spec.js +48 -0
- package/spec/define-temp-table/define-dataset.spec.js +4 -4
- package/spec/define-temp-table/define-temp-table.spec.js +148 -0
- package/spec/define-variable/define-like.spec.js +78 -0
- package/spec/do/do-blocks.spec.js +89 -58
- package/spec/function-call/misc-abl-functions.spec.js +22 -0
- package/spec/method-attribute-property-call/nested-property-call.spec.js +35 -0
- package/spec/misc-statements/class-in-var-name.spec.js +205 -0
- package/spec/misc-statements/export-delimiter.spec.js +37 -0
- package/spec/misc-statements/if-then.spec.js +8 -8
- package/spec/misc-statements/issue#173.spec.js +100 -0
- package/spec/misc-statements/message-statement.spec.js +21 -0
- package/spec/misc-statements/skip-statement-and-fuction.spec.js +36 -0
- package/spec/misc-statements/system-handles.spec.js +108 -0
- package/spec/type-name/type-name.spec.js +6 -7
- package/spec/type-name/using.spec.js +26 -13
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `define button bCreate
|
|
6
|
+
image-up file "fasafs.gif".`;
|
|
7
|
+
let expectedTokens = [
|
|
8
|
+
[
|
|
9
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
10
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'button'
|
|
12
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'bCreate'
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 2, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'image-up'
|
|
18
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
19
|
+
{ "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'file'
|
|
20
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
21
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
22
|
+
{ "startIndex": 17, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'fasafs.gif'
|
|
23
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
24
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] }, // '.'
|
|
25
|
+
]
|
|
26
|
+
];
|
|
27
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
describe('', () => {
|
|
31
|
+
let statement = `DEFINE PRIVATE BUTTON button
|
|
32
|
+
AUTO-GO
|
|
33
|
+
AUTO-ENDKEY
|
|
34
|
+
DEFAULT
|
|
35
|
+
BGCOLOR expression
|
|
36
|
+
CONTEXT-HELP-ID expression
|
|
37
|
+
DCOLOR expression
|
|
38
|
+
DROP-TARGET
|
|
39
|
+
FGCOLOR expression
|
|
40
|
+
FONT number
|
|
41
|
+
IMAGE-DOWN image-phrase
|
|
42
|
+
IMAGE IMAGE-UP
|
|
43
|
+
FILE name
|
|
44
|
+
IMAGE-SIZE IMAGE-SIZE-CHARS IMAGE-SIZE-PIXELS
|
|
45
|
+
33.22 BY 44.55
|
|
46
|
+
|
|
47
|
+
FROM X 77 Y 77 ROW 6 COLUMN 9
|
|
48
|
+
IMAGE-INSENSITIVE image-phrase
|
|
49
|
+
MOUSE-POINTER name
|
|
50
|
+
LABEL label
|
|
51
|
+
LIKE button
|
|
52
|
+
PFCOLOR expression
|
|
53
|
+
SIZE SIZE-CHARS SIZE-PIXELS 11 BY 22
|
|
54
|
+
NO-FOCUS FLAT-BUTTON
|
|
55
|
+
NO-CONVERT-3D-COLORS
|
|
56
|
+
TOOLTIP tooltip.`;
|
|
57
|
+
let expectedTokens = [
|
|
58
|
+
[
|
|
59
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'DEFINE'
|
|
60
|
+
{ "startIndex": 6, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
61
|
+
{ "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'PRIVATE'
|
|
62
|
+
{ "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
63
|
+
{ "startIndex": 17, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'BUTTON'
|
|
64
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
65
|
+
{ "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'button'
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
69
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'AUTO-GO'
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
73
|
+
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'AUTO-ENDKEY'
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
77
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'DEFAULT'
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
81
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'BGCOLOR'
|
|
82
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
83
|
+
{ "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'expression'
|
|
84
|
+
],
|
|
85
|
+
[
|
|
86
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
87
|
+
{ "startIndex": 2, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'CONTEXT-HELP-ID'
|
|
88
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
89
|
+
{ "startIndex": 18, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'expression'
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
93
|
+
{ "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'DCOLOR'
|
|
94
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
95
|
+
{ "startIndex": 9, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'expression'
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
99
|
+
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'DROP-TARGET'
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
103
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'FGCOLOR'
|
|
104
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
105
|
+
{ "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'expression'
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
109
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'FONT'
|
|
110
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
111
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'number'
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
115
|
+
{ "startIndex": 2, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'IMAGE-DOWN'
|
|
116
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
117
|
+
{ "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'image-phrase'
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
121
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'IMAGE'
|
|
122
|
+
{ "startIndex": 7, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
123
|
+
{ "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'IMAGE-UP'
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
127
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'FILE'
|
|
128
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
129
|
+
{ "startIndex": 7, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'name'
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 4, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'IMAGE-SIZE'
|
|
134
|
+
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
135
|
+
{ "startIndex": 16, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'IMAGE-SIZE-CHARS'
|
|
136
|
+
{ "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
137
|
+
{ "startIndex": 34, "endIndex": 51, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'IMAGE-SIZE-PIXELS'
|
|
138
|
+
],
|
|
139
|
+
[
|
|
140
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
141
|
+
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '33.22'
|
|
142
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
143
|
+
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'BY'
|
|
144
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 17, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] } // '44.55'
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.define.abl"] } // ''
|
|
149
|
+
],
|
|
150
|
+
[
|
|
151
|
+
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
152
|
+
{ "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'FROM'
|
|
153
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
154
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'X'
|
|
155
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
156
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '77'
|
|
157
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
158
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'Y'
|
|
159
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
160
|
+
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '77'
|
|
161
|
+
{ "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
162
|
+
{ "startIndex": 21, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'ROW'
|
|
163
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
164
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '6'
|
|
165
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
166
|
+
{ "startIndex": 27, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'COLUMN'
|
|
167
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
168
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] } // '9'
|
|
169
|
+
],
|
|
170
|
+
[
|
|
171
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
172
|
+
{ "startIndex": 2, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'IMAGE-INSENSITIVE'
|
|
173
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
174
|
+
{ "startIndex": 20, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'image-phrase'
|
|
175
|
+
],
|
|
176
|
+
[
|
|
177
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
178
|
+
{ "startIndex": 2, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'MOUSE-POINTER'
|
|
179
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
180
|
+
{ "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'name'
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
184
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'LABEL'
|
|
185
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
186
|
+
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'label'
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
190
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'LIKE'
|
|
191
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
192
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'button'
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
196
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'PFCOLOR'
|
|
197
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
198
|
+
{ "startIndex": 10, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] } // 'expression'
|
|
199
|
+
],
|
|
200
|
+
[
|
|
201
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
202
|
+
{ "startIndex": 2, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'SIZE'
|
|
203
|
+
{ "startIndex": 6, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
204
|
+
{ "startIndex": 8, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'SIZE-CHARS'
|
|
205
|
+
{ "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
206
|
+
{ "startIndex": 20, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'SIZE-PIXELS'
|
|
207
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
208
|
+
{ "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '11'
|
|
209
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
210
|
+
{ "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'BY'
|
|
211
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
212
|
+
{ "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] } // '22'
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
216
|
+
{ "startIndex": 2, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'NO-FOCUS'
|
|
217
|
+
{ "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
218
|
+
{ "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'FLAT-BUTTON'
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
222
|
+
{ "startIndex": 2, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'NO-CONVERT-3D-COLORS'
|
|
223
|
+
],
|
|
224
|
+
[
|
|
225
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
226
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'TOOLTIP'
|
|
227
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
228
|
+
{ "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'tooltip'
|
|
229
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
230
|
+
]
|
|
231
|
+
];
|
|
232
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
233
|
+
})
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `form
|
|
6
|
+
a at 15
|
|
7
|
+
skip()
|
|
8
|
+
with down# down row 12 no-labels no-box frame f-body.`;
|
|
9
|
+
let expectedTokens = [
|
|
10
|
+
[
|
|
11
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] } // 'form'
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'a'
|
|
15
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
16
|
+
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'at'
|
|
17
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
18
|
+
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "constant.numeric.source.abl"] } // '15'
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'skip'
|
|
22
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
23
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'with'
|
|
27
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
28
|
+
{ "startIndex": 5, "endIndex": 10, "scopes": ["source.abl", "variable.other.abl"] }, // 'down#'
|
|
29
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
30
|
+
{ "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'down'
|
|
31
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
|
|
32
|
+
{ "startIndex": 16, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'row'
|
|
33
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
34
|
+
{ "startIndex": 20, "endIndex": 22, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '12'
|
|
35
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
36
|
+
{ "startIndex": 23, "endIndex": 32, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-labels'
|
|
37
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
38
|
+
{ "startIndex": 33, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-box'
|
|
39
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
|
|
40
|
+
{ "startIndex": 40, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] }, // 'frame'
|
|
41
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
42
|
+
{ "startIndex": 46, "endIndex": 52, "scopes": ["source.abl", "variable.other.abl"] }, // 'f-body'
|
|
43
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
44
|
+
]
|
|
45
|
+
];
|
|
46
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
47
|
+
})
|
|
48
|
+
|
|
@@ -126,13 +126,13 @@ describe('', () => {
|
|
|
126
126
|
{ "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'foo'
|
|
127
127
|
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
128
128
|
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
129
|
-
{ "startIndex": 25, "endIndex": 38, "scopes": ["source.abl", "meta.define.abl", "
|
|
129
|
+
{ "startIndex": 25, "endIndex": 38, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-type'
|
|
130
130
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
131
131
|
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
132
132
|
{ "startIndex": 40, "endIndex": 47, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'ELEMENT'
|
|
133
133
|
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
134
134
|
{ "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
135
|
-
{ "startIndex": 49, "endIndex": 65, "scopes": ["source.abl", "meta.define.abl", "
|
|
135
|
+
{ "startIndex": 49, "endIndex": 65, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'serialize-hidden'
|
|
136
136
|
],
|
|
137
137
|
[
|
|
138
138
|
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
@@ -173,7 +173,7 @@ describe('', () => {
|
|
|
173
173
|
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
174
174
|
{ "startIndex": 82, "endIndex": 88, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'nested'
|
|
175
175
|
{ "startIndex": 88, "endIndex": 89, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
176
|
-
{ "startIndex": 89, "endIndex": 107, "scopes": ["source.abl", "meta.define.abl", "
|
|
176
|
+
{ "startIndex": 89, "endIndex": 107, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'foreign-key-hidden'
|
|
177
177
|
{ "startIndex": 107, "endIndex": 108, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
178
178
|
{ "startIndex": 108, "endIndex": 118, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'not-active'
|
|
179
179
|
],
|
|
@@ -203,7 +203,7 @@ describe('', () => {
|
|
|
203
203
|
{ "startIndex": 64, "endIndex": 69, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'FooId'
|
|
204
204
|
{ "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.abl", "meta.brace.round.js"] }, // ')'
|
|
205
205
|
{ "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
206
|
-
{ "startIndex": 71, "endIndex": 80, "scopes": ["source.abl", "meta.define.abl", "
|
|
206
|
+
{ "startIndex": 71, "endIndex": 80, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'recursive'
|
|
207
207
|
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
208
208
|
]
|
|
209
209
|
];
|
|
@@ -350,4 +350,152 @@ describe('', () => {
|
|
|
350
350
|
]
|
|
351
351
|
];
|
|
352
352
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
353
|
+
})
|
|
354
|
+
|
|
355
|
+
describe('', () => {
|
|
356
|
+
let statement = `define temp-table ttBlah no-undo
|
|
357
|
+
field f12 as chara
|
|
358
|
+
field d3 like table.field-1
|
|
359
|
+
field d5 like db.table.field-1
|
|
360
|
+
field q97 like field-Q97
|
|
361
|
+
index idx1 as primary unique f12 ascending.`;
|
|
362
|
+
let expectedTokens = [
|
|
363
|
+
[
|
|
364
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
365
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
366
|
+
{ "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
|
|
367
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
368
|
+
{ "startIndex": 18, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'ttBlah'
|
|
369
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
370
|
+
{ "startIndex": 25, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
|
|
371
|
+
],
|
|
372
|
+
[
|
|
373
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
374
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
375
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
376
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'f12'
|
|
377
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
378
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
379
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
380
|
+
{ "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] } // 'chara'
|
|
381
|
+
],
|
|
382
|
+
[
|
|
383
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
384
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
385
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
386
|
+
{ "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'd3'
|
|
387
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
388
|
+
{ "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
389
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
390
|
+
{ "startIndex": 16, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] } // 'table.field-1'
|
|
391
|
+
],
|
|
392
|
+
[
|
|
393
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
394
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
395
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
396
|
+
{ "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'd5'
|
|
397
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
398
|
+
{ "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
399
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
400
|
+
{ "startIndex": 16, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] } // 'db.table.field-1'
|
|
401
|
+
],
|
|
402
|
+
[
|
|
403
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
404
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
405
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
406
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'q97'
|
|
407
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
408
|
+
{ "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
409
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
410
|
+
{ "startIndex": 17, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] } // 'field-Q97'
|
|
411
|
+
],
|
|
412
|
+
[
|
|
413
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
414
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'index'
|
|
415
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
416
|
+
{ "startIndex": 8, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'idx1'
|
|
417
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
418
|
+
{ "startIndex": 13, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
419
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
420
|
+
{ "startIndex": 16, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'primary'
|
|
421
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
422
|
+
{ "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'unique'
|
|
423
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
424
|
+
{ "startIndex": 31, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'f12'
|
|
425
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
426
|
+
{ "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'ascending'
|
|
427
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
428
|
+
]
|
|
429
|
+
];
|
|
430
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
431
|
+
})
|
|
432
|
+
|
|
433
|
+
describe('', () => {
|
|
434
|
+
let statement = `define temp-table item no-undo
|
|
435
|
+
namespace-uri "urn:schemas-cybersource-com:transaction-data-{&API-VERSION}"
|
|
436
|
+
field id as decimal decimals 0 xml-data-type "integer" xml-node-type "ATTRIBUTE"
|
|
437
|
+
field requestMessage_id as recid xml-node-type "HIDDEN".`;
|
|
438
|
+
let expectedTokens = [
|
|
439
|
+
[
|
|
440
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
441
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
442
|
+
{ "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
|
|
443
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
444
|
+
{ "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'item'
|
|
445
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
446
|
+
{ "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] } // 'no-undo'
|
|
447
|
+
],
|
|
448
|
+
[
|
|
449
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
450
|
+
{ "startIndex": 2, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'namespace-uri'
|
|
451
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
452
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
453
|
+
{ "startIndex": 17, "endIndex": 76, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'urn:schemas-cybersource-com:transaction-data-{&API-VERSION}'
|
|
454
|
+
{ "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
455
|
+
],
|
|
456
|
+
[
|
|
457
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
458
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
459
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
460
|
+
{ "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'id'
|
|
461
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
462
|
+
{ "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
463
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
464
|
+
{ "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
465
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
466
|
+
{ "startIndex": 22, "endIndex": 30, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'decimals'
|
|
467
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
468
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '0'
|
|
469
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
470
|
+
{ "startIndex": 33, "endIndex": 46, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-data-type'
|
|
471
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
472
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
473
|
+
{ "startIndex": 48, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'integer'
|
|
474
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
475
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
476
|
+
{ "startIndex": 57, "endIndex": 70, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-type'
|
|
477
|
+
{ "startIndex": 70, "endIndex": 71, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
478
|
+
{ "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
479
|
+
{ "startIndex": 72, "endIndex": 81, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'ATTRIBUTE'
|
|
480
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
481
|
+
],
|
|
482
|
+
[
|
|
483
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
484
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'field'
|
|
485
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
486
|
+
{ "startIndex": 8, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'requestMessage_id'
|
|
487
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
488
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
489
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
490
|
+
{ "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'recid'
|
|
491
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
492
|
+
{ "startIndex": 35, "endIndex": 48, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'xml-node-type'
|
|
493
|
+
{ "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
494
|
+
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
495
|
+
{ "startIndex": 50, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl"] }, // 'HIDDEN'
|
|
496
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
497
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
498
|
+
]
|
|
499
|
+
];
|
|
500
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
353
501
|
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `define variable cSomethibng like tabvle.field no-undo.`;
|
|
6
|
+
let expectedTokens = [
|
|
7
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
8
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
9
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
10
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cSomethibng'
|
|
12
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
14
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 33, "endIndex": 45, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'tabvle.field'
|
|
16
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 46, "endIndex": 53, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
|
|
18
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
19
|
+
];
|
|
20
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
describe('', () => {
|
|
24
|
+
let statement = `define variable cSomethibng like database.table.field no-undo.`;
|
|
25
|
+
let expectedTokens = [
|
|
26
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
27
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
28
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
29
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
30
|
+
{ "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cSomethibng'
|
|
31
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
32
|
+
{ "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
33
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
34
|
+
{ "startIndex": 33, "endIndex": 53, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'database.table.field'
|
|
35
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
36
|
+
{ "startIndex": 54, "endIndex": 61, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
|
|
37
|
+
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
38
|
+
];
|
|
39
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
describe('', () => {
|
|
43
|
+
let statement = `define variable cSomethibng like field-name no-undo.`;
|
|
44
|
+
let expectedTokens = [
|
|
45
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
46
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
47
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
48
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
49
|
+
{ "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cSomethibng'
|
|
50
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
51
|
+
{ "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
52
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
53
|
+
{ "startIndex": 33, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'field-name'
|
|
54
|
+
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
55
|
+
{ "startIndex": 44, "endIndex": 51, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
|
|
56
|
+
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
57
|
+
];
|
|
58
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
describe('', () => {
|
|
62
|
+
let statement = `define variable cSomethibng like fieldname no-undo.`;
|
|
63
|
+
let expectedTokens = [
|
|
64
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
65
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
66
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
67
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 16, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cSomethibng'
|
|
69
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
70
|
+
{ "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
|
|
71
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
72
|
+
{ "startIndex": 33, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'fieldname'
|
|
73
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
74
|
+
{ "startIndex": 43, "endIndex": 50, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
|
|
75
|
+
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
76
|
+
];
|
|
77
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
78
|
+
})
|