abl-tmlanguage 1.3.15 → 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 +18 -0
- package/README.md +17 -12
- package/abl.tmLanguage.json +280 -69
- 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 +157 -1
- 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/define-query.spec.js +43 -0
- 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 +25 -19
- 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 +53 -0
- 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 +9 -10
- 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/shared.js +12 -11
- 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 +22 -20
|
@@ -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
|
[
|
|
@@ -11,8 +11,8 @@ describe('', () => {
|
|
|
11
11
|
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
12
12
|
{ "startIndex": 27, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'input'
|
|
13
13
|
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
|
|
14
|
-
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.
|
|
15
|
-
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.
|
|
14
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
15
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
16
16
|
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
17
17
|
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
18
18
|
];
|
|
@@ -62,3 +62,27 @@ end procedure.`;
|
|
|
62
62
|
];
|
|
63
63
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
64
64
|
})
|
|
65
|
+
|
|
66
|
+
describe('', () => {
|
|
67
|
+
// This test must have leading spaces
|
|
68
|
+
let statement = ` procedure UsingFoo private:
|
|
69
|
+
end procedure.`;
|
|
70
|
+
|
|
71
|
+
let expectedTokens = [
|
|
72
|
+
[
|
|
73
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
74
|
+
{ "startIndex": 4, "endIndex": 13, "scopes": ["source.abl", "meta.procedure.abl", "keyword.other.abl"] }, // 'procedure'
|
|
75
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
76
|
+
{ "startIndex": 14, "endIndex": 22, "scopes": ["source.abl", "meta.procedure.abl", "entity.name.procedure.abl"] }, // 'UsingFoo'
|
|
77
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
78
|
+
{ "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.procedure.abl", "keyword.other.abl"] }, // 'private'
|
|
79
|
+
{ "startIndex": 30, "endIndex": 31, "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": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'procedure'
|
|
85
|
+
{ "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
86
|
+
]];
|
|
87
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
88
|
+
})
|
|
@@ -12,13 +12,16 @@ end procedure.`;
|
|
|
12
12
|
{ "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.procedure.abl", "keyword.other.abl"] }, // 'PROCEDURE'
|
|
13
13
|
{ "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
14
14
|
{ "startIndex": 10, "endIndex": 22, "scopes": ["source.abl", "meta.procedure.abl", "entity.name.procedure.abl"] }, // 'EnumPrinters'
|
|
15
|
-
{ "startIndex": 22, "endIndex":
|
|
15
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.procedure.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
16
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.procedure.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
17
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.procedure.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'A'
|
|
18
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.procedure.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
16
19
|
{ "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
17
20
|
{ "startIndex": 27, "endIndex": 35, "scopes": ["source.abl", "meta.procedure.abl", "keyword.other.abl"] }, // 'EXTERNAL'
|
|
18
21
|
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.procedure.abl"] }, // ' '
|
|
19
|
-
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
20
|
-
{ "startIndex": 37, "endIndex": 49, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
21
|
-
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.procedure.abl", "string.double.
|
|
22
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
23
|
+
{ "startIndex": 37, "endIndex": 49, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl"] }, // 'winspool.drv'
|
|
24
|
+
{ "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.procedure.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
22
25
|
{ "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
|
|
23
26
|
],
|
|
24
27
|
[
|
|
@@ -98,9 +98,9 @@ describe('', () => {
|
|
|
98
98
|
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
99
99
|
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
|
|
100
100
|
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
101
|
-
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "string.double.
|
|
102
|
-
{ "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "string.double.
|
|
103
|
-
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "string.double.
|
|
101
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
102
|
+
{ "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'a/program.p'
|
|
103
|
+
{ "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
104
104
|
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
105
105
|
];
|
|
106
106
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
@@ -197,9 +197,9 @@ describe('', () => {
|
|
|
197
197
|
let expectedTokens = [
|
|
198
198
|
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
|
|
199
199
|
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
200
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "string.double.
|
|
201
|
-
{ "startIndex": 5, "endIndex": 37, "scopes": ["source.abl", "string.double.
|
|
202
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.double.
|
|
200
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
201
|
+
{ "startIndex": 5, "endIndex": 37, "scopes": ["source.abl", "string.quoted.double.abl"] }, // '$SYSSYS/P/TestServerSockAppSrv.p'
|
|
202
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
203
203
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
204
204
|
{ "startIndex": 39, "endIndex": 44, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '31000'
|
|
205
205
|
{ "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
@@ -214,9 +214,9 @@ describe('', () => {
|
|
|
214
214
|
let expectedTokens = [
|
|
215
215
|
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
|
|
216
216
|
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
217
|
-
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "string.single.
|
|
218
|
-
{ "startIndex": 5, "endIndex": 37, "scopes": ["source.abl", "string.single.
|
|
219
|
-
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.single.
|
|
217
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
|
|
218
|
+
{ "startIndex": 5, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl"] }, // '$SYSSYS/P/TestServerSockAppSrv.p'
|
|
219
|
+
{ "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
|
|
220
220
|
{ "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
|
|
221
221
|
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
|
|
222
222
|
{ "startIndex": 40, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '31000'
|
|
@@ -298,9 +298,15 @@ describe('', () => {
|
|
|
298
298
|
let expectedTokens = [
|
|
299
299
|
{ "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'RUN'
|
|
300
300
|
{ "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
|
|
301
|
-
{ "startIndex": 4, "endIndex":
|
|
301
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
302
|
+
{ "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
303
|
+
{ "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'rhdr'
|
|
304
|
+
{ "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
302
305
|
{ "startIndex": 11, "endIndex": 21, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'brslsag3.p'
|
|
303
|
-
{ "startIndex": 21, "endIndex":
|
|
306
|
+
{ "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
307
|
+
{ "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
308
|
+
{ "startIndex": 23, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'rtrl'
|
|
309
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
304
310
|
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
305
311
|
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
306
312
|
];
|
|
@@ -317,9 +323,15 @@ describe('', () => {
|
|
|
317
323
|
{ "startIndex": 6, "endIndex": 26, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // 'debug remove / path '
|
|
318
324
|
{ "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "comment.block.source.abl"] }, // '*/'
|
|
319
325
|
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
320
|
-
{ "startIndex": 29, "endIndex":
|
|
326
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
327
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
328
|
+
{ "startIndex": 31, "endIndex": 35, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'rhdr'
|
|
329
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
321
330
|
{ "startIndex": 36, "endIndex": 46, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'brslsag3.p'
|
|
322
|
-
{ "startIndex": 46, "endIndex":
|
|
331
|
+
{ "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
|
|
332
|
+
{ "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
|
|
333
|
+
{ "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'rtrl'
|
|
334
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
|
|
323
335
|
{ "startIndex": 53, "endIndex": 54, "scopes": ["source.abl"] }, // ' '
|
|
324
336
|
{ "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
325
337
|
];
|
package/spec/shared.js
CHANGED
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
|
43
43
|
let lines = statement.split(/\n/g);
|
|
44
44
|
let nbLines = lines.length;
|
|
45
45
|
if (nbLines === 1) {
|
|
46
|
-
//singleline
|
|
46
|
+
//singleline
|
|
47
47
|
tokenResult = grammar.tokenizeLine(statement);
|
|
48
48
|
|
|
49
49
|
// More human-readable output
|
|
@@ -52,15 +52,13 @@ module.exports = {
|
|
|
52
52
|
const token = tokenResult.tokens[j];
|
|
53
53
|
|
|
54
54
|
// More human-readable output
|
|
55
|
-
// console.log(` - token from ${token.startIndex} to ${token.endIndex} ` +
|
|
56
|
-
// `(${statement.substring(token.startIndex, token.endIndex)}) ` +
|
|
57
|
-
// `with scopes ${token.scopes.join(', ')}`
|
|
58
|
-
// );
|
|
59
|
-
|
|
60
55
|
// Formatted as input-values
|
|
61
56
|
var O = token.scopes.map((e) => ('"' + e + '",')).join(' ').replace(/,\s*$/, "");
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
if (j < tokenResult.tokens.length - 1 ) {
|
|
58
|
+
console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] }, // '${statement.substring(token.startIndex, token.endIndex)}'`,);
|
|
59
|
+
} else {
|
|
60
|
+
console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] } // '${statement.substring(token.startIndex, token.endIndex)}'`,);
|
|
61
|
+
}
|
|
64
62
|
}
|
|
65
63
|
} else {
|
|
66
64
|
//multiline, we stack the tokens in an array
|
|
@@ -70,6 +68,7 @@ module.exports = {
|
|
|
70
68
|
};
|
|
71
69
|
lines.forEach(line => {
|
|
72
70
|
let r = grammar.tokenizeLine(line, ruleStack);
|
|
71
|
+
|
|
73
72
|
ruleStack = r.ruleStack;
|
|
74
73
|
tokenResult.tokens.push(r.tokens);
|
|
75
74
|
|
|
@@ -87,12 +86,14 @@ module.exports = {
|
|
|
87
86
|
|
|
88
87
|
// Formatted as input-values
|
|
89
88
|
var O = token.scopes.map((e) => ('"' + e + '",')).join(' ').replace(/,\s*$/, "");
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
if (j < r.tokens.length - 1 ) {
|
|
90
|
+
console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] }, // '${line.substring(token.startIndex, token.endIndex)}'`,);
|
|
91
|
+
} else {
|
|
92
|
+
console.log(`{ "startIndex": ${token.startIndex}, "endIndex": ${token.endIndex}, "scopes": [${O}] } // '${line.substring(token.startIndex, token.endIndex)}'`,);
|
|
93
|
+
}
|
|
92
94
|
}
|
|
93
95
|
// Formatted as input-values
|
|
94
96
|
console.log(`],`);
|
|
95
|
-
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
assert.deepEqual(tokenResult.tokens, expectedTokens, JSON.stringify(tokenResult.tokens));
|
|
@@ -29,10 +29,10 @@ describe('', () => {
|
|
|
29
29
|
{ "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
|
|
30
30
|
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
|
|
31
31
|
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
32
|
-
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "string.double.
|
|
33
|
-
{ "startIndex": 36, "endIndex": 52, "scopes": ["source.abl", "string.double.
|
|
34
|
-
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.double.
|
|
35
|
-
{ "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "string.double.
|
|
32
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
33
|
+
{ "startIndex": 36, "endIndex": 52, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'application/json'
|
|
34
|
+
{ "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
35
|
+
{ "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "string.quoted.double.abl", "support.other.abl"] } // ':u'
|
|
36
36
|
],
|
|
37
37
|
[
|
|
38
38
|
{ "startIndex": 0, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|