abl-tmlanguage 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/abl.tmLanguage.json
CHANGED
|
@@ -2243,7 +2243,7 @@
|
|
|
2243
2243
|
}
|
|
2244
2244
|
},
|
|
2245
2245
|
"block-label": {
|
|
2246
|
-
"match": "(?i)^\\s*((?!transaction|no-lock|exclusive-lock|exclusive-loc|exclusive-lo|exclusive-l|share-lock|share-loc|share-lo|share-|share)([a-z][a-z0-9\\-\\$\\#]*)
|
|
2246
|
+
"match": "(?i)^\\s*((?!transaction|no-lock|exclusive-lock|exclusive-loc|exclusive-lo|exclusive-l|share-lock|share-loc|share-lo|share-|share)([a-z][a-z0-9\\-\\$\\#]*)(:))\\s",
|
|
2247
2247
|
"comment": "A colon followed by a space is only legal is for block labels. Block labels must also be at the beginning of a line",
|
|
2248
2248
|
"captures": {
|
|
2249
2249
|
"2": {
|
package/package.json
CHANGED
|
@@ -110,3 +110,66 @@ end method.`;
|
|
|
110
110
|
];
|
|
111
111
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
112
112
|
})
|
|
113
|
+
|
|
114
|
+
describe('', () => {
|
|
115
|
+
let statement = `for each table transaction:
|
|
116
|
+
oAccessRequestBusinessEntity:SaveChanges(DATASET dsAccessRequest).
|
|
117
|
+
oARBE:SaveChanges(DATASET dsAccessRequest).
|
|
118
|
+
DatasetHelper:ThrowDatasetErrors(DATASET dsAccessRequest:HANDLE).
|
|
119
|
+
end.`;
|
|
120
|
+
let expectedTokens = [
|
|
121
|
+
[
|
|
122
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
|
|
123
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
124
|
+
{ "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
|
|
125
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
|
|
126
|
+
{ "startIndex": 9, "endIndex": 14, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'table'
|
|
127
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
|
|
128
|
+
{ "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] }, // 'transaction'
|
|
129
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 2, "endIndex": 30, "scopes": ["source.abl", "variable.other.abl"] }, // 'oAccessRequestBusinessEntity'
|
|
134
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
135
|
+
{ "startIndex": 31, "endIndex": 42, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'SaveChanges'
|
|
136
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
137
|
+
{ "startIndex": 43, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'DATASET'
|
|
138
|
+
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
139
|
+
{ "startIndex": 51, "endIndex": 66, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.dataset.abl"] }, // 'dsAccessRequest'
|
|
140
|
+
{ "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
141
|
+
{ "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'oARBE'
|
|
146
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
147
|
+
{ "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'SaveChanges'
|
|
148
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
149
|
+
{ "startIndex": 20, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'DATASET'
|
|
150
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
151
|
+
{ "startIndex": 28, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.dataset.abl"] }, // 'dsAccessRequest'
|
|
152
|
+
{ "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
153
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
157
|
+
{ "startIndex": 2, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'DatasetHelper'
|
|
158
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
159
|
+
{ "startIndex": 16, "endIndex": 34, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ThrowDatasetErrors'
|
|
160
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
161
|
+
{ "startIndex": 35, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'DATASET'
|
|
162
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
163
|
+
{ "startIndex": 43, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.dataset.abl"] }, // 'dsAccessRequest'
|
|
164
|
+
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
|
|
165
|
+
{ "startIndex": 59, "endIndex": 65, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'HANDLE'
|
|
166
|
+
{ "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
167
|
+
{ "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
171
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
172
|
+
]
|
|
173
|
+
];
|
|
174
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
175
|
+
})
|