abl-tmlanguage 1.3.16 → 1.3.18
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/.github/workflows/ci.yml +36 -0
- package/CHANGELOG.md +10 -0
- package/README.md +17 -12
- package/abl.tmLanguage.json +246 -74
- package/package.json +1 -1
- package/spec/annotations/annotation.spec.js +49 -50
- package/spec/blocks/block-labels.spec.js +3 -3
- package/spec/blocks/block-options.spec.js +9 -7
- package/spec/comments/comment-in-block-statement.spec.js +20 -14
- package/spec/comments/comment-in-for-each.spec.js +9 -6
- package/spec/comments/comment-in-function-args.spec.js +4 -5
- package/spec/comments/vscode-abl-issue#127.spec.js +4 -4
- package/spec/create-widgets/create-window.spec.js +11 -8
- package/spec/db-table-and-field/buffer-copy.spec.js +45 -39
- package/spec/db-table-and-field/create-alias.spec.js +3 -3
- package/spec/db-table-and-field/field-in-function.spec.js +6 -6
- package/spec/db-table-and-field/foreach.spec.js +3 -3
- package/spec/db-table-and-field/issue#88.spec.js +2 -2
- package/spec/db-table-and-field/new-record.spec.js +46 -25
- package/spec/define/define-browse.spec.js +54 -54
- package/spec/define/define-button.spec.js +3 -3
- package/spec/define-buffer/create-buffer.spec.js +3 -3
- package/spec/define-buffer/simple-single-line.spec.js +9 -9
- package/spec/define-frame/issue#173.spec.js +56 -50
- package/spec/define-parameter/simple-single-line.spec.js +3 -3
- package/spec/define-property/property-getter.spec.js +4 -4
- package/spec/define-temp-table/define-dataset.spec.js +23 -17
- package/spec/define-temp-table/define-temp-table.spec.js +68 -53
- package/spec/define-variable/extent.spec.js +6 -6
- package/spec/define-variable/initial.spec.js +15 -15
- package/spec/define-variable/issue#6.spec.js +39 -39
- package/spec/define-variable/issue#9.spec.js +3 -3
- package/spec/define-variable/var-statement.spec.js +7 -4
- package/spec/do/do-blocks.spec.js +24 -18
- package/spec/for-each/issue#321.spec.js +2 -2
- package/spec/function-call/can-find.spec.js +10 -11
- package/spec/function-call/misc-abl-functions.spec.js +3 -3
- package/spec/function-call/nested-functions.spec.js +21 -22
- package/spec/function-call/udf-calls.spec.js +22 -23
- package/spec/function-call/vscode-abl-issue#19.spec.js +12 -12
- package/spec/global-scoped-define/global-define.spec.js +54 -7
- package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +49 -15
- package/spec/global-scoped-define/undefine.spec.js +44 -0
- package/spec/include/abl-tmlanguage-issues#5.spec.js +3 -3
- package/spec/include/include-file-name.spec.js +16 -4
- package/spec/include/unnamed-arguments.spec.js +4 -5
- package/spec/include/vscode-abl-issue#45.spec.js +3 -3
- package/spec/include/vscode-abl-issue#77.spec.js +16 -17
- package/spec/include/vscode-abl-issue#80.spec.js +10 -7
- package/spec/input-output/input-from.spec.js +19 -16
- package/spec/input-output/output-to.spec.js +15 -15
- package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +16 -17
- package/spec/method-attribute-property-call/connected-method.spec.js +3 -4
- package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +12 -12
- package/spec/method-attribute-property-call/method-call.spec.js +16 -16
- package/spec/method-attribute-property-call/unqualified-method-call.spec.js +3 -4
- package/spec/method-definition/constructor.spec.js +6 -6
- package/spec/method-definition/method.spec.js +12 -12
- package/spec/misc-statements/case-statement.spec.js +9 -9
- package/spec/misc-statements/class-in-var-name.spec.js +8 -9
- package/spec/misc-statements/copy-lob.spec.js +3 -3
- package/spec/misc-statements/do-in-name.spec.js +21 -22
- package/spec/misc-statements/event-subscribe.spec.js +14 -15
- package/spec/misc-statements/export-delimiter.spec.js +6 -6
- package/spec/misc-statements/if-then.spec.js +9 -9
- package/spec/misc-statements/issue#173.spec.js +3 -4
- package/spec/misc-statements/message-statement.spec.js +3 -3
- package/spec/misc-statements/record-buffer-functions.spec.js +3 -3
- package/spec/misc-statements/release.spec.js +3 -4
- package/spec/misc-statements/skip-statement-and-fuction.spec.js +3 -4
- package/spec/numbers/scientific-notation.spec.js +212 -0
- package/spec/operators/operators.spec.js +10 -10
- package/spec/preprocesors/issue166.spec.js +27 -19
- package/spec/preprocesors/preprocessor-functions.spec.js +77 -0
- package/spec/preprocesors/proparse-preprocessor.spec.js +27 -3
- package/spec/procedure-definition/trigger-procedure.spec.js +8 -2
- package/spec/procedure-definition/vscode-abl-issue#22.spec.js +3 -3
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +4 -4
- package/spec/procedure-definition/vscode-abl-issue#325.spec.js +26 -2
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +7 -4
- package/spec/run-statement/run-statement.spec.js +25 -13
- package/spec/strings/translation-attribute.spec.js +4 -4
- package/spec/strings/vscode-abl-issue#11.spec.js +24 -24
- package/spec/strings/vscode-abl-issue#28.spec.js +9 -9
- package/spec/type-name/argument.spec.js +11 -12
- package/spec/type-name/cast.spec.js +7 -7
- package/spec/type-name/define-temp-table.spec.js +6 -6
- package/spec/type-name/new.spec.js +3 -3
- package/spec/type-name/parameter-as.spec.js +6 -6
- package/spec/type-name/type-name.spec.js +21 -19
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `define variable Avogadro as decimal init 6.02214076e+23.`;
|
|
6
|
+
let expectedTokens = [
|
|
7
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
8
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
9
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
10
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'Avogadro'
|
|
12
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
14
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
16
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 36, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'init'
|
|
18
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
19
|
+
{ "startIndex": 41, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '6.02214076e+23'
|
|
20
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
21
|
+
];
|
|
22
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
describe('', () => {
|
|
26
|
+
let statement = `var decimal Avogadro = 6.02214076e+23.`;
|
|
27
|
+
let expectedTokens = [
|
|
28
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
|
|
29
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
30
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
31
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
32
|
+
{ "startIndex": 12, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'Avogadro'
|
|
33
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
34
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
35
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
36
|
+
{ "startIndex": 23, "endIndex": 37, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '6.02214076e+23'
|
|
37
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
38
|
+
];
|
|
39
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
describe('', () => {
|
|
43
|
+
let statement = `var integer someintval = 1.456e-3 + 4.246e+4.`;
|
|
44
|
+
let expectedTokens = [
|
|
45
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
|
|
46
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
47
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'integer'
|
|
48
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
49
|
+
{ "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'someintval'
|
|
50
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
51
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
52
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
53
|
+
{ "startIndex": 25, "endIndex": 33, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1.456e-3'
|
|
54
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
55
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+'
|
|
56
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
57
|
+
{ "startIndex": 36, "endIndex": 44, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '4.246e+4'
|
|
58
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
59
|
+
];
|
|
60
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
describe('', () => {
|
|
64
|
+
let statement = `var decimal[] planetsDiameterkm = [12.742e+3, 4.8794e+3, 6779.0, 12.104e+3, 23766e-1].`;
|
|
65
|
+
let expectedTokens = [
|
|
66
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
|
|
67
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
69
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
70
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
71
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
72
|
+
{ "startIndex": 14, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'planetsDiameterkm'
|
|
73
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
|
|
74
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
75
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
76
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
|
|
77
|
+
{ "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '12.742e+3'
|
|
78
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
79
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
|
|
80
|
+
{ "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '4.8794e+3'
|
|
81
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
82
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
|
|
83
|
+
{ "startIndex": 57, "endIndex": 63, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '6779.0'
|
|
84
|
+
{ "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
85
|
+
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
|
|
86
|
+
{ "startIndex": 65, "endIndex": 74, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '12.104e+3'
|
|
87
|
+
{ "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
88
|
+
{ "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
|
|
89
|
+
{ "startIndex": 76, "endIndex": 84, "scopes": ["source.abl", "meta.array.literal.abl", "constant.numeric.source.abl"] }, // '23766e-1'
|
|
90
|
+
{ "startIndex": 84, "endIndex": 85, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
|
|
91
|
+
{ "startIndex": 85, "endIndex": 86, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
92
|
+
];
|
|
93
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
describe('', () => {
|
|
97
|
+
let statement = `define variable Avogadro as decimal init 0.
|
|
98
|
+
Avogadro = decimal("6.02214076e+23").`;
|
|
99
|
+
let expectedTokens = [
|
|
100
|
+
[
|
|
101
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
102
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
103
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
104
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
105
|
+
{ "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'Avogadro'
|
|
106
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
107
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
108
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
109
|
+
{ "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
110
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
111
|
+
{ "startIndex": 36, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'init'
|
|
112
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
113
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '0'
|
|
114
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'Avogadro'
|
|
118
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
119
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
120
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
|
|
121
|
+
{ "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'decimal'
|
|
122
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
123
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
124
|
+
{ "startIndex": 20, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '6.02214076e+23'
|
|
125
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
126
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
|
|
127
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
128
|
+
]
|
|
129
|
+
];
|
|
130
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
describe('', () => {
|
|
134
|
+
let statement = `define variable Avogadro as decimal init 6.02214076e+23 format "9.9999<<e+99".`;
|
|
135
|
+
let expectedTokens = [
|
|
136
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
137
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
138
|
+
{ "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
139
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
140
|
+
{ "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'Avogadro'
|
|
141
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
142
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
143
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
144
|
+
{ "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'decimal'
|
|
145
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
146
|
+
{ "startIndex": 36, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'init'
|
|
147
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
148
|
+
{ "startIndex": 41, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "constant.numeric.source.abl"] }, // '6.02214076e+23'
|
|
149
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
150
|
+
{ "startIndex": 56, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'format'
|
|
151
|
+
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
152
|
+
{ "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
153
|
+
{ "startIndex": 64, "endIndex": 76, "scopes": ["source.abl", "meta.define.abl", "string.quoted.double.abl"] }, // '9.9999<<e+99'
|
|
154
|
+
{ "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.define.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
155
|
+
{ "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
156
|
+
];
|
|
157
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
describe('', () => {
|
|
161
|
+
let statement = ` fix-codepage(jsondata) = "utf-8".
|
|
162
|
+
jsondata = '~{ "somevalue": 123e+5 ~}'.`;
|
|
163
|
+
let expectedTokens = [
|
|
164
|
+
[
|
|
165
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
166
|
+
{ "startIndex": 4, "endIndex": 16, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'fix-codepage'
|
|
167
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
168
|
+
{ "startIndex": 17, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'jsondata'
|
|
169
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
170
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
|
|
171
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
172
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
173
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
174
|
+
{ "startIndex": 30, "endIndex": 35, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'utf-8'
|
|
175
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
176
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'jsondata'
|
|
180
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
181
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
182
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
|
|
183
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
184
|
+
{ "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "string.quoted.single.abl", "constant.character.escape.abl"] }, // '~{'
|
|
185
|
+
{ "startIndex": 14, "endIndex": 35, "scopes": ["source.abl", "string.quoted.single.abl"] }, // ' "somevalue": 123e+5 '
|
|
186
|
+
{ "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl", "constant.character.escape.abl"] }, // '~}'
|
|
187
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
188
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
189
|
+
]
|
|
190
|
+
];
|
|
191
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
describe('', () => {
|
|
195
|
+
let statement = `jsondata:Add("somevalue", 123e+5 ).`;
|
|
196
|
+
let expectedTokens = [
|
|
197
|
+
{ "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'jsondata'
|
|
198
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
199
|
+
{ "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Add'
|
|
200
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
201
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
202
|
+
{ "startIndex": 14, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'somevalue'
|
|
203
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
204
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
205
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
206
|
+
{ "startIndex": 26, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '123e+5'
|
|
207
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
208
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
209
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
210
|
+
];
|
|
211
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
212
|
+
})
|
|
@@ -68,10 +68,10 @@ describe('', () => {
|
|
|
68
68
|
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
69
69
|
{ "startIndex": 7, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+='
|
|
70
70
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
71
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.double.
|
|
72
|
-
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "string.double.
|
|
73
|
-
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "string.double.
|
|
74
|
-
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "string.double.
|
|
71
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
72
|
+
{ "startIndex": 11, "endIndex": 16, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'thing'
|
|
73
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
74
|
+
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
|
|
75
75
|
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
76
76
|
];
|
|
77
77
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -117,9 +117,9 @@ else if Not v_string matches "bar" then .`;
|
|
|
117
117
|
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
118
118
|
{ "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'matches'
|
|
119
119
|
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
120
|
-
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "string.double.
|
|
121
|
-
{ "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "string.double.
|
|
122
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.double.
|
|
120
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
121
|
+
{ "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'foo'
|
|
122
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
123
123
|
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
124
124
|
{ "startIndex": 31, "endIndex": 35, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
125
125
|
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
@@ -136,9 +136,9 @@ else if Not v_string matches "bar" then .`;
|
|
|
136
136
|
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
137
137
|
{ "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'matches'
|
|
138
138
|
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
139
|
-
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.double.
|
|
140
|
-
{ "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "string.double.
|
|
141
|
-
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.double.
|
|
139
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
140
|
+
{ "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'bar'
|
|
141
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
142
142
|
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
143
143
|
{ "startIndex": 35, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
144
144
|
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
|
|
@@ -4,13 +4,14 @@ const shared = require('../shared.js');
|
|
|
4
4
|
describe('', () => {
|
|
5
5
|
let statement = `&global-define MY-TABLE-NEW "table"`;
|
|
6
6
|
let expectedTokens = [
|
|
7
|
-
{ "startIndex": 0, "endIndex":
|
|
8
|
-
{ "startIndex":
|
|
9
|
-
{ "startIndex":
|
|
10
|
-
{ "startIndex":
|
|
11
|
-
{ "startIndex":
|
|
12
|
-
{ "startIndex":
|
|
13
|
-
{ "startIndex":
|
|
7
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
8
|
+
{ "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.abl", "keyword.control.directive.define.abl"] }, // 'global-define'
|
|
9
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
|
|
10
|
+
{ "startIndex": 15, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'MY-TABLE-NEW'
|
|
11
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
|
|
12
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
13
|
+
{ "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'table'
|
|
14
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
14
15
|
];
|
|
15
16
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
16
17
|
})
|
|
@@ -18,13 +19,14 @@ describe('', () => {
|
|
|
18
19
|
describe('', () => {
|
|
19
20
|
let statement = `&global-define TEST-NEW-2 "b"`;
|
|
20
21
|
let expectedTokens = [
|
|
21
|
-
{ "startIndex": 0, "endIndex":
|
|
22
|
-
{ "startIndex":
|
|
23
|
-
{ "startIndex":
|
|
24
|
-
{ "startIndex":
|
|
25
|
-
{ "startIndex":
|
|
26
|
-
{ "startIndex":
|
|
27
|
-
{ "startIndex":
|
|
22
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
23
|
+
{ "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.abl", "keyword.control.directive.define.abl"] }, // 'global-define'
|
|
24
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
|
|
25
|
+
{ "startIndex": 15, "endIndex": 25, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'TEST-NEW-2'
|
|
26
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
|
|
27
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
28
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'b'
|
|
29
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
|
|
28
30
|
];
|
|
29
31
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
30
32
|
})
|
|
@@ -44,7 +46,10 @@ describe('', () => {
|
|
|
44
46
|
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
45
47
|
{ "startIndex": 31, "endIndex": 38, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'initial'
|
|
46
48
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
47
|
-
{ "startIndex": 39, "endIndex":
|
|
49
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
50
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
51
|
+
{ "startIndex": 41, "endIndex": 53, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'MY-TABLE-NEW'
|
|
52
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
48
53
|
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
49
54
|
{ "startIndex": 55, "endIndex": 62, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
|
|
50
55
|
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
@@ -60,13 +65,16 @@ end.`;
|
|
|
60
65
|
[
|
|
61
66
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
62
67
|
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
63
|
-
{ "startIndex": 3, "endIndex":
|
|
68
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
69
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
70
|
+
{ "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'MY-TABLE-NEW'
|
|
71
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
64
72
|
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
65
73
|
{ "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'eq'
|
|
66
74
|
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
|
|
67
|
-
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.double.
|
|
68
|
-
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "string.double.
|
|
69
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "string.double.
|
|
75
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
76
|
+
{ "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'table'
|
|
77
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
70
78
|
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
71
79
|
{ "startIndex": 30, "endIndex": 34, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
|
|
72
80
|
],
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `&if defined(OpenEdge_12_8) gt 0 &then
|
|
6
|
+
TokenResolver:Resolve("integrate-$~{t.YMD}-$~{t.HMS}.csv"))
|
|
7
|
+
&else
|
|
8
|
+
TokenResolver:Resolve("integrate-$~{T.YYYY}$~{T.MM}$~{T.DD}-$~{T.HH}$~{T.MMM}$~{T.SS}.csv"))
|
|
9
|
+
&endif`;
|
|
10
|
+
let expectedTokens = [
|
|
11
|
+
[
|
|
12
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
13
|
+
{ "startIndex": 1, "endIndex": 3, "scopes": ["source.abl", "keyword.control.directive.conditional.abl"] }, // 'if'
|
|
14
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
15
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "storage.type.function.abl"] }, // 'defined'
|
|
16
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
17
|
+
{ "startIndex": 12, "endIndex": 25, "scopes": ["source.abl", "entity.name.function.preprocessor.abl"] }, // 'OpenEdge_12_8'
|
|
18
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
19
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
|
|
20
|
+
{ "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'gt'
|
|
21
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
22
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '0'
|
|
23
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
|
|
24
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
25
|
+
{ "startIndex": 33, "endIndex": 37, "scopes": ["source.abl", "keyword.control.directive.conditional.abl"] } // 'then'
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
{ "startIndex": 0, "endIndex": 68, "scopes": ["source.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 68, "endIndex": 81, "scopes": ["source.abl", "variable.other.abl"] }, // 'TokenResolver'
|
|
30
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
31
|
+
{ "startIndex": 82, "endIndex": 89, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Resolve'
|
|
32
|
+
{ "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
33
|
+
{ "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
34
|
+
{ "startIndex": 91, "endIndex": 102, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'integrate-$'
|
|
35
|
+
{ "startIndex": 102, "endIndex": 104, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
36
|
+
{ "startIndex": 104, "endIndex": 112, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 't.YMD}-$'
|
|
37
|
+
{ "startIndex": 112, "endIndex": 114, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
38
|
+
{ "startIndex": 114, "endIndex": 124, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 't.HMS}.csv'
|
|
39
|
+
{ "startIndex": 124, "endIndex": 125, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
40
|
+
{ "startIndex": 125, "endIndex": 126, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
41
|
+
{ "startIndex": 126, "endIndex": 127, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
45
|
+
{ "startIndex": 1, "endIndex": 5, "scopes": ["source.abl", "keyword.control.directive.conditional.abl"] } // 'else'
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
{ "startIndex": 0, "endIndex": 68, "scopes": ["source.abl"] }, // ' '
|
|
49
|
+
{ "startIndex": 68, "endIndex": 81, "scopes": ["source.abl", "variable.other.abl"] }, // 'TokenResolver'
|
|
50
|
+
{ "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
51
|
+
{ "startIndex": 82, "endIndex": 89, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Resolve'
|
|
52
|
+
{ "startIndex": 89, "endIndex": 90, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
53
|
+
{ "startIndex": 90, "endIndex": 91, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
54
|
+
{ "startIndex": 91, "endIndex": 102, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'integrate-$'
|
|
55
|
+
{ "startIndex": 102, "endIndex": 104, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
56
|
+
{ "startIndex": 104, "endIndex": 112, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.YYYY}$'
|
|
57
|
+
{ "startIndex": 112, "endIndex": 114, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
58
|
+
{ "startIndex": 114, "endIndex": 120, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.MM}$'
|
|
59
|
+
{ "startIndex": 120, "endIndex": 122, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
60
|
+
{ "startIndex": 122, "endIndex": 129, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.DD}-$'
|
|
61
|
+
{ "startIndex": 129, "endIndex": 131, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
62
|
+
{ "startIndex": 131, "endIndex": 137, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.HH}$'
|
|
63
|
+
{ "startIndex": 137, "endIndex": 139, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
64
|
+
{ "startIndex": 139, "endIndex": 146, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.MMM}$'
|
|
65
|
+
{ "startIndex": 146, "endIndex": 148, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "constant.character.escape.abl"] }, // '~{'
|
|
66
|
+
{ "startIndex": 148, "endIndex": 157, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'T.SS}.csv'
|
|
67
|
+
{ "startIndex": 157, "endIndex": 158, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
68
|
+
{ "startIndex": 158, "endIndex": 159, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
69
|
+
{ "startIndex": 159, "endIndex": 160, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
73
|
+
{ "startIndex": 1, "endIndex": 6, "scopes": ["source.abl", "keyword.control.directive.conditional.abl"] } // 'endif'
|
|
74
|
+
]
|
|
75
|
+
];
|
|
76
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
77
|
+
})
|
|
@@ -6,7 +6,10 @@ describe('', () => {
|
|
|
6
6
|
assign attrValue = BuildAttributeValue(string(attribNames[attribLoop]), annoData).`;
|
|
7
7
|
let expectedTokens = [
|
|
8
8
|
[
|
|
9
|
-
{ "startIndex": 0, "endIndex":
|
|
9
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
10
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
11
|
+
{ "startIndex": 2, "endIndex": 37, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // '_proparse_ prolint-nowarn(overflow)'
|
|
12
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] } // '}'
|
|
10
13
|
],
|
|
11
14
|
[
|
|
12
15
|
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
|
|
@@ -51,7 +54,10 @@ describe('', () => {
|
|
|
51
54
|
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
52
55
|
{ "startIndex": 37, "endIndex": 41, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'init'
|
|
53
56
|
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
54
|
-
{ "startIndex": 42, "endIndex":
|
|
57
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
58
|
+
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
59
|
+
{ "startIndex": 44, "endIndex": 54, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'DEBUG-WAIT'
|
|
60
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.define.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
55
61
|
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
56
62
|
];
|
|
57
63
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -60,7 +66,25 @@ describe('', () => {
|
|
|
60
66
|
describe('', () => {
|
|
61
67
|
let statement = `{&WINDOW-SYSTEM}`;
|
|
62
68
|
let expectedTokens = [
|
|
63
|
-
{ "startIndex": 0, "endIndex":
|
|
69
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
70
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
71
|
+
{ "startIndex": 2, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'WINDOW-SYSTEM'
|
|
72
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] } // '}'
|
|
73
|
+
];
|
|
74
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
describe('Spaces before closing curly brace', () => {
|
|
78
|
+
let statement = `message {&WINDOW-SYSTEM }.`;
|
|
79
|
+
let expectedTokens = [
|
|
80
|
+
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
81
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
82
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
83
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
84
|
+
{ "startIndex": 10, "endIndex": 23, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'WINDOW-SYSTEM'
|
|
85
|
+
{ "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
|
|
86
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
87
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
64
88
|
];
|
|
65
89
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
66
90
|
})
|
|
@@ -16,14 +16,20 @@ describe('', () => {
|
|
|
16
16
|
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
|
|
17
17
|
{ "startIndex": 28, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'of'
|
|
18
18
|
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
19
|
-
{ "startIndex": 31, "endIndex":
|
|
19
|
+
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
20
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
21
|
+
{ "startIndex": 33, "endIndex": 37, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
|
|
22
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
20
23
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
|
|
21
24
|
{ "startIndex": 39, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] }, // 'old'
|
|
22
25
|
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl"] }, // ' '
|
|
23
26
|
{ "startIndex": 43, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'buffer'
|
|
24
27
|
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
|
|
25
28
|
{ "startIndex": 50, "endIndex": 54, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'old-'
|
|
26
|
-
{ "startIndex": 54, "endIndex":
|
|
29
|
+
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
30
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
31
|
+
{ "startIndex": 56, "endIndex": 60, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
|
|
32
|
+
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
27
33
|
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
28
34
|
];
|
|
29
35
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -15,9 +15,9 @@ END PROCEDURE.`;
|
|
|
15
15
|
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
16
16
|
{ "startIndex": 30, "endIndex": 38, "scopes": ["source.abl", "meta.procedure.abl", "keyword.other.abl"] }, // 'EXTERNAL'
|
|
17
17
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
18
|
-
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
19
|
-
{ "startIndex": 40, "endIndex": 52, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
20
|
-
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
18
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
19
|
+
{ "startIndex": 40, "endIndex": 52, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl"] }, // 'KERNEL32.DLL'
|
|
20
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
21
21
|
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
22
22
|
],
|
|
23
23
|
[
|
|
@@ -11,10 +11,10 @@ end procedure.`;
|
|
|
11
11
|
[
|
|
12
12
|
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'procedure'
|
|
13
13
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
14
|
-
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.single.
|
|
15
|
-
{ "startIndex": 11, "endIndex": 38, "scopes": ["source.abl", "string.single.
|
|
16
|
-
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "string.single.
|
|
17
|
-
{ "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "string.single.
|
|
14
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
15
|
+
{ "startIndex": 11, "endIndex": 38, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'TpFrame.TaskPanel.ItemClick'
|
|
16
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
17
|
+
{ "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "string.quoted.single.abl", "support.other.abl"] }, // ':U'
|
|
18
18
|
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
19
19
|
],
|
|
20
20
|
[
|