abl-tmlanguage 1.3.28 → 1.3.30
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/README.md +8 -9
- package/abl.tmLanguage.json +60 -79
- package/package.json +5 -2
- package/.github/workflows/ci.yml +0 -36
- package/CHANGELOG.md +0 -139
- package/abl-functions.txt +0 -548
- package/abl-keywords.txt +0 -416
- package/abl-methods.txt +0 -1053
- package/index.mjs +0 -508
- package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +0 -17
- package/spec/annotations/annotation.spec.js +0 -366
- package/spec/array-extent/issue#5.spec.js +0 -26
- package/spec/blocks/block-labels.spec.js +0 -201
- package/spec/blocks/block-options.spec.js +0 -174
- package/spec/blocks/finally-blocks.spec.js +0 -90
- package/spec/blocks/on-quit.spec.js +0 -59
- package/spec/comments/comment-in-block-statement.spec.js +0 -153
- package/spec/comments/comment-in-for-each.spec.js +0 -105
- package/spec/comments/comment-in-function-args.spec.js +0 -88
- package/spec/comments/spacious-comment.spec.js +0 -73
- package/spec/comments/vscode-abl-issue#127.spec.js +0 -165
- package/spec/create-widgets/create-window.spec.js +0 -224
- package/spec/db-table-and-field/buffer-copy.spec.js +0 -246
- package/spec/db-table-and-field/create-alias.spec.js +0 -131
- package/spec/db-table-and-field/create-record.spec.js +0 -75
- package/spec/db-table-and-field/double-colon-access.spec.js +0 -154
- package/spec/db-table-and-field/field-in-function.spec.js +0 -58
- package/spec/db-table-and-field/fields-except.spec.js +0 -68
- package/spec/db-table-and-field/find-record.spec.js +0 -158
- package/spec/db-table-and-field/foreach.spec.js +0 -588
- package/spec/db-table-and-field/issue#88.spec.js +0 -121
- package/spec/db-table-and-field/new-record.spec.js +0 -250
- package/spec/db-table-and-field/query-get.spec.js +0 -137
- package/spec/define/define-browse.spec.js +0 -454
- package/spec/define/define-button.spec.js +0 -233
- package/spec/define/define-query.spec.js +0 -144
- package/spec/define/define-rectangle.spec.js +0 -47
- package/spec/define-buffer/create-buffer.spec.js +0 -212
- package/spec/define-buffer/simple-single-line.spec.js +0 -155
- package/spec/define-enum/type-name.spec.js +0 -200
- package/spec/define-event/simple-single-line.spec.js +0 -61
- package/spec/define-frame/issue#173.spec.js +0 -580
- package/spec/define-parameter/simple-single-line.spec.js +0 -228
- package/spec/define-property/property-getter.spec.js +0 -70
- package/spec/define-stream/simple-single-line.spec.js +0 -42
- package/spec/define-temp-table/define-dataset.spec.js +0 -217
- package/spec/define-temp-table/define-temp-table.spec.js +0 -605
- package/spec/define-variable/define-like.spec.js +0 -78
- package/spec/define-variable/extent.spec.js +0 -778
- package/spec/define-variable/initial.spec.js +0 -126
- package/spec/define-variable/issue#6.spec.js +0 -280
- package/spec/define-variable/issue#9.spec.js +0 -45
- package/spec/define-variable/simple-single-line.spec.js +0 -181
- package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +0 -62
- package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +0 -65
- package/spec/define-variable/tm-issue#2.spec.js +0 -25
- package/spec/define-variable/var-statement.spec.js +0 -467
- package/spec/do/do-blocks.spec.js +0 -289
- package/spec/do/issue#3.spec.js +0 -83
- package/spec/do/stop-after.spec.js +0 -79
- package/spec/for-each/for-each.spec.js +0 -111
- package/spec/for-each/issue#321.spec.js +0 -116
- package/spec/for-each/vscode-abl.issue#166.spec.js +0 -83
- package/spec/function-call/can-find.spec.js +0 -239
- package/spec/function-call/include-in-argument.spec.js +0 -120
- package/spec/function-call/misc-abl-functions.spec.js +0 -59
- package/spec/function-call/nested-functions.spec.js +0 -245
- package/spec/function-call/pass-table.spec.js +0 -116
- package/spec/function-call/set-size.spec.js +0 -56
- package/spec/function-call/udf-calls.spec.js +0 -50
- package/spec/function-call/vscode-abl-issue#19.spec.js +0 -129
- package/spec/function-definition/vscode-abl-issue#166.spec.js +0 -446
- package/spec/global-scoped-define/global-define.spec.js +0 -64
- package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +0 -70
- package/spec/global-scoped-define/undefine.spec.js +0 -44
- package/spec/include/abl-tmlanguage-issues#5.spec.js +0 -40
- package/spec/include/include-file-name.spec.js +0 -267
- package/spec/include/unnamed-arguments.spec.js +0 -38
- package/spec/include/vscode-abl-issue#45.spec.js +0 -20
- package/spec/include/vscode-abl-issue#77.spec.js +0 -128
- package/spec/include/vscode-abl-issue#80.spec.js +0 -50
- package/spec/input-output/input-from.spec.js +0 -504
- package/spec/input-output/output-to.spec.js +0 -456
- package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +0 -98
- package/spec/method-attribute-property-call/connected-method.spec.js +0 -29
- package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +0 -53
- package/spec/method-attribute-property-call/get-set-method-name.spec.js +0 -140
- package/spec/method-attribute-property-call/method-call.spec.js +0 -268
- package/spec/method-attribute-property-call/nested-property-call.spec.js +0 -18
- package/spec/method-attribute-property-call/unqualified-method-call.spec.js +0 -41
- package/spec/method-definition/constructor.spec.js +0 -174
- package/spec/method-definition/method.spec.js +0 -541
- package/spec/misc-statements/array-for.spec.js +0 -21
- package/spec/misc-statements/case-statement.spec.js +0 -96
- package/spec/misc-statements/class-in-var-name.spec.js +0 -204
- package/spec/misc-statements/copy-lob.spec.js +0 -144
- package/spec/misc-statements/def-in-name.spec.js +0 -20
- package/spec/misc-statements/delete-objects.spec.js +0 -65
- package/spec/misc-statements/do-in-name.spec.js +0 -259
- package/spec/misc-statements/event-subscribe.spec.js +0 -308
- package/spec/misc-statements/export-delimiter.spec.js +0 -37
- package/spec/misc-statements/guid.spec.js +0 -97
- package/spec/misc-statements/if-then.spec.js +0 -454
- package/spec/misc-statements/issue#173.spec.js +0 -99
- package/spec/misc-statements/message-statement.spec.js +0 -21
- package/spec/misc-statements/record-buffer-functions.spec.js +0 -73
- package/spec/misc-statements/release.spec.js +0 -41
- package/spec/misc-statements/return-statement.spec.js +0 -64
- package/spec/misc-statements/skip-statement-and-fuction.spec.js +0 -35
- package/spec/misc-statements/system-handles.spec.js +0 -122
- package/spec/numbers/scientific-notation.spec.js +0 -212
- package/spec/operators/operators.spec.js +0 -149
- package/spec/operators/safe-navigation-operator.spec.js +0 -246
- package/spec/preprocesors/issue166.spec.js +0 -91
- package/spec/preprocesors/preprocessor-functions.spec.js +0 -77
- package/spec/preprocesors/proparse-preprocessor.spec.js +0 -90
- package/spec/procedure-definition/empty-proc.spec.js +0 -134
- package/spec/procedure-definition/trigger-procedure.spec.js +0 -132
- package/spec/procedure-definition/vscode-abl-issue#22.spec.js +0 -46
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +0 -31
- package/spec/procedure-definition/vscode-abl-issue#325.spec.js +0 -88
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +0 -39
- package/spec/run-statement/run-statement.spec.js +0 -868
- package/spec/shared.js +0 -104
- package/spec/strings/translation-attribute.spec.js +0 -52
- package/spec/strings/vscode-abl-issue#11.spec.js +0 -56
- package/spec/strings/vscode-abl-issue#28.spec.js +0 -31
- package/spec/type-name/argument.spec.js +0 -206
- package/spec/type-name/cast.spec.js +0 -163
- package/spec/type-name/define-class.spec.js +0 -555
- package/spec/type-name/define-enum.spec.js +0 -44
- package/spec/type-name/define-interface.spec.js +0 -159
- package/spec/type-name/define-property.spec.js +0 -301
- package/spec/type-name/define-temp-table.spec.js +0 -434
- package/spec/type-name/define-type-spec.js +0 -435
- package/spec/type-name/define-variable-property.spec.js +0 -264
- package/spec/type-name/define-variable.spec.js +0 -386
- package/spec/type-name/get-class.spec.js +0 -91
- package/spec/type-name/new.spec.js +0 -185
- package/spec/type-name/parameter-as.spec.js +0 -978
- package/spec/type-name/type-name.spec.js +0 -880
- package/spec/type-name/using.spec.js +0 -160
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `for each bCustomer
|
|
6
|
-
no-lock:
|
|
7
|
-
end.`;
|
|
8
|
-
let expectedTokens = [
|
|
9
|
-
[
|
|
10
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
11
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
12
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
13
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
14
|
-
{ "startIndex": 9, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bCustomer'
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
18
|
-
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
|
|
19
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
23
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
24
|
-
]
|
|
25
|
-
]
|
|
26
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
describe('', () => {
|
|
30
|
-
let statement = `for each bCustomer where true no-lock:
|
|
31
|
-
end.`;
|
|
32
|
-
let expectedTokens = [
|
|
33
|
-
[
|
|
34
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
35
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
36
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
37
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
38
|
-
{ "startIndex": 9, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bCustomer'
|
|
39
|
-
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
40
|
-
{ "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "keyword.other.abl"] }, // 'where'
|
|
41
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
42
|
-
{ "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "constant.language.abl"] }, // 'true'
|
|
43
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
44
|
-
{ "startIndex": 30, "endIndex": 37, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
|
|
45
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
49
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
50
|
-
]
|
|
51
|
-
]
|
|
52
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
describe('', () => {
|
|
56
|
-
let statement = `for each bCustomer
|
|
57
|
-
exclusive-l:
|
|
58
|
-
end.`;
|
|
59
|
-
let expectedTokens = [
|
|
60
|
-
[
|
|
61
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
62
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
63
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
64
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
65
|
-
{ "startIndex": 9, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bCustomer'
|
|
66
|
-
],
|
|
67
|
-
[
|
|
68
|
-
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'exclusive-l'
|
|
69
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
70
|
-
],
|
|
71
|
-
[
|
|
72
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
73
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
74
|
-
]
|
|
75
|
-
]
|
|
76
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
describe('', () => {
|
|
80
|
-
let statement = `for each bCustomer
|
|
81
|
-
share-lo:
|
|
82
|
-
end.`;
|
|
83
|
-
let expectedTokens = [
|
|
84
|
-
[
|
|
85
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
86
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
87
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
88
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
89
|
-
{ "startIndex": 9, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bCustomer'
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'share-lo'
|
|
93
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
94
|
-
],
|
|
95
|
-
[
|
|
96
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
97
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
98
|
-
]
|
|
99
|
-
]
|
|
100
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
describe('', () => {
|
|
104
|
-
let statement = `block-label: for each bCustomer
|
|
105
|
-
share-lo:
|
|
106
|
-
end.`;
|
|
107
|
-
let expectedTokens = [
|
|
108
|
-
[
|
|
109
|
-
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'block-label'
|
|
110
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // ':'
|
|
111
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
112
|
-
{ "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
113
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
114
|
-
{ "startIndex": 17, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
115
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
|
|
116
|
-
{ "startIndex": 22, "endIndex": 31, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bCustomer'
|
|
117
|
-
],
|
|
118
|
-
[
|
|
119
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'share-lo'
|
|
120
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
121
|
-
],
|
|
122
|
-
[
|
|
123
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
124
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
125
|
-
]
|
|
126
|
-
]
|
|
127
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
describe('', () => {
|
|
131
|
-
let statement = `block-label:
|
|
132
|
-
repeat for bCustomer:
|
|
133
|
-
end.`;
|
|
134
|
-
let expectedTokens = [
|
|
135
|
-
[
|
|
136
|
-
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'block-label'
|
|
137
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
138
|
-
],
|
|
139
|
-
[
|
|
140
|
-
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'repeat'
|
|
141
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
142
|
-
{ "startIndex": 7, "endIndex": 10, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'for'
|
|
143
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
144
|
-
{ "startIndex": 11, "endIndex": 20, "scopes": ["source.abl", "meta.block.abl", "storage.data.table.abl"] }, // 'bCustomer'
|
|
145
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
146
|
-
],
|
|
147
|
-
[
|
|
148
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
149
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
150
|
-
]
|
|
151
|
-
]
|
|
152
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
describe('', () => {
|
|
156
|
-
let statement = `EXCLUSIVE-LOCK-BLOCK:
|
|
157
|
-
for bCustomer exclusive-lock:
|
|
158
|
-
end.`;
|
|
159
|
-
let expectedTokens = [
|
|
160
|
-
[
|
|
161
|
-
{ "startIndex": 0, "endIndex": 20, "scopes": ["source.abl", "entity.name.label.abl"] }, // 'EXCLUSIVE-LOCK-BLOCK'
|
|
162
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
163
|
-
],
|
|
164
|
-
[
|
|
165
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
166
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
167
|
-
{ "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bCustomer'
|
|
168
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
169
|
-
{ "startIndex": 14, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] }, // 'exclusive-lock'
|
|
170
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
171
|
-
],
|
|
172
|
-
[
|
|
173
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
174
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
175
|
-
]
|
|
176
|
-
]
|
|
177
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
describe('', () => {
|
|
181
|
-
// The Next in NextOrderprocessError should not be a flow statement
|
|
182
|
-
let statement = `ASSIGN NextOrderprocessError = UIMessage:canFindFirstUIMessage("SH0057A").`;
|
|
183
|
-
let expectedTokens = [
|
|
184
|
-
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
|
|
185
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
186
|
-
{ "startIndex": 7, "endIndex": 28, "scopes": ["source.abl", "variable.other.abl"] }, // 'NextOrderprocessError'
|
|
187
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
188
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
189
|
-
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
190
|
-
{ "startIndex": 31, "endIndex": 40, "scopes": ["source.abl", "variable.other.abl"] }, // 'UIMessage'
|
|
191
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
192
|
-
{ "startIndex": 41, "endIndex": 62, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'canFindFirstUIMessage'
|
|
193
|
-
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
194
|
-
{ "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
195
|
-
{ "startIndex": 64, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'SH0057A'
|
|
196
|
-
{ "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
197
|
-
{ "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
198
|
-
{ "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
199
|
-
]
|
|
200
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
201
|
-
})
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `do with frame {&FRAME-NAME}:`;
|
|
6
|
-
let expectedTokens = [
|
|
7
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
8
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
9
|
-
{ "startIndex": 3, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'with'
|
|
10
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
11
|
-
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'frame'
|
|
12
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
13
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
14
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
15
|
-
{ "startIndex": 16, "endIndex": 26, "scopes": ["source.abl", "meta.block.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'FRAME-NAME'
|
|
16
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.block.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
17
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
18
|
-
]
|
|
19
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
describe('', () => {
|
|
23
|
-
let statement = `do while
|
|
24
|
-
vFooId eq ?
|
|
25
|
-
or vFooId eq ""
|
|
26
|
-
or can-find(
|
|
27
|
-
first ttFoo
|
|
28
|
-
where ttFoo.FooId eq vFooId):
|
|
29
|
-
|
|
30
|
-
vFooId = guid.
|
|
31
|
-
|
|
32
|
-
end.`;
|
|
33
|
-
let expectedTokens = [
|
|
34
|
-
[
|
|
35
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
36
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
37
|
-
{ "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] } // 'while'
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
41
|
-
{ "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vFooId'
|
|
42
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
43
|
-
{ "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
44
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
45
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl", "constant.language.abl"] } // '?'
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
49
|
-
{ "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'or'
|
|
50
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
51
|
-
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vFooId'
|
|
52
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
53
|
-
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
54
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
55
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
56
|
-
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
57
|
-
],
|
|
58
|
-
[
|
|
59
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
60
|
-
{ "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'or'
|
|
61
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
62
|
-
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.block.abl", "support.function.abl"] }, // 'can-find'
|
|
63
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.brace.round.js"] } // '('
|
|
64
|
-
],
|
|
65
|
-
[
|
|
66
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
67
|
-
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'first'
|
|
68
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
69
|
-
{ "startIndex": 14, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl", "storage.data.table.abl"] } // 'ttFoo'
|
|
70
|
-
],
|
|
71
|
-
[
|
|
72
|
-
{ "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
73
|
-
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'where'
|
|
74
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
75
|
-
{ "startIndex": 18, "endIndex": 29, "scopes": ["source.abl", "meta.block.abl", "storage.data.table.abl"] }, // 'ttFoo.FooId'
|
|
76
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
77
|
-
{ "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
78
|
-
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
79
|
-
{ "startIndex": 33, "endIndex": 39, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vFooId'
|
|
80
|
-
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.block.abl", "meta.brace.round.js"] }, // ')'
|
|
81
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
82
|
-
],
|
|
83
|
-
[
|
|
84
|
-
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
85
|
-
],
|
|
86
|
-
[
|
|
87
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
88
|
-
{ "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "variable.other.abl"] }, // 'vFooId'
|
|
89
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
90
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
91
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
92
|
-
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "support.function.abl"] }, // 'guid'
|
|
93
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
94
|
-
],
|
|
95
|
-
[
|
|
96
|
-
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
97
|
-
],
|
|
98
|
-
[
|
|
99
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
100
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
101
|
-
]
|
|
102
|
-
]
|
|
103
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
describe('', () => {
|
|
107
|
-
let statement = `if oValidationMessages:IsEmpty() = false then
|
|
108
|
-
undo, throw new ImportValidationException("custname",
|
|
109
|
-
pbAccount.CustKey,
|
|
110
|
-
SalesforceObjectTypeEnum:Account:ToString(),
|
|
111
|
-
pbAccount.ObjectId,
|
|
112
|
-
oValidationMessages).`;
|
|
113
|
-
let expectedTokens = [
|
|
114
|
-
[
|
|
115
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
116
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
117
|
-
{ "startIndex": 3, "endIndex": 22, "scopes": ["source.abl", "variable.other.abl"] }, // 'oValidationMessages'
|
|
118
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
119
|
-
{ "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'IsEmpty'
|
|
120
|
-
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
121
|
-
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
122
|
-
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
123
|
-
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
124
|
-
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
125
|
-
{ "startIndex": 35, "endIndex": 40, "scopes": ["source.abl", "constant.language.abl"] }, // 'false'
|
|
126
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
|
|
127
|
-
{ "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
|
|
128
|
-
],
|
|
129
|
-
[
|
|
130
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
131
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'undo'
|
|
132
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
133
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
134
|
-
{ "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'throw'
|
|
135
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
|
|
136
|
-
{ "startIndex": 16, "endIndex": 19, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
|
|
137
|
-
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
138
|
-
{ "startIndex": 20, "endIndex": 45, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'ImportValidationException'
|
|
139
|
-
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
140
|
-
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
141
|
-
{ "startIndex": 47, "endIndex": 55, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'custname'
|
|
142
|
-
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
143
|
-
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.separator.comma.abl"] } // ','
|
|
144
|
-
],
|
|
145
|
-
[
|
|
146
|
-
{ "startIndex": 0, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
147
|
-
{ "startIndex": 48, "endIndex": 65, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'pbAccount.CustKey'
|
|
148
|
-
{ "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "punctuation.separator.comma.abl"] } // ','
|
|
149
|
-
],
|
|
150
|
-
[
|
|
151
|
-
{ "startIndex": 0, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
152
|
-
{ "startIndex": 48, "endIndex": 72, "scopes": ["source.abl", "variable.other.abl"] }, // 'SalesforceObjectTypeEnum'
|
|
153
|
-
{ "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
154
|
-
{ "startIndex": 73, "endIndex": 80, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Account'
|
|
155
|
-
{ "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
156
|
-
{ "startIndex": 81, "endIndex": 89, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ToString'
|
|
157
|
-
{ "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
158
|
-
{ "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
159
|
-
{ "startIndex": 91, "endIndex": 92, "scopes": ["source.abl", "punctuation.separator.comma.abl"] } // ','
|
|
160
|
-
],
|
|
161
|
-
[
|
|
162
|
-
{ "startIndex": 0, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
163
|
-
{ "startIndex": 48, "endIndex": 66, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'pbAccount.ObjectId'
|
|
164
|
-
{ "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "punctuation.separator.comma.abl"] } // ','
|
|
165
|
-
],
|
|
166
|
-
[
|
|
167
|
-
{ "startIndex": 0, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
168
|
-
{ "startIndex": 48, "endIndex": 67, "scopes": ["source.abl", "variable.other.abl"] }, // 'oValidationMessages'
|
|
169
|
-
{ "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
170
|
-
{ "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
171
|
-
]
|
|
172
|
-
]
|
|
173
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
174
|
-
})
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `FINALLY:
|
|
6
|
-
ASSIGN oBusinessEntityDescriptor = ?.
|
|
7
|
-
END FINALLY.`;
|
|
8
|
-
let expectedTokens = [
|
|
9
|
-
[
|
|
10
|
-
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
|
|
11
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
12
|
-
],
|
|
13
|
-
[
|
|
14
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
15
|
-
{ "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
|
|
16
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
17
|
-
{ "startIndex": 11, "endIndex": 36, "scopes": ["source.abl", "variable.other.abl"] }, // 'oBusinessEntityDescriptor'
|
|
18
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
|
|
19
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
20
|
-
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
|
|
21
|
-
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "constant.language.abl"] }, // '?'
|
|
22
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
|
|
26
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
27
|
-
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FINALLY'
|
|
28
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
29
|
-
]
|
|
30
|
-
];
|
|
31
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
describe('', () => {
|
|
35
|
-
let statement = `FINALLY:
|
|
36
|
-
END. // no finally on END`;
|
|
37
|
-
let expectedTokens = [
|
|
38
|
-
[
|
|
39
|
-
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
|
|
40
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
44
|
-
{ "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
|
|
45
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
46
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
47
|
-
{ "startIndex": 7, "endIndex": 27, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no finally on END'
|
|
48
|
-
]
|
|
49
|
-
];
|
|
50
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
describe('', () => {
|
|
54
|
-
let statement = `finally.
|
|
55
|
-
if valid-object(oMenu) then delete object oMenu no-error.
|
|
56
|
-
end finally.`;
|
|
57
|
-
let expectedTokens = [
|
|
58
|
-
[
|
|
59
|
-
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'finally'
|
|
60
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
64
|
-
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
65
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
66
|
-
{ "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "support.function.abl"] }, // 'valid-object'
|
|
67
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
68
|
-
{ "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oMenu'
|
|
69
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
70
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
71
|
-
{ "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
72
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
73
|
-
{ "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
|
|
74
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
|
|
75
|
-
{ "startIndex": 37, "endIndex": 43, "scopes": ["source.abl", "keyword.other.abl"] }, // 'object'
|
|
76
|
-
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl"] }, // ' '
|
|
77
|
-
{ "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "variable.other.abl"] }, // 'oMenu'
|
|
78
|
-
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
79
|
-
{ "startIndex": 50, "endIndex": 58, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
|
|
80
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
81
|
-
],
|
|
82
|
-
[
|
|
83
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
84
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
85
|
-
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'finally'
|
|
86
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
87
|
-
]
|
|
88
|
-
];
|
|
89
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
90
|
-
})
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `do on error undo, leave
|
|
6
|
-
on endkey undo, leave
|
|
7
|
-
on stop undo, leave
|
|
8
|
-
on quit undo, leave:`;
|
|
9
|
-
let expectedTokens = [
|
|
10
|
-
[
|
|
11
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
12
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
13
|
-
{ "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'on'
|
|
14
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
15
|
-
{ "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'error'
|
|
16
|
-
{ "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
17
|
-
{ "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'undo'
|
|
18
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
19
|
-
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
20
|
-
{ "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] } // 'leave'
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
24
|
-
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'on'
|
|
25
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
26
|
-
{ "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'endkey'
|
|
27
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
28
|
-
{ "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'undo'
|
|
29
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
30
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
31
|
-
{ "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] } // 'leave'
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
35
|
-
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'on'
|
|
36
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
37
|
-
{ "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'stop'
|
|
38
|
-
{ "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
39
|
-
{ "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'undo'
|
|
40
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
41
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
42
|
-
{ "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] } // 'leave'
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
46
|
-
{ "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'on'
|
|
47
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
48
|
-
{ "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'quit'
|
|
49
|
-
{ "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
50
|
-
{ "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'undo'
|
|
51
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
52
|
-
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
53
|
-
{ "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'leave'
|
|
54
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
55
|
-
]
|
|
56
|
-
]
|
|
57
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
58
|
-
})
|
|
59
|
-
|