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,116 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `FIND bfAddress NO-LOCK
|
|
6
|
-
WHERE bfAddress.RecCode
|
|
7
|
-
AND bfAddress.Company = geCompanyAddress
|
|
8
|
-
AND bfAddress.AdrNum = bfOrdDlvAd.AdrNum
|
|
9
|
-
NO-ERROR.
|
|
10
|
-
|
|
11
|
-
FIND bfAddress NO-LOCK
|
|
12
|
-
WHERE bfAddress.RecCode = ""
|
|
13
|
-
AND bfAddress.Company = gecompanyaddress
|
|
14
|
-
AND bfAddress.AdrNum = bfOrdMst.custNum
|
|
15
|
-
NO-ERROR.
|
|
16
|
-
IF AVAILABLE bfAddress THEN
|
|
17
|
-
ASSIGN InvoiceDetailDocumentCountry = bfAddress.Country.`;
|
|
18
|
-
let expectedTokens = [
|
|
19
|
-
[
|
|
20
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FIND'
|
|
21
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
22
|
-
{ "startIndex": 5, "endIndex": 14, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress'
|
|
23
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
24
|
-
{ "startIndex": 15, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-LOCK'
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WHERE'
|
|
28
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
29
|
-
{ "startIndex": 6, "endIndex": 23, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bfAddress.RecCode'
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
|
|
33
|
-
{ "startIndex": 3, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
34
|
-
{ "startIndex": 5, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.Company'
|
|
35
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
36
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
37
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
38
|
-
{ "startIndex": 25, "endIndex": 41, "scopes": ["source.abl", "variable.other.abl"] } // 'geCompanyAddress'
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
|
|
42
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
43
|
-
{ "startIndex": 4, "endIndex": 20, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.AdrNum'
|
|
44
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
45
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
46
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
47
|
-
{ "startIndex": 23, "endIndex": 40, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bfOrdDlvAd.AdrNum'
|
|
48
|
-
],
|
|
49
|
-
[
|
|
50
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-ERROR'
|
|
51
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
55
|
-
],
|
|
56
|
-
[
|
|
57
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FIND'
|
|
58
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
59
|
-
{ "startIndex": 5, "endIndex": 14, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress'
|
|
60
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
61
|
-
{ "startIndex": 15, "endIndex": 22, "scopes": ["source.abl", "keyword.other.abl"] } // 'NO-LOCK'
|
|
62
|
-
],
|
|
63
|
-
[
|
|
64
|
-
{ "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WHERE'
|
|
65
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
66
|
-
{ "startIndex": 6, "endIndex": 23, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.RecCode'
|
|
67
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
|
|
68
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
69
|
-
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
|
|
70
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
71
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
72
|
-
],
|
|
73
|
-
[
|
|
74
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
|
|
75
|
-
{ "startIndex": 3, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
76
|
-
{ "startIndex": 5, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.Company'
|
|
77
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
78
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
79
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
80
|
-
{ "startIndex": 25, "endIndex": 41, "scopes": ["source.abl", "variable.other.abl"] } // 'gecompanyaddress'
|
|
81
|
-
],
|
|
82
|
-
[
|
|
83
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
|
|
84
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
85
|
-
{ "startIndex": 4, "endIndex": 20, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.AdrNum'
|
|
86
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
87
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
88
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
89
|
-
{ "startIndex": 23, "endIndex": 39, "scopes": ["source.abl", "storage.data.table.abl"] } // 'bfOrdMst.custNum'
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-ERROR'
|
|
93
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
94
|
-
],
|
|
95
|
-
[
|
|
96
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
|
|
97
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
98
|
-
{ "startIndex": 3, "endIndex": 12, "scopes": ["source.abl", "support.function.abl"] }, // 'AVAILABLE'
|
|
99
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
100
|
-
{ "startIndex": 13, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress'
|
|
101
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
102
|
-
{ "startIndex": 23, "endIndex": 27, "scopes": ["source.abl", "keyword.other.abl"] } // 'THEN'
|
|
103
|
-
],
|
|
104
|
-
[
|
|
105
|
-
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
|
|
106
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
107
|
-
{ "startIndex": 7, "endIndex": 35, "scopes": ["source.abl", "variable.other.abl"] }, // 'InvoiceDetailDocumentCountry'
|
|
108
|
-
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
109
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
110
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
111
|
-
{ "startIndex": 38, "endIndex": 55, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'bfAddress.Country'
|
|
112
|
-
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
113
|
-
]
|
|
114
|
-
];
|
|
115
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
116
|
-
})
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `// scope (break): storage.data.table.abl source.abl
|
|
6
|
-
for each Customer
|
|
7
|
-
no-lock
|
|
8
|
-
break by Customer.CustNum by Customer.name:
|
|
9
|
-
end. /* */`;
|
|
10
|
-
let expectedTokens = [
|
|
11
|
-
[
|
|
12
|
-
{ "startIndex": 0, "endIndex": 52, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// scope (break): storage.data.table.abl source.abl'
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
16
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
17
|
-
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
18
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
19
|
-
{ "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "storage.data.table.abl"] } // 'Customer'
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
23
|
-
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] } // 'no-lock'
|
|
24
|
-
],
|
|
25
|
-
[
|
|
26
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
27
|
-
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'break'
|
|
28
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
29
|
-
{ "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
|
|
30
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
|
|
31
|
-
{ "startIndex": 13, "endIndex": 29, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.CustNum'
|
|
32
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
33
|
-
{ "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
|
|
34
|
-
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
35
|
-
{ "startIndex": 33, "endIndex": 46, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.name'
|
|
36
|
-
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
40
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
41
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
42
|
-
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
43
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' '
|
|
44
|
-
{ "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
45
|
-
]
|
|
46
|
-
];
|
|
47
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
describe('', () => {
|
|
51
|
-
let statement = `for first Customer no-lock by Customer.CustNum by Customer.name:
|
|
52
|
-
end. /* */`;
|
|
53
|
-
let expectedTokens = [
|
|
54
|
-
[
|
|
55
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
56
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
57
|
-
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
58
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
59
|
-
{ "startIndex": 10, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer'
|
|
60
|
-
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
61
|
-
{ "startIndex": 19, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
|
|
62
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
|
|
63
|
-
{ "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
|
|
64
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
65
|
-
{ "startIndex": 30, "endIndex": 46, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.CustNum'
|
|
66
|
-
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl"] }, // ' '
|
|
67
|
-
{ "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'by'
|
|
68
|
-
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
69
|
-
{ "startIndex": 50, "endIndex": 63, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer.name'
|
|
70
|
-
{ "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
71
|
-
],
|
|
72
|
-
[
|
|
73
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
74
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
75
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
76
|
-
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
77
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' '
|
|
78
|
-
{ "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
79
|
-
]
|
|
80
|
-
];
|
|
81
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
82
|
-
})
|
|
83
|
-
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `IF NOT CAN-FIND(InstanceChildren WHERE InstanceChildren.contPath = pcPath AND
|
|
6
|
-
InstanceChildren.contName = pcFile AND
|
|
7
|
-
InstanceChildren.parentInstanceID = Instance.ID AND
|
|
8
|
-
InstanceChildren.ID = cField) THEN DO: end.`;
|
|
9
|
-
let expectedTokens = [
|
|
10
|
-
[
|
|
11
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
|
|
12
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
13
|
-
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'NOT'
|
|
14
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
15
|
-
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "support.function.abl"] }, // 'CAN-FIND'
|
|
16
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
17
|
-
{ "startIndex": 16, "endIndex": 32, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'InstanceChildren'
|
|
18
|
-
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
19
|
-
{ "startIndex": 33, "endIndex": 38, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WHERE'
|
|
20
|
-
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
|
|
21
|
-
{ "startIndex": 39, "endIndex": 64, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'InstanceChildren.contPath'
|
|
22
|
-
{ "startIndex": 64, "endIndex": 73, "scopes": ["source.abl"] }, // ' '
|
|
23
|
-
{ "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
24
|
-
{ "startIndex": 74, "endIndex": 75, "scopes": ["source.abl"] }, // ' '
|
|
25
|
-
{ "startIndex": 75, "endIndex": 81, "scopes": ["source.abl", "variable.other.abl"] }, // 'pcPath'
|
|
26
|
-
{ "startIndex": 81, "endIndex": 87, "scopes": ["source.abl"] }, // ' '
|
|
27
|
-
{ "startIndex": 87, "endIndex": 90, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
31
|
-
{ "startIndex": 4, "endIndex": 29, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'InstanceChildren.contName'
|
|
32
|
-
{ "startIndex": 29, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
33
|
-
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
34
|
-
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
|
|
35
|
-
{ "startIndex": 40, "endIndex": 46, "scopes": ["source.abl", "variable.other.abl"] }, // 'pcFile'
|
|
36
|
-
{ "startIndex": 46, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
|
|
37
|
-
{ "startIndex": 52, "endIndex": 55, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
41
|
-
{ "startIndex": 2, "endIndex": 35, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'InstanceChildren.parentInstanceID'
|
|
42
|
-
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
43
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
44
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
45
|
-
{ "startIndex": 38, "endIndex": 49, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Instance.ID'
|
|
46
|
-
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
47
|
-
{ "startIndex": 50, "endIndex": 53, "scopes": ["source.abl", "keyword.other.abl"] } // 'AND'
|
|
48
|
-
],
|
|
49
|
-
[
|
|
50
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
51
|
-
{ "startIndex": 2, "endIndex": 21, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'InstanceChildren.ID'
|
|
52
|
-
{ "startIndex": 21, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
53
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
54
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
55
|
-
{ "startIndex": 38, "endIndex": 44, "scopes": ["source.abl", "variable.other.abl"] }, // 'cField'
|
|
56
|
-
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
57
|
-
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
58
|
-
{ "startIndex": 46, "endIndex": 50, "scopes": ["source.abl", "keyword.other.abl"] }, // 'THEN'
|
|
59
|
-
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
60
|
-
{ "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'DO'
|
|
61
|
-
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // ':'
|
|
62
|
-
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl"] }, // ' '
|
|
63
|
-
{ "startIndex": 55, "endIndex": 58, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
64
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
65
|
-
]
|
|
66
|
-
];
|
|
67
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
describe('', () => {
|
|
71
|
-
let statement = `any_trig = (IF CAN-FIND(FIRST dictdb._Field-trig OF bField) THEN yes else no).`;
|
|
72
|
-
let expectedTokens = [
|
|
73
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'any_trig'
|
|
74
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
75
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
76
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
77
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
78
|
-
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'IF'
|
|
79
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
80
|
-
{ "startIndex": 15, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'CAN-FIND'
|
|
81
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
82
|
-
{ "startIndex": 24, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'FIRST'
|
|
83
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
84
|
-
{ "startIndex": 30, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'dictdb._Field-trig'
|
|
85
|
-
{ "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
86
|
-
{ "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'OF'
|
|
87
|
-
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
88
|
-
{ "startIndex": 52, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'bField'
|
|
89
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
90
|
-
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl"] }, // ' '
|
|
91
|
-
{ "startIndex": 60, "endIndex": 64, "scopes": ["source.abl", "keyword.other.abl"] }, // 'THEN'
|
|
92
|
-
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl"] }, // ' '
|
|
93
|
-
{ "startIndex": 65, "endIndex": 68, "scopes": ["source.abl", "constant.language.abl"] }, // 'yes'
|
|
94
|
-
{ "startIndex": 68, "endIndex": 69, "scopes": ["source.abl"] }, // ' '
|
|
95
|
-
{ "startIndex": 69, "endIndex": 73, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
|
|
96
|
-
{ "startIndex": 73, "endIndex": 74, "scopes": ["source.abl"] }, // ' '
|
|
97
|
-
{ "startIndex": 74, "endIndex": 76, "scopes": ["source.abl", "constant.language.abl"] }, // 'no'
|
|
98
|
-
{ "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
99
|
-
{ "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
100
|
-
];
|
|
101
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
describe('', () => {
|
|
105
|
-
let statement = `STRING(CAN-FIND(FIRST DICTDB._Index-field OF DICTDB._Field),"y/n":u)`;
|
|
106
|
-
let expectedTokens = [
|
|
107
|
-
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'STRING'
|
|
108
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
109
|
-
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'CAN-FIND'
|
|
110
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
111
|
-
{ "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'FIRST'
|
|
112
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
113
|
-
{ "startIndex": 22, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'DICTDB._Index-field'
|
|
114
|
-
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
115
|
-
{ "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'OF'
|
|
116
|
-
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
117
|
-
{ "startIndex": 45, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'DICTDB._Field'
|
|
118
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
119
|
-
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
120
|
-
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
121
|
-
{ "startIndex": 61, "endIndex": 64, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'y/n'
|
|
122
|
-
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
123
|
-
{ "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
|
|
124
|
-
{ "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
|
|
125
|
-
];
|
|
126
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
describe('', () => {
|
|
131
|
-
let statement = `if can-find(customer 2) then. `;
|
|
132
|
-
let expectedTokens = [
|
|
133
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
134
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
135
|
-
{ "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'can-find'
|
|
136
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
137
|
-
{ "startIndex": 12, "endIndex": 20, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'customer'
|
|
138
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
139
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '2'
|
|
140
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
141
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
|
|
142
|
-
{ "startIndex": 24, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
143
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
144
|
-
{ "startIndex": 29, "endIndex": 31, "scopes": ["source.abl"] } // ' '
|
|
145
|
-
];
|
|
146
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
describe('', () => {
|
|
151
|
-
let statement = `if can-find(department "100") then. `;
|
|
152
|
-
let expectedTokens = [
|
|
153
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
154
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
155
|
-
{ "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'can-find'
|
|
156
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
157
|
-
{ "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'department'
|
|
158
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
159
|
-
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
160
|
-
{ "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "string.quoted.double.abl"] }, // '100'
|
|
161
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
162
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
163
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
164
|
-
{ "startIndex": 30, "endIndex": 34, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'then'
|
|
165
|
-
{ "startIndex": 34, "endIndex": 37, "scopes": ["source.abl"] } // '. '
|
|
166
|
-
];
|
|
167
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
168
|
-
})
|
|
169
|
-
|
|
170
|
-
describe('', () => {
|
|
171
|
-
let statement = `if can-find(department where department.dept-code eq "100" use-index codeIndex) then. `;
|
|
172
|
-
let expectedTokens = [
|
|
173
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
174
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
175
|
-
{ "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'can-find'
|
|
176
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
177
|
-
{ "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'department'
|
|
178
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
179
|
-
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] }, // 'where'
|
|
180
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
181
|
-
{ "startIndex": 29, "endIndex": 49, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'department.dept-code'
|
|
182
|
-
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
183
|
-
{ "startIndex": 50, "endIndex": 52, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
184
|
-
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl"] }, // ' '
|
|
185
|
-
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
186
|
-
{ "startIndex": 54, "endIndex": 57, "scopes": ["source.abl", "string.quoted.double.abl"] }, // '100'
|
|
187
|
-
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
188
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl"] }, // ' '
|
|
189
|
-
{ "startIndex": 59, "endIndex": 68, "scopes": ["source.abl", "keyword.other.abl"] }, // 'use-index'
|
|
190
|
-
{ "startIndex": 68, "endIndex": 69, "scopes": ["source.abl"] }, // ' '
|
|
191
|
-
{ "startIndex": 69, "endIndex": 78, "scopes": ["source.abl", "variable.other.abl"] }, // 'codeIndex'
|
|
192
|
-
{ "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
193
|
-
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl"] }, // ' '
|
|
194
|
-
{ "startIndex": 80, "endIndex": 84, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
195
|
-
{ "startIndex": 84, "endIndex": 85, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
196
|
-
{ "startIndex": 85, "endIndex": 87, "scopes": ["source.abl"] } // ' '
|
|
197
|
-
];
|
|
198
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
199
|
-
})
|
|
200
|
-
|
|
201
|
-
describe('', () => {
|
|
202
|
-
let statement = `if
|
|
203
|
-
can-find(
|
|
204
|
-
first department
|
|
205
|
-
where department.dept-code eq ttFoo.Code)
|
|
206
|
-
then.`;
|
|
207
|
-
let expectedTokens = [
|
|
208
|
-
[
|
|
209
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] } // 'if'
|
|
210
|
-
],
|
|
211
|
-
[
|
|
212
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
213
|
-
{ "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "support.function.abl"] }, // 'can-find'
|
|
214
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.brace.round.js"] } // '('
|
|
215
|
-
],
|
|
216
|
-
[
|
|
217
|
-
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
218
|
-
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
219
|
-
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
220
|
-
{ "startIndex": 14, "endIndex": 24, "scopes": ["source.abl", "storage.data.table.abl"] } // 'department'
|
|
221
|
-
],
|
|
222
|
-
[
|
|
223
|
-
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
224
|
-
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'where'
|
|
225
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
226
|
-
{ "startIndex": 17, "endIndex": 37, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'department.dept-code'
|
|
227
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
228
|
-
{ "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
229
|
-
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
|
|
230
|
-
{ "startIndex": 41, "endIndex": 51, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttFoo.Code'
|
|
231
|
-
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
|
|
232
|
-
],
|
|
233
|
-
[
|
|
234
|
-
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
235
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
236
|
-
]
|
|
237
|
-
];
|
|
238
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
239
|
-
})
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
const { assert, expect } = require('chai');
|
|
2
|
-
const shared = require('../shared.js');
|
|
3
|
-
|
|
4
|
-
describe('', () => {
|
|
5
|
-
let statement = `c1 = substitute("&1", {translate.i
|
|
6
|
-
&scope="'ScopeKey':u"
|
|
7
|
-
&key="'Translation_string_Key':u"}
|
|
8
|
-
).
|
|
9
|
-
|
|
10
|
-
dt1 = now.
|
|
11
|
-
message 1234.`;
|
|
12
|
-
let expectedTokens = [
|
|
13
|
-
[
|
|
14
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "variable.other.abl"] }, // 'c1'
|
|
15
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
16
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
17
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
18
|
-
{ "startIndex": 5, "endIndex": 15, "scopes": ["source.abl", "support.function.abl"] }, // 'substitute'
|
|
19
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
20
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
21
|
-
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '&1'
|
|
22
|
-
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
23
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
24
|
-
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
25
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
26
|
-
{ "startIndex": 23, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "entity.name.include.abl"] } // 'translate.i'
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
{ "startIndex": 0, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl"] }, // ' '
|
|
30
|
-
{ "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&scope'
|
|
31
|
-
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
|
|
32
|
-
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
33
|
-
{ "startIndex": 32, "endIndex": 44, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl"] }, // ''ScopeKey':u'
|
|
34
|
-
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
{ "startIndex": 0, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl"] }, // ' '
|
|
38
|
-
{ "startIndex": 24, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&key'
|
|
39
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
|
|
40
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
41
|
-
{ "startIndex": 30, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl"] }, // ''Translation_string_Key':u'
|
|
42
|
-
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
43
|
-
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
|
|
44
|
-
],
|
|
45
|
-
[
|
|
46
|
-
{ "startIndex": 0, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
47
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
48
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "variable.other.abl"] }, // 'dt1'
|
|
55
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
56
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
57
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
58
|
-
{ "startIndex": 6, "endIndex": 9, "scopes": ["source.abl", "support.function.abl"] }, // 'now'
|
|
59
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
60
|
-
],
|
|
61
|
-
[
|
|
62
|
-
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
63
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
64
|
-
{ "startIndex": 8, "endIndex": 12, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1234'
|
|
65
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
66
|
-
]
|
|
67
|
-
];
|
|
68
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
describe('', () => {
|
|
72
|
-
let statement = `c1 = {translate.i
|
|
73
|
-
&scope="'ScopeKey':u"
|
|
74
|
-
&key="'Translation_string_Key':u"}.
|
|
75
|
-
dt1 = now.
|
|
76
|
-
message 1234.`;
|
|
77
|
-
let expectedTokens = [
|
|
78
|
-
[
|
|
79
|
-
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "variable.other.abl"] }, // 'c1'
|
|
80
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
81
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
82
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
83
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
84
|
-
{ "startIndex": 6, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "entity.name.include.abl"] } // 'translate.i'
|
|
85
|
-
],
|
|
86
|
-
[
|
|
87
|
-
{ "startIndex": 0, "endIndex": 24, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
88
|
-
{ "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&scope'
|
|
89
|
-
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
|
|
90
|
-
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
91
|
-
{ "startIndex": 32, "endIndex": 44, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl"] }, // ''ScopeKey':u'
|
|
92
|
-
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
93
|
-
],
|
|
94
|
-
[
|
|
95
|
-
{ "startIndex": 0, "endIndex": 24, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
96
|
-
{ "startIndex": 24, "endIndex": 28, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&key'
|
|
97
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
|
|
98
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
99
|
-
{ "startIndex": 30, "endIndex": 56, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl"] }, // ''Translation_string_Key':u'
|
|
100
|
-
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.include.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
101
|
-
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '}'
|
|
102
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
103
|
-
],
|
|
104
|
-
[
|
|
105
|
-
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "variable.other.abl"] }, // 'dt1'
|
|
106
|
-
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
107
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
108
|
-
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
|
|
109
|
-
{ "startIndex": 6, "endIndex": 9, "scopes": ["source.abl", "support.function.abl"] }, // 'now'
|
|
110
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
111
|
-
],
|
|
112
|
-
[
|
|
113
|
-
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
114
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
115
|
-
{ "startIndex": 8, "endIndex": 12, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1234'
|
|
116
|
-
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
117
|
-
]
|
|
118
|
-
];
|
|
119
|
-
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
120
|
-
})
|