abl-tmlanguage 1.3.26 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +2 -1
- package/abl.tmLanguage.json +291 -112
- package/index.mjs +109 -11
- package/package.json +1 -1
- package/spec/blocks/block-options.spec.js +16 -16
- package/spec/blocks/finally-blocks.spec.js +5 -5
- package/spec/comments/comment-in-block-statement.spec.js +1 -1
- package/spec/comments/comment-in-for-each.spec.js +5 -5
- package/spec/comments/vscode-abl-issue#127.spec.js +20 -20
- package/spec/db-table-and-field/buffer-copy.spec.js +22 -22
- package/spec/db-table-and-field/create-alias.spec.js +39 -38
- package/spec/db-table-and-field/double-colon-access.spec.js +154 -0
- package/spec/db-table-and-field/field-in-function.spec.js +25 -25
- package/spec/db-table-and-field/fields-except.spec.js +1 -2
- package/spec/db-table-and-field/foreach.spec.js +6 -6
- package/spec/db-table-and-field/issue#88.spec.js +5 -4
- package/spec/db-table-and-field/new-record.spec.js +9 -9
- package/spec/db-table-and-field/query-get.spec.js +137 -0
- package/spec/define-buffer/create-buffer.spec.js +57 -0
- package/spec/define-frame/issue#173.spec.js +16 -16
- package/spec/define-property/property-getter.spec.js +8 -103
- package/spec/define-variable/simple-single-line.spec.js +1 -1
- package/spec/define-variable/var-statement.spec.js +21 -21
- package/spec/do/do-blocks.spec.js +22 -22
- package/spec/do/stop-after.spec.js +1 -1
- package/spec/function-call/can-find.spec.js +12 -12
- package/spec/function-call/include-in-argument.spec.js +120 -0
- package/spec/function-call/misc-abl-functions.spec.js +9 -9
- package/spec/function-call/nested-functions.spec.js +124 -124
- package/spec/function-call/vscode-abl-issue#19.spec.js +14 -14
- package/spec/function-definition/vscode-abl-issue#166.spec.js +1 -1
- package/spec/input-output/input-from.spec.js +116 -116
- package/spec/input-output/output-to.spec.js +105 -105
- package/spec/method-attribute-property-call/get-set-method-name.spec.js +1 -2
- package/spec/method-attribute-property-call/method-call.spec.js +1 -1
- package/spec/method-attribute-property-call/nested-property-call.spec.js +8 -25
- package/spec/method-attribute-property-call/unqualified-method-call.spec.js +27 -27
- package/spec/method-definition/constructor.spec.js +5 -5
- package/spec/misc-statements/class-in-var-name.spec.js +22 -22
- package/spec/misc-statements/copy-lob.spec.js +11 -4
- package/spec/misc-statements/do-in-name.spec.js +5 -5
- package/spec/misc-statements/guid.spec.js +10 -10
- package/spec/misc-statements/if-then.spec.js +38 -38
- package/spec/misc-statements/record-buffer-functions.spec.js +5 -5
- package/spec/misc-statements/return-statement.spec.js +15 -15
- package/spec/misc-statements/skip-statement-and-fuction.spec.js +6 -6
- package/spec/misc-statements/system-handles.spec.js +17 -3
- package/spec/numbers/scientific-notation.spec.js +7 -7
- package/spec/operators/operators.spec.js +6 -6
- package/spec/preprocesors/proparse-preprocessor.spec.js +7 -7
- package/spec/run-statement/run-statement.spec.js +30 -133
- package/spec/strings/translation-attribute.spec.js +7 -7
- package/spec/strings/vscode-abl-issue#11.spec.js +0 -53
- package/spec/strings/vscode-abl-issue#28.spec.js +16 -16
- package/spec/type-name/argument.spec.js +6 -7
- package/spec/type-name/define-property.spec.js +1 -1
- package/spec/type-name/define-temp-table.spec.js +4 -4
- package/spec/type-name/define-variable-property.spec.js +1 -1
- package/spec/type-name/define-variable.spec.js +1 -1
- package/spec/type-name/new.spec.js +8 -8
- package/spec/type-name/parameter-as.spec.js +50 -1
- package/spec/type-name/type-name.spec.js +20 -20
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `do vIndex = vBufferHandle::Minimum to vBufferHandle::Maximum:
|
|
6
|
+
message vindex.
|
|
7
|
+
end. /* do vIndex = vBufferHandle::Minimum to vBufferHandle::Maximum: */`;
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
[
|
|
10
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
11
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
12
|
+
{ "startIndex": 3, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vIndex'
|
|
13
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
14
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // '='
|
|
15
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
16
|
+
{ "startIndex": 12, "endIndex": 25, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vBufferHandle'
|
|
17
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
18
|
+
{ "startIndex": 27, "endIndex": 34, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Minimum'
|
|
19
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
20
|
+
{ "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "keyword.other.abl"] }, // 'to'
|
|
21
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
|
|
22
|
+
{ "startIndex": 38, "endIndex": 51, "scopes": ["source.abl", "variable.other.abl"] }, // 'vBufferHandle'
|
|
23
|
+
{ "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
24
|
+
{ "startIndex": 53, "endIndex": 60, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Maximum'
|
|
25
|
+
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
29
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
30
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
31
|
+
{ "startIndex": 12, "endIndex": 18, "scopes": ["source.abl", "variable.other.abl"] }, // 'vindex'
|
|
32
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
36
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
37
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
38
|
+
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
39
|
+
{ "startIndex": 7, "endIndex": 70, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' do vIndex = vBufferHandle::Minimum to vBufferHandle::Maximum: '
|
|
40
|
+
{ "startIndex": 70, "endIndex": 72, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
41
|
+
]
|
|
42
|
+
];
|
|
43
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
describe('', () => {
|
|
47
|
+
let statement = `if num-entries(vBufferHandle::ControlList) gt 1 then
|
|
48
|
+
.`;
|
|
49
|
+
let expectedTokens = [
|
|
50
|
+
[
|
|
51
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
52
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
53
|
+
{ "startIndex": 3, "endIndex": 14, "scopes": ["source.abl", "support.function.abl"] }, // 'num-entries'
|
|
54
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
55
|
+
{ "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'vBufferHandle'
|
|
56
|
+
{ "startIndex": 28, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // '::'
|
|
57
|
+
{ "startIndex": 30, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ControlList'
|
|
58
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
59
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl"] }, // ' '
|
|
60
|
+
{ "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'gt'
|
|
61
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
62
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1'
|
|
63
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
|
|
64
|
+
{ "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
69
|
+
]
|
|
70
|
+
];
|
|
71
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
describe('', () => {
|
|
75
|
+
let statement = `do vIndex = 1 to num-entries(vBufferHandle::ControlList):
|
|
76
|
+
|
|
77
|
+
end. `;
|
|
78
|
+
let expectedTokens = [
|
|
79
|
+
[
|
|
80
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
81
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
82
|
+
{ "startIndex": 3, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "variable.other.abl"] }, // 'vIndex'
|
|
83
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
84
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "keyword.operator.source.abl"] }, // '='
|
|
85
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
86
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "constant.numeric.source.abl"] }, // '1'
|
|
87
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
88
|
+
{ "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'to'
|
|
89
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
90
|
+
{ "startIndex": 17, "endIndex": 28, "scopes": ["source.abl", "meta.block.abl", "support.function.abl"] }, // 'num-entries'
|
|
91
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.block.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
92
|
+
{ "startIndex": 29, "endIndex": 42, "scopes": ["source.abl", "meta.block.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'vBufferHandle'
|
|
93
|
+
{ "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.block.abl", "meta.function.arguments.abl"] }, // '::'
|
|
94
|
+
{ "startIndex": 44, "endIndex": 55, "scopes": ["source.abl", "meta.block.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ControlList'
|
|
95
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.block.abl", "meta.brace.round.js"] }, // ')'
|
|
96
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
103
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
104
|
+
{ "startIndex": 4, "endIndex": 6, "scopes": ["source.abl"] } // ' '
|
|
105
|
+
]
|
|
106
|
+
];
|
|
107
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
describe('', () => {
|
|
111
|
+
let statement = `message hBuff::CustNum . `;
|
|
112
|
+
let expectedTokens = [
|
|
113
|
+
{ "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
114
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
115
|
+
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "variable.other.abl"] }, // 'hBuff'
|
|
116
|
+
{ "startIndex": 13, "endIndex": 15, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
117
|
+
{ "startIndex": 15, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'CustNum'
|
|
118
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
119
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
|
|
120
|
+
{ "startIndex": 24, "endIndex": 26, "scopes": ["source.abl"] } // ' '
|
|
121
|
+
];
|
|
122
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
describe('', () => {
|
|
126
|
+
let statement = `assign c = hDset::Customer
|
|
127
|
+
ttVal.field = hDSet::Customer::CustNum.`;
|
|
128
|
+
let expectedTokens = [
|
|
129
|
+
[
|
|
130
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
|
|
131
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
132
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "storage.type.abl"] }, // 'c'
|
|
133
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
134
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
135
|
+
{ "startIndex": 10, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
136
|
+
{ "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "variable.other.abl"] }, // 'hDset'
|
|
137
|
+
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
138
|
+
{ "startIndex": 19, "endIndex": 27, "scopes": ["source.abl", "storage.data.table.abl"] } // 'Customer'
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttVal.field'
|
|
142
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
143
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
144
|
+
{ "startIndex": 13, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'hDSet'
|
|
146
|
+
{ "startIndex": 20, "endIndex": 22, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
147
|
+
{ "startIndex": 22, "endIndex": 30, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'Customer'
|
|
148
|
+
{ "startIndex": 30, "endIndex": 32, "scopes": ["source.abl", "punctuation.accessor.abl"] }, // '::'
|
|
149
|
+
{ "startIndex": 32, "endIndex": 39, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'CustNum'
|
|
150
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
151
|
+
]
|
|
152
|
+
];
|
|
153
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
154
|
+
})
|
|
@@ -15,18 +15,18 @@ describe('', () => {
|
|
|
15
15
|
{ "startIndex": 2, "endIndex": 18, "scopes": ["source.abl", "variable.other.abl"] }, // 'v-credit-manager'
|
|
16
16
|
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
17
17
|
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
18
|
-
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"
|
|
19
|
-
{ "startIndex": 21, "endIndex": 26, "scopes": ["source.abl", "
|
|
20
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function
|
|
21
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function
|
|
22
|
-
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function
|
|
23
|
-
{ "startIndex": 29, "endIndex": 56, "scopes": ["source.abl", "meta.function
|
|
24
|
-
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function
|
|
25
|
-
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function
|
|
26
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function
|
|
27
|
-
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function
|
|
28
|
-
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.function
|
|
29
|
-
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.
|
|
18
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
19
|
+
{ "startIndex": 21, "endIndex": 26, "scopes": ["source.abl", "support.function.abl"] }, // 'ENTRY'
|
|
20
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
21
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
|
|
22
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
23
|
+
{ "startIndex": 29, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'oe-credit-class.DESCRIPTION'
|
|
24
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
25
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
26
|
+
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
27
|
+
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // ' '
|
|
28
|
+
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
29
|
+
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
30
30
|
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
31
31
|
]
|
|
32
32
|
];
|
|
@@ -39,19 +39,19 @@ describe('', () => {
|
|
|
39
39
|
{ "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'v-credit-manager'
|
|
40
40
|
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
41
41
|
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
42
|
-
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"
|
|
43
|
-
{ "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "
|
|
44
|
-
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function
|
|
45
|
-
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function
|
|
46
|
-
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function
|
|
47
|
-
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function
|
|
48
|
-
{ "startIndex": 28, "endIndex": 55, "scopes": ["source.abl", "meta.function
|
|
49
|
-
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function
|
|
50
|
-
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function
|
|
51
|
-
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function
|
|
52
|
-
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function
|
|
53
|
-
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function
|
|
54
|
-
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.
|
|
42
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
43
|
+
{ "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "support.function.abl"] }, // 'ENTRY'
|
|
44
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
45
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
|
|
46
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
47
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
48
|
+
{ "startIndex": 28, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'oe-credit-class.DESCRIPTION'
|
|
49
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
50
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
51
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
52
|
+
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // ' '
|
|
53
|
+
{ "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
54
|
+
{ "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
55
55
|
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
56
56
|
];
|
|
57
57
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -40,7 +40,7 @@ describe('', () => {
|
|
|
40
40
|
{ "startIndex": 120, "endIndex": 121, "scopes": ["source.abl"] }, // ' '
|
|
41
41
|
{ "startIndex": 121, "endIndex": 122, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
|
|
42
42
|
{ "startIndex": 122, "endIndex": 123, "scopes": ["source.abl"] }, // ' '
|
|
43
|
-
{ "startIndex": 123, "endIndex": 128, "scopes": ["source.abl", "
|
|
43
|
+
{ "startIndex": 123, "endIndex": 128, "scopes": ["source.abl", "support.function.abl"] }, // 'today'
|
|
44
44
|
{ "startIndex": 128, "endIndex": 129, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
45
45
|
];
|
|
46
46
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -66,4 +66,3 @@ describe('', () => {
|
|
|
66
66
|
];
|
|
67
67
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
68
68
|
})
|
|
69
|
-
|
|
@@ -52,7 +52,7 @@ describe('', () => {
|
|
|
52
52
|
{ "startIndex": 144, "endIndex": 145, "scopes": ["source.abl"] }, // ' '
|
|
53
53
|
{ "startIndex": 145, "endIndex": 146, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
|
|
54
54
|
{ "startIndex": 146, "endIndex": 147, "scopes": ["source.abl"] }, // ' '
|
|
55
|
-
{ "startIndex": 147, "endIndex": 152, "scopes": ["source.abl", "
|
|
55
|
+
{ "startIndex": 147, "endIndex": 152, "scopes": ["source.abl", "support.function.abl"] }, // 'today'
|
|
56
56
|
{ "startIndex": 152, "endIndex": 153, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
57
57
|
],
|
|
58
58
|
[
|
|
@@ -112,7 +112,7 @@ describe('', () => {
|
|
|
112
112
|
{ "startIndex": 102, "endIndex": 103, "scopes": ["source.abl"] }, // ' '
|
|
113
113
|
{ "startIndex": 103, "endIndex": 104, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
|
|
114
114
|
{ "startIndex": 104, "endIndex": 105, "scopes": ["source.abl"] }, // ' '
|
|
115
|
-
{ "startIndex": 105, "endIndex": 110, "scopes": ["source.abl", "
|
|
115
|
+
{ "startIndex": 105, "endIndex": 110, "scopes": ["source.abl", "support.function.abl"] }, // 'today'
|
|
116
116
|
{ "startIndex": 110, "endIndex": 111, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
117
117
|
],
|
|
118
118
|
[
|
|
@@ -314,7 +314,7 @@ describe('', () => {
|
|
|
314
314
|
{ "startIndex": 135, "endIndex": 136, "scopes": ["source.abl"] }, // ' '
|
|
315
315
|
{ "startIndex": 136, "endIndex": 137, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
|
|
316
316
|
{ "startIndex": 137, "endIndex": 138, "scopes": ["source.abl"] }, // ' '
|
|
317
|
-
{ "startIndex": 138, "endIndex": 143, "scopes": ["source.abl", "
|
|
317
|
+
{ "startIndex": 138, "endIndex": 143, "scopes": ["source.abl", "support.function.abl"] }, // 'today'
|
|
318
318
|
{ "startIndex": 143, "endIndex": 144, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
319
319
|
];
|
|
320
320
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -418,7 +418,7 @@ first order of customer no-lock where order.orderdate < today:`;
|
|
|
418
418
|
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl"] }, // ' '
|
|
419
419
|
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<'
|
|
420
420
|
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl"] }, // ' '
|
|
421
|
-
{ "startIndex": 56, "endIndex": 61, "scopes": ["source.abl", "
|
|
421
|
+
{ "startIndex": 56, "endIndex": 61, "scopes": ["source.abl", "support.function.abl"] }, // 'today'
|
|
422
422
|
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
423
423
|
]
|
|
424
424
|
];
|
|
@@ -524,7 +524,7 @@ describe('', () => {
|
|
|
524
524
|
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
525
525
|
{ "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttTaskMethods'
|
|
526
526
|
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
|
|
527
|
-
{ "startIndex": 23, "endIndex": 34, "scopes": ["source.abl", "
|
|
527
|
+
{ "startIndex": 23, "endIndex": 34, "scopes": ["source.abl", "variable.language.abl"] }, // 'transACTION'
|
|
528
528
|
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
529
529
|
];
|
|
530
530
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -558,7 +558,7 @@ describe('', () => {
|
|
|
558
558
|
],
|
|
559
559
|
[
|
|
560
560
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
561
|
-
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "
|
|
561
|
+
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "variable.language.abl"] }, // 'TRANSACTION'
|
|
562
562
|
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
563
563
|
]
|
|
564
564
|
];
|
|
@@ -42,10 +42,11 @@ describe('', () => {
|
|
|
42
42
|
[
|
|
43
43
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
44
44
|
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
45
|
-
{ "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "
|
|
46
|
-
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
47
|
-
{ "startIndex": 12, "endIndex": 25, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl.accountno'
|
|
48
|
-
{ "startIndex": 25, "endIndex":
|
|
45
|
+
{ "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'first-of'
|
|
46
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
47
|
+
{ "startIndex": 12, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'tbl.accountno'
|
|
48
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
49
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
|
|
49
50
|
{ "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
50
51
|
{ "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
|
|
51
52
|
{ "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
@@ -140,15 +140,15 @@ describe('', () => {
|
|
|
140
140
|
let statement = `if new ({&file}) or {&file}.name <> old-{&file}.name then.`;
|
|
141
141
|
let expectedTokens = [
|
|
142
142
|
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
143
|
-
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"
|
|
144
|
-
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "
|
|
145
|
-
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"
|
|
146
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function
|
|
147
|
-
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function
|
|
148
|
-
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function
|
|
149
|
-
{ "startIndex": 10, "endIndex": 14, "scopes": ["source.abl", "meta.function
|
|
150
|
-
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function
|
|
151
|
-
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.
|
|
143
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
144
|
+
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
|
|
145
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
146
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
147
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
148
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
149
|
+
{ "startIndex": 10, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
|
|
150
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
151
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
152
152
|
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
153
153
|
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
|
|
154
154
|
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `get first qttFoo
|
|
6
|
+
no-lock.`;
|
|
7
|
+
let expectedTokens = [
|
|
8
|
+
[
|
|
9
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
10
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
12
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] } // 'qttFoo'
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
|
|
18
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
19
|
+
]
|
|
20
|
+
];
|
|
21
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
describe('', () => {
|
|
25
|
+
let statement = `get first qttFoo.
|
|
26
|
+
|
|
27
|
+
if available(ttFoo) then
|
|
28
|
+
do:
|
|
29
|
+
end.`;
|
|
30
|
+
let expectedTokens = [
|
|
31
|
+
[
|
|
32
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
33
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
34
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
35
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
36
|
+
{ "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
|
|
37
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
44
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
45
|
+
{ "startIndex": 3, "endIndex": 12, "scopes": ["source.abl", "support.function.abl"] }, // 'available'
|
|
46
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
47
|
+
{ "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'ttFoo'
|
|
48
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
49
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
|
|
50
|
+
{ "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
|
|
54
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
58
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
59
|
+
]
|
|
60
|
+
];
|
|
61
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
describe('', () => {
|
|
65
|
+
let statement = `get first qttFoo /* all foos by bar squared */
|
|
66
|
+
no-lock.`;
|
|
67
|
+
let expectedTokens = [
|
|
68
|
+
[
|
|
69
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
70
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
71
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
72
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
73
|
+
{ "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
|
|
74
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
75
|
+
{ "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
|
|
76
|
+
{ "startIndex": 19, "endIndex": 44, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' all foos by bar squared '
|
|
77
|
+
{ "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
81
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
|
|
82
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
83
|
+
]
|
|
84
|
+
];
|
|
85
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
describe('', () => {
|
|
89
|
+
let statement = `get first qttFoo // excludes single bars
|
|
90
|
+
exclusive-lock.`;
|
|
91
|
+
let expectedTokens = [
|
|
92
|
+
[
|
|
93
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
94
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
95
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
96
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
97
|
+
{ "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
|
|
98
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
99
|
+
{ "startIndex": 17, "endIndex": 40, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// excludes single bars'
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
103
|
+
{ "startIndex": 2, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'exclusive-lock'
|
|
104
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
105
|
+
]
|
|
106
|
+
];
|
|
107
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
describe('', () => {
|
|
111
|
+
let statement = `get first {&BROWSE-NAME}.`;
|
|
112
|
+
let expectedTokens = [
|
|
113
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
114
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
115
|
+
{ "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
|
|
116
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
117
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
118
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
119
|
+
{ "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'BROWSE-NAME'
|
|
120
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
121
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
122
|
+
];
|
|
123
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
describe('', () => {
|
|
127
|
+
let statement = `get last qttFoo.`;
|
|
128
|
+
let expectedTokens = [
|
|
129
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
|
|
130
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
131
|
+
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'last'
|
|
132
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
|
|
134
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
135
|
+
];
|
|
136
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
137
|
+
})
|
|
@@ -153,3 +153,60 @@ describe('', () => {
|
|
|
153
153
|
];
|
|
154
154
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
155
155
|
})
|
|
156
|
+
|
|
157
|
+
describe('', () => {
|
|
158
|
+
let statement = `create buffer ttTableHandle.BufferHandle for table vTableName.`;
|
|
159
|
+
let expectedTokens = [
|
|
160
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'create'
|
|
161
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
162
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'buffer'
|
|
163
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
164
|
+
{ "startIndex": 14, "endIndex": 40, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttTableHandle.BufferHandle'
|
|
165
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
|
|
166
|
+
{ "startIndex": 41, "endIndex": 44, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
167
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
|
|
168
|
+
{ "startIndex": 45, "endIndex": 50, "scopes": ["source.abl", "keyword.other.abl"] }, // 'table'
|
|
169
|
+
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl"] }, // ' '
|
|
170
|
+
{ "startIndex": 51, "endIndex": 61, "scopes": ["source.abl", "variable.other.abl"] }, // 'vTableName'
|
|
171
|
+
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
172
|
+
];
|
|
173
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
describe('', () => {
|
|
177
|
+
let statement = `create buffer ttBufferHandle.BufferHandle for table vTableName.`;
|
|
178
|
+
let expectedTokens = [
|
|
179
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'create'
|
|
180
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
181
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'buffer'
|
|
182
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
183
|
+
{ "startIndex": 14, "endIndex": 41, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttBufferHandle.BufferHandle'
|
|
184
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl"] }, // ' '
|
|
185
|
+
{ "startIndex": 42, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
186
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
187
|
+
{ "startIndex": 46, "endIndex": 51, "scopes": ["source.abl", "keyword.other.abl"] }, // 'table'
|
|
188
|
+
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
|
|
189
|
+
{ "startIndex": 52, "endIndex": 62, "scopes": ["source.abl", "variable.other.abl"] }, // 'vTableName'
|
|
190
|
+
{ "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
191
|
+
];
|
|
192
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
describe('', () => {
|
|
196
|
+
let statement = `create buffer ttBufferHandle.BufferHandle for table ttBufferHandle.TableName.`;
|
|
197
|
+
let expectedTokens = [
|
|
198
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'create'
|
|
199
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
200
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'buffer'
|
|
201
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
202
|
+
{ "startIndex": 14, "endIndex": 41, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttBufferHandle.BufferHandle'
|
|
203
|
+
{ "startIndex": 41, "endIndex": 42, "scopes": ["source.abl"] }, // ' '
|
|
204
|
+
{ "startIndex": 42, "endIndex": 45, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
205
|
+
{ "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
|
|
206
|
+
{ "startIndex": 46, "endIndex": 51, "scopes": ["source.abl", "keyword.other.abl"] }, // 'table'
|
|
207
|
+
{ "startIndex": 51, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
|
|
208
|
+
{ "startIndex": 52, "endIndex": 76, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttBufferHandle.TableName'
|
|
209
|
+
{ "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
210
|
+
];
|
|
211
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
212
|
+
})
|