@abaplint/core 2.93.30 → 2.93.31
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.
|
@@ -11,14 +11,19 @@ const cond_1 = require("./cond");
|
|
|
11
11
|
const basic_1 = require("../../types/basic");
|
|
12
12
|
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
13
13
|
const _reference_1 = require("../_reference");
|
|
14
|
+
const let_1 = require("./let");
|
|
14
15
|
class For {
|
|
15
16
|
runSyntax(node, scope, filename) {
|
|
16
17
|
var _a;
|
|
17
18
|
let scoped = false;
|
|
18
19
|
const inlineLoop = node.findDirectExpressions(Expressions.InlineLoopDefinition);
|
|
19
|
-
const inlineField = node.
|
|
20
|
+
const inlineField = node.findDirectExpressions(Expressions.InlineFieldDefinition);
|
|
20
21
|
const groupsToken = (_a = node.findExpressionAfterToken("GROUPS")) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
21
|
-
const
|
|
22
|
+
const lett = node.findDirectExpression(Expressions.Let);
|
|
23
|
+
const addScope = inlineLoop.length > 0
|
|
24
|
+
|| inlineField.length > 0
|
|
25
|
+
|| lett !== undefined
|
|
26
|
+
|| groupsToken !== undefined;
|
|
22
27
|
if (addScope) {
|
|
23
28
|
// this scope is popped in parent expressions
|
|
24
29
|
scope.push(_scope_type_1.ScopeType.For, "FOR", node.getFirstToken().getStart(), filename);
|
|
@@ -45,6 +50,9 @@ class For {
|
|
|
45
50
|
for (const s of node.findDirectExpressions(Expressions.Cond)) {
|
|
46
51
|
new cond_1.Cond().runSyntax(s, scope, filename);
|
|
47
52
|
}
|
|
53
|
+
if (lett) {
|
|
54
|
+
new let_1.Let().runSyntax(lett, scope, filename, true);
|
|
55
|
+
}
|
|
48
56
|
return scoped;
|
|
49
57
|
}
|
|
50
58
|
}
|
|
@@ -28,7 +28,12 @@ class InlineLoopDefinition {
|
|
|
28
28
|
else if (sourceType instanceof basic_1.UnknownType) {
|
|
29
29
|
throw new Error("Unknown type, " + sourceType.getError());
|
|
30
30
|
}
|
|
31
|
-
if (rowType === undefined
|
|
31
|
+
if (rowType === undefined
|
|
32
|
+
&& node.concatTokens().toUpperCase().includes(" IN GROUP ")
|
|
33
|
+
&& sourceType !== undefined) {
|
|
34
|
+
rowType = sourceType;
|
|
35
|
+
}
|
|
36
|
+
else if (rowType === undefined) {
|
|
32
37
|
throw new Error("InlineLoopDefinition, not a table type");
|
|
33
38
|
}
|
|
34
39
|
const identifier = new _typed_identifier_1.TypedIdentifier(target.getFirstToken(), filename, rowType, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
@@ -5,11 +5,13 @@ const Expressions = require("../../2_statements/expressions");
|
|
|
5
5
|
const inline_field_definition_1 = require("./inline_field_definition");
|
|
6
6
|
const _scope_type_1 = require("../_scope_type");
|
|
7
7
|
class Let {
|
|
8
|
-
runSyntax(node, scope, filename) {
|
|
8
|
+
runSyntax(node, scope, filename, skipScope = false) {
|
|
9
9
|
if (node === undefined) {
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
if (skipScope !== true) {
|
|
13
|
+
scope.push(_scope_type_1.ScopeType.Let, "LET", node.getFirstToken().getStart(), filename);
|
|
14
|
+
}
|
|
13
15
|
for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {
|
|
14
16
|
new inline_field_definition_1.InlineFieldDefinition().runSyntax(f, scope, filename);
|
|
15
17
|
}
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.93.
|
|
3
|
+
"version": "2.93.31",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"c8": "^7.12.0",
|
|
57
57
|
"source-map-support": "^0.5.21",
|
|
58
58
|
"ts-json-schema-generator": "^1.1.1",
|
|
59
|
-
"typescript": "^4.8.
|
|
59
|
+
"typescript": "^4.8.4"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"fast-xml-parser": "^4.0.10",
|