@abaplint/core 2.108.9 → 2.108.10
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.
|
@@ -22,7 +22,7 @@ class Sequence {
|
|
|
22
22
|
}
|
|
23
23
|
run(statements, parent) {
|
|
24
24
|
let inn = statements;
|
|
25
|
-
|
|
25
|
+
let out = [];
|
|
26
26
|
for (const i of this.list) {
|
|
27
27
|
const match = i.run(inn, parent);
|
|
28
28
|
if (match.error) {
|
|
@@ -34,7 +34,14 @@ class Sequence {
|
|
|
34
34
|
errorMatched: out.length,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
if (match.matched.length < 100) {
|
|
38
|
+
out.push(...match.matched);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// avoid using the spread operator, it might trigger "Maximum call stack size exceeded"
|
|
42
|
+
// when the number of matched elements is very large
|
|
43
|
+
out = out.concat(match.matched);
|
|
44
|
+
}
|
|
38
45
|
inn = match.unmatched;
|
|
39
46
|
}
|
|
40
47
|
return {
|
|
@@ -166,7 +173,7 @@ class Star {
|
|
|
166
173
|
}
|
|
167
174
|
run(statements, parent) {
|
|
168
175
|
let inn = statements;
|
|
169
|
-
|
|
176
|
+
let out = [];
|
|
170
177
|
while (true) {
|
|
171
178
|
if (inn.length === 0) {
|
|
172
179
|
return {
|
|
@@ -198,7 +205,14 @@ class Star {
|
|
|
198
205
|
};
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
|
-
|
|
208
|
+
if (match.matched.length < 100) {
|
|
209
|
+
out.push(...match.matched);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
// avoid using the spread operator, it might trigger "Maximum call stack size exceeded"
|
|
213
|
+
// when the number of matched elements is very large
|
|
214
|
+
out = out.concat(match.matched);
|
|
215
|
+
}
|
|
202
216
|
inn = match.unmatched;
|
|
203
217
|
}
|
|
204
218
|
}
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.108.
|
|
3
|
+
"version": "2.108.10",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"lint:fix": "eslint src/**/*.ts test/**/*.ts --format unix --fix",
|
|
11
11
|
"compile": "tsc && sh scripts/version.sh",
|
|
12
12
|
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
13
|
-
"test:only": "npm run compile && mocha",
|
|
13
|
+
"test:only": "npm run compile && mocha --timeout 1000000",
|
|
14
14
|
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
15
15
|
"coverage": "npm run compile && c8 mocha && c8 report --reporter=html",
|
|
16
16
|
"lexer_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/lexer_performance.js",
|