abl-tmlanguage 1.3.4 → 1.3.5
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-functions.txt +548 -0
- package/abl-keywords.txt +416 -0
- package/abl-methods.txt +1053 -0
- package/abl.tmLanguage.json +147 -12
- package/index.js +83 -59
- package/package.json +1 -1
- package/spec/blocks/block-labels.spec.js +25 -0
- package/spec/define-temp-table/define-dataset.spec.js +145 -0
- package/spec/define-temp-table/{define-index.spec.js → define-temp-table.spec.js} +81 -0
- package/spec/for-each/vscode-abl.issue#166.spec.js +83 -0
- package/spec/function-definition/vscode-abl-issue#166.spec.js +446 -0
- package/spec/misc-statements/record-buffer-functions.spec.js +73 -0
- package/spec/misc-statements/return-statement.spec.js +11 -0
- package/spec/operators/operators.spec.js +71 -0
|
@@ -76,3 +76,74 @@ describe('', () => {
|
|
|
76
76
|
];
|
|
77
77
|
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
78
78
|
})
|
|
79
|
+
|
|
80
|
+
describe('', () => {
|
|
81
|
+
let statement = `if not v_condition then .
|
|
82
|
+
else if NOT(v_condition) then .
|
|
83
|
+
else if v_string matches "foo" then .
|
|
84
|
+
else if Not v_string matches "bar" then .`;
|
|
85
|
+
let expectedTokens = [
|
|
86
|
+
[
|
|
87
|
+
{ "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
88
|
+
{ "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
|
|
89
|
+
{ "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'not'
|
|
90
|
+
{ "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
|
|
91
|
+
{ "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "variable.other.abl"] }, // 'v_condition'
|
|
92
|
+
{ "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
|
|
93
|
+
{ "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
94
|
+
{ "startIndex": 23, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
|
|
95
|
+
{ "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
|
|
99
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
100
|
+
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
101
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
102
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'NOT'
|
|
103
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
|
|
104
|
+
{ "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "variable.other.abl"] }, // 'v_condition'
|
|
105
|
+
{ "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
|
|
106
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
107
|
+
{ "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
108
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
|
|
109
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
|
|
113
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
114
|
+
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
115
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
116
|
+
{ "startIndex": 8, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'v_string'
|
|
117
|
+
{ "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
|
|
118
|
+
{ "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'matches'
|
|
119
|
+
{ "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
|
|
120
|
+
{ "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
121
|
+
{ "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'foo'
|
|
122
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
123
|
+
{ "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
|
|
124
|
+
{ "startIndex": 31, "endIndex": 35, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
125
|
+
{ "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
|
|
126
|
+
{ "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
{ "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
|
|
130
|
+
{ "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
|
|
131
|
+
{ "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
|
|
132
|
+
{ "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
|
|
133
|
+
{ "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'Not'
|
|
134
|
+
{ "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
|
|
135
|
+
{ "startIndex": 12, "endIndex": 20, "scopes": ["source.abl", "variable.other.abl"] }, // 'v_string'
|
|
136
|
+
{ "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
|
|
137
|
+
{ "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'matches'
|
|
138
|
+
{ "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
|
|
139
|
+
{ "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
|
|
140
|
+
{ "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'bar'
|
|
141
|
+
{ "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
|
|
142
|
+
{ "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
|
|
143
|
+
{ "startIndex": 35, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
|
|
144
|
+
{ "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
|
|
145
|
+
{ "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
|
|
146
|
+
]
|
|
147
|
+
];
|
|
148
|
+
shared.itShouldMatchExpectedScopes(statement, expectedTokens);
|
|
149
|
+
})
|