abl-tmlanguage 1.1.3 → 1.2.0
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 +4 -0
- package/README.md +12 -0
- package/abl.tmLanguage.json +2736 -216
- package/azure-pipelines.yml +3 -2
- package/package.json +7 -6
- package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
- package/spec/array-extent/issue#5.spec.js +18 -18
- package/spec/define-buffer/simple-single-line.spec.js +138 -0
- package/spec/define-parameter/simple-single-line.spec.js +100 -100
- package/spec/define-stream/simple-single-line.spec.js +32 -31
- package/spec/define-variable/extent.spec.js +228 -0
- package/spec/define-variable/issue#6.spec.js +256 -198
- package/spec/define-variable/issue#9.spec.js +38 -32
- package/spec/define-variable/simple-single-line.spec.js +87 -87
- package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
- package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
- package/spec/define-variable/tm-issue#2.spec.js +20 -20
- package/spec/do/do-blocks.spec.js +89 -0
- package/spec/do/issue#3.spec.js +67 -60
- package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
- package/spec/global-scoped-define/global-define.spec.js +11 -11
- package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
- package/spec/include/abl-tmlanguage-issues#5.spec.js +44 -44
- package/spec/include/vscode-abl-issue#45.spec.js +14 -14
- package/spec/include/vscode-abl-issue#80.spec.js +26 -26
- package/spec/method-definition/constructor.spec.js +174 -0
- package/spec/method-definition/method.spec.js +185 -0
- package/spec/procedure-definition/empty-proc.spec.js +20 -18
- package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
- package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
- package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
- package/spec/shared.js +84 -42
- package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
- package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
- package/spec/type-name/argument.spec.js +209 -0
- package/spec/type-name/cast.spec.js +165 -0
- package/spec/type-name/define-class.spec.js +471 -0
- package/spec/type-name/define-enum.spec.js +44 -0
- package/spec/type-name/define-interface.spec.js +159 -0
- package/spec/type-name/define-property.spec.js +301 -0
- package/spec/type-name/define-temp-table.spec.js +434 -0
- package/spec/type-name/define-type-spec.js +435 -0
- package/spec/type-name/define-variable-property.spec.js +264 -0
- package/spec/type-name/define-variable.spec.js +504 -0
- package/spec/type-name/get-class.spec.js +91 -0
- package/spec/type-name/new.spec.js +126 -0
- package/spec/type-name/parameter-as.spec.js +838 -0
- package/spec/type-name/type-name-spec.js +587 -0
- package/spec/type-name/using.spec.js +115 -0
|
@@ -2,16 +2,16 @@ const { assert, expect } = require('chai');
|
|
|
2
2
|
const shared = require('../shared.js');
|
|
3
3
|
|
|
4
4
|
describe('', () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
let statement = `&global-define PROCEDURE-TYPE Procedure`;
|
|
6
|
+
// `&Scoped-define PROCEDURE-TYPE Procedure
|
|
7
|
+
// &Scoped-define DB-AWARE no`;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
let expectedTokens = [
|
|
10
|
+
{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.define.abl", "keyword.other.abl"] },
|
|
11
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
12
|
+
{ "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.define.abl", "entity.name.function.preprocessor.abl"] },
|
|
13
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
14
|
+
{ "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.define.abl"] }
|
|
15
|
+
];
|
|
16
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
17
17
|
})
|
|
@@ -2,35 +2,35 @@ const { assert, expect } = require('chai');
|
|
|
2
2
|
const shared = require('../shared.js');
|
|
3
3
|
|
|
4
4
|
describe('', () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
let statement = `&Scoped-define PROCEDURE-TYPE Procedure`;
|
|
6
|
+
// `&Scoped-define PROCEDURE-TYPE Procedure
|
|
7
|
+
// &Scoped-define DB-AWARE no`;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
let expectedTokens = [
|
|
10
|
+
{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.define.abl", "keyword.other.abl"] },
|
|
11
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
12
|
+
{ "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.define.abl", "entity.name.function.preprocessor.abl"] },
|
|
13
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
14
|
+
{ "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.define.abl"] }
|
|
15
|
+
];
|
|
16
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
17
17
|
})
|
|
18
18
|
describe('', () => {
|
|
19
|
-
|
|
20
|
-
`&Scoped-define PROCEDURE-TYPE Procedure
|
|
19
|
+
let statement =
|
|
20
|
+
`&Scoped-define PROCEDURE-TYPE Procedure
|
|
21
21
|
&Scoped-define DB-AWARE no`;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
let expectedTokens = [
|
|
24
|
+
[{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.define.abl", "keyword.other.abl"] },
|
|
25
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
26
|
+
{ "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.define.abl", "entity.name.function.preprocessor.abl"] },
|
|
27
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
28
|
+
{ "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.define.abl"] }],
|
|
29
|
+
[{ "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.define.abl", "keyword.other.abl"] },
|
|
30
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
31
|
+
{ "startIndex": 15, "endIndex": 23, "scopes": ["source.abl", "meta.preprocessor.define.abl", "entity.name.function.preprocessor.abl"] },
|
|
32
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.preprocessor.define.abl"] },
|
|
33
|
+
{ "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.preprocessor.define.abl"] }]
|
|
34
|
+
];
|
|
35
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
36
36
|
})
|
|
@@ -2,56 +2,56 @@ const { assert, expect } = require('chai');
|
|
|
2
2
|
const shared = require('../shared.js');
|
|
3
3
|
|
|
4
4
|
describe('', () => {
|
|
5
|
-
|
|
6
|
-
`{assigned "mExtVar"} /* comment */`;
|
|
5
|
+
let statement =
|
|
6
|
+
`{assigned "mExtVar"} /* comment */`;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
10
|
+
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
11
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] },
|
|
12
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] },
|
|
13
|
+
{ "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] },
|
|
14
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] },
|
|
15
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
16
|
+
{ "startIndex": 20, "endIndex": 26, "scopes": ["source.abl"] },
|
|
17
|
+
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "comment.block.source.abl"] },
|
|
18
|
+
{ "startIndex": 28, "endIndex": 37, "scopes": ["source.abl", "comment.block.source.abl", "comment"] },
|
|
19
|
+
{ "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "comment.block.source.abl"] }
|
|
20
|
+
];
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
23
23
|
})
|
|
24
24
|
describe('', () => {
|
|
25
|
-
|
|
26
|
-
`{assigned &ExtVar} /* comment */`;
|
|
25
|
+
let statement =
|
|
26
|
+
`{assigned &ExtVar} /* comment */`;
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
let expectedTokens = [
|
|
29
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
30
|
+
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
31
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] },
|
|
32
|
+
{ "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
33
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
34
|
+
{ "startIndex": 18, "endIndex": 25, "scopes": ["source.abl"] },
|
|
35
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "comment.block.source.abl"] },
|
|
36
|
+
{ "startIndex": 27, "endIndex": 36, "scopes": ["source.abl", "comment.block.source.abl", "comment"] },
|
|
37
|
+
{ "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "comment.block.source.abl"] }
|
|
38
|
+
];
|
|
39
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
40
40
|
})
|
|
41
41
|
describe('', () => {
|
|
42
|
-
|
|
43
|
-
`{assigned mExtVar} /* comment */`;
|
|
42
|
+
let statement =
|
|
43
|
+
`{assigned mExtVar} /* comment */`;
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
let expectedTokens = [
|
|
46
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
47
|
+
{ "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
48
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] },
|
|
49
|
+
{ "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
50
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
51
|
+
{ "startIndex": 18, "endIndex": 25, "scopes": ["source.abl"] },
|
|
52
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "comment.block.source.abl"] },
|
|
53
|
+
{ "startIndex": 27, "endIndex": 36, "scopes": ["source.abl", "comment.block.source.abl", "comment"] },
|
|
54
|
+
{ "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "comment.block.source.abl"] }
|
|
55
|
+
];
|
|
56
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
57
57
|
})
|
|
@@ -2,19 +2,19 @@ const { assert, expect } = require('chai');
|
|
|
2
2
|
const shared = require('../shared.js');
|
|
3
3
|
|
|
4
4
|
describe('', () => {
|
|
5
|
-
|
|
6
|
-
`{ test.i "{&Test}" }`;
|
|
5
|
+
let statement =
|
|
6
|
+
`{ test.i "{&Test}" }`;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
let expectedTokens = [
|
|
9
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
|
|
10
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
11
|
+
{ "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] }, // 'test.i'
|
|
12
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
13
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
14
|
+
{ "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // '{&Test}'
|
|
15
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
16
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
|
|
17
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
|
|
18
|
+
];
|
|
19
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
20
20
|
})
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
const shared = require('../shared.js');
|
|
2
2
|
|
|
3
3
|
describe('', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
let statement = `{ test.i {&Test} }`;
|
|
5
|
+
let expectedTokens = [
|
|
6
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
7
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] },
|
|
8
|
+
{ "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
9
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] },
|
|
10
|
+
{ "startIndex": 9, "endIndex": 16, "scopes": ["source.abl", "meta.include.abl", "keyword.other"] },
|
|
11
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl"] },
|
|
12
|
+
{ "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }
|
|
13
|
+
];
|
|
14
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
15
15
|
})
|
|
16
16
|
|
|
17
17
|
describe('', () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
let statement = `{ test.i &abc = ABC &def = 'D E F' &hij="H I J" }`;
|
|
19
|
+
let expectedTokens = [
|
|
20
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] },
|
|
21
|
+
{ "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] },
|
|
22
|
+
{ "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "string.unquoted.include-argument.abl"] },
|
|
23
|
+
{ "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] },
|
|
24
|
+
{ "startIndex": 9, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl", "meta.include-named-argument"] },
|
|
25
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl"] },
|
|
26
|
+
{ "startIndex": 20, "endIndex": 38, "scopes": ["source.abl", "meta.include.abl", "meta.include-named-argument"] },
|
|
27
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.include.abl"] },
|
|
28
|
+
{ "startIndex": 39, "endIndex": 55, "scopes": ["source.abl", "meta.include.abl", "meta.include-named-argument"] },
|
|
29
|
+
{ "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.include.abl"] },
|
|
30
|
+
{ "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }
|
|
31
|
+
];
|
|
32
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
33
33
|
})
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
const { assert, expect } = require('chai');
|
|
2
|
+
const shared = require('../shared.js');
|
|
3
|
+
|
|
4
|
+
describe('', () => {
|
|
5
|
+
let statement =
|
|
6
|
+
`constructor public ClassA ():
|
|
7
|
+
this-object(x).
|
|
8
|
+
end constructor.`;
|
|
9
|
+
|
|
10
|
+
let expectedTokens = [
|
|
11
|
+
[
|
|
12
|
+
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'constructor'
|
|
13
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
14
|
+
{ "startIndex": 12, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
|
|
15
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
16
|
+
{ "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'ClassA'
|
|
17
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
18
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
19
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
20
|
+
{ "startIndex": 28, "endIndex": 30, "scopes": ["source.abl"] } // ':'
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
24
|
+
{ "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
|
|
25
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
26
|
+
{ "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
|
|
27
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
28
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
32
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
33
|
+
{ "startIndex": 4, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'constructor'
|
|
34
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
35
|
+
]
|
|
36
|
+
];
|
|
37
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
describe('', () => {
|
|
41
|
+
let statement =
|
|
42
|
+
`constructor package-private ClassA (pcString as character extent, po as Object):
|
|
43
|
+
message "a method".
|
|
44
|
+
end constructor.`;
|
|
45
|
+
|
|
46
|
+
let expectedTokens = [
|
|
47
|
+
[
|
|
48
|
+
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'constructor'
|
|
49
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
50
|
+
{ "startIndex": 12, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'package-private'
|
|
51
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
52
|
+
{ "startIndex": 28, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'ClassA'
|
|
53
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
54
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
55
|
+
{ "startIndex": 36, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pcString'
|
|
56
|
+
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
57
|
+
{ "startIndex": 45, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
58
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
59
|
+
{ "startIndex": 48, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
|
|
60
|
+
{ "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
61
|
+
{ "startIndex": 58, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'extent'
|
|
62
|
+
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
|
|
63
|
+
{ "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
64
|
+
{ "startIndex": 66, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
|
|
65
|
+
{ "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
66
|
+
{ "startIndex": 69, "endIndex": 71, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
67
|
+
{ "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
68
|
+
{ "startIndex": 72, "endIndex": 78, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'Object'
|
|
69
|
+
{ "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
70
|
+
{ "startIndex": 79, "endIndex": 81, "scopes": ["source.abl"] } // ':'
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
|
|
74
|
+
{ "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
75
|
+
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
|
|
76
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
77
|
+
{ "startIndex": 11, "endIndex": 19, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'a method'
|
|
78
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
79
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
83
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
84
|
+
{ "startIndex": 4, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'constructor'
|
|
85
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
86
|
+
]
|
|
87
|
+
];
|
|
88
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
describe('', () => {
|
|
92
|
+
let statement =
|
|
93
|
+
`constructor private ClassB( po as List<Package.Thing>,
|
|
94
|
+
buffer pb for TableName,
|
|
95
|
+
input-output dataset dsData):
|
|
96
|
+
define variable log1 as logical.
|
|
97
|
+
|
|
98
|
+
message "a method".
|
|
99
|
+
end constructor.`;
|
|
100
|
+
|
|
101
|
+
let expectedTokens = [
|
|
102
|
+
[
|
|
103
|
+
{ "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'constructor'
|
|
104
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
105
|
+
{ "startIndex": 12, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'private'
|
|
106
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
107
|
+
{ "startIndex": 20, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'ClassB'
|
|
108
|
+
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
|
|
109
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
110
|
+
{ "startIndex": 28, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
|
|
111
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
112
|
+
{ "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
|
|
113
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
114
|
+
{ "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'List'
|
|
115
|
+
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
|
|
116
|
+
{ "startIndex": 39, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Package.Thing'
|
|
117
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
|
|
118
|
+
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
{ "startIndex": 0, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
122
|
+
{ "startIndex": 52, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'buffer'
|
|
123
|
+
{ "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
124
|
+
{ "startIndex": 59, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'pb'
|
|
125
|
+
{ "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
126
|
+
{ "startIndex": 62, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'for'
|
|
127
|
+
{ "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
128
|
+
{ "startIndex": 66, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'TableName'
|
|
129
|
+
{ "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
{ "startIndex": 0, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 52, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input-output'
|
|
134
|
+
{ "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
135
|
+
{ "startIndex": 65, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'dataset'
|
|
136
|
+
{ "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
|
|
137
|
+
{ "startIndex": 73, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'dsData'
|
|
138
|
+
{ "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
|
|
139
|
+
{ "startIndex": 80, "endIndex": 82, "scopes": ["source.abl"] } // ':'
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
143
|
+
{ "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
|
|
144
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 11, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
|
|
146
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
147
|
+
{ "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'log1'
|
|
148
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
149
|
+
{ "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
|
|
150
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
|
|
151
|
+
{ "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'logical'
|
|
152
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
{ "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
159
|
+
{ "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
|
|
160
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
161
|
+
{ "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
162
|
+
{ "startIndex": 13, "endIndex": 21, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'a method'
|
|
163
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
164
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
|
|
168
|
+
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
169
|
+
{ "startIndex": 4, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'constructor'
|
|
170
|
+
{ "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
171
|
+
]
|
|
172
|
+
];
|
|
173
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
174
|
+
})
|