abl-tmlanguage 1.3.24 → 1.3.26
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
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
1.3.26
|
|
2
|
+
======
|
|
3
|
+
|
|
4
|
+
- 🐛 Fix scoping for DELETE PROCEDURE statements (PR #74, issue vscode-abl/vscode-abl#507)
|
|
5
|
+
|
|
6
|
+
1.3.25
|
|
7
|
+
======
|
|
8
|
+
|
|
9
|
+
- 🐛 Fix scope for VAR CLASS <primitive> to not capture VAR ClassSomething (PR #73, issue vscode-abl/vscode-abl#488)
|
|
10
|
+
|
|
1
11
|
1.3.24
|
|
2
12
|
======
|
|
3
13
|
|
package/abl.tmLanguage.json
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"procedure-definition": {
|
|
59
59
|
"name": "meta.procedure.abl",
|
|
60
60
|
"comment": "Look ahead to the procedure name, quoted or not. It will be resolved in the patterns. 'Names must begin with a letter.' from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html",
|
|
61
|
-
"begin": "(?i)
|
|
61
|
+
"begin": "(?i)^\\s*(proce(?:dure|dur|du|d)?)\\s+(?=[a-zA-Z_])",
|
|
62
62
|
"beginCaptures": {
|
|
63
63
|
"1": {
|
|
64
64
|
"name": "keyword.other.abl"
|
|
@@ -2834,7 +2834,7 @@
|
|
|
2834
2834
|
},
|
|
2835
2835
|
{
|
|
2836
2836
|
"comment": "This capture must use spaces and not word boundaries because the 'end' is on a space. This also captures class names that are ABL primitive type names, for example OpenEdge.Core.Memptr in its short form",
|
|
2837
|
-
"match": "(?i)\\s*(class)\\s
|
|
2837
|
+
"match": "(?i)\\s*(class)\\s+(blob|character|char|clob|com-handle|date|datetime|datetime-tz|decimal|handle|int64|integer|int|logical|longchar|memptr|raw|recid|rowid|widget-handle)?",
|
|
2838
2838
|
"captures": {
|
|
2839
2839
|
"1": {
|
|
2840
2840
|
"name": "keyword.other.abl"
|
package/package.json
CHANGED
|
@@ -437,3 +437,31 @@ describe('', () => {
|
|
|
437
437
|
]
|
|
438
438
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
439
439
|
})
|
|
440
|
+
|
|
441
|
+
describe('', () => {
|
|
442
|
+
let statement = `var ClassMyClass cmc.`
|
|
443
|
+
let expectedTokens = [
|
|
444
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
|
|
445
|
+
{ "startIndex": 3, "endIndex": 9, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
446
|
+
{ "startIndex": 9, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'ClassMyClass'
|
|
447
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
448
|
+
{ "startIndex": 22, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cmc'
|
|
449
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
450
|
+
]
|
|
451
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
452
|
+
})
|
|
453
|
+
|
|
454
|
+
describe('', () => {
|
|
455
|
+
let statement = `var class ClassMyClass cmc.`
|
|
456
|
+
let expectedTokens = [
|
|
457
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
|
|
458
|
+
{ "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
459
|
+
{ "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'class'
|
|
460
|
+
{ "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
461
|
+
{ "startIndex": 16, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl", "entity.name.type.abl"] }, // 'ClassMyClass'
|
|
462
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
463
|
+
{ "startIndex": 29, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'cmc'
|
|
464
|
+
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
465
|
+
]
|
|
466
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
467
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement = `// vProcedureHandle: entity.name.procedure.abl; meta.procedure.abl; source.abl
|
|
6
|
+
// no-error: entity.name.procedure.abl; meta.procedure.abl; source.abl
|
|
7
|
+
delete procedure vProcedureHandle no-error.`;
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
[
|
|
10
|
+
{ "startIndex": 0, "endIndex": 78, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// vProcedureHandle: entity.name.procedure.abl; meta.procedure.abl; source.abl'
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
{ "startIndex": 0, "endIndex": 70, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no-error: entity.name.procedure.abl; meta.procedure.abl; source.abl'
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
|
|
17
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
18
|
+
{ "startIndex": 7, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'procedure'
|
|
19
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
20
|
+
{ "startIndex": 17, "endIndex": 33, "scopes": ["source.abl", "variable.other.abl"] }, // 'vProcedureHandle'
|
|
21
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
|
|
22
|
+
{ "startIndex": 34, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
|
|
23
|
+
{ "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
24
|
+
]
|
|
25
|
+
];
|
|
26
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
describe('', () => {
|
|
30
|
+
let statement = `// vProcedureHandle: variable.other.abl; source.abl
|
|
31
|
+
// no-error: keyword.other.abl; source.abl
|
|
32
|
+
delete object vProcedureHandle no-error.`;
|
|
33
|
+
let expectedTokens = [
|
|
34
|
+
[
|
|
35
|
+
{ "startIndex": 0, "endIndex": 51, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// vProcedureHandle: variable.other.abl; source.abl'
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
{ "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no-error: keyword.other.abl; source.abl'
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
|
|
42
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
43
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'object'
|
|
44
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
45
|
+
{ "startIndex": 14, "endIndex": 30, "scopes": ["source.abl", "variable.other.abl"] }, // 'vProcedureHandle'
|
|
46
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
47
|
+
{ "startIndex": 31, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
|
|
48
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
49
|
+
]
|
|
50
|
+
];
|
|
51
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
describe('', () => {
|
|
55
|
+
let statement = `delete WIDGET SELF.`;
|
|
56
|
+
let expectedTokens = [
|
|
57
|
+
{ "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
|
|
58
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
59
|
+
{ "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WIDGET'
|
|
60
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
|
|
61
|
+
{ "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "variable.language.abl"] }, // 'SELF'
|
|
62
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
63
|
+
];
|
|
64
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
65
|
+
})
|