@abaplint/core 2.120.104 → 2.120.105
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.
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ModifyInternal = void 0;
|
|
37
37
|
const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
38
|
+
const nodes_1 = require("../../nodes");
|
|
38
39
|
const source_1 = require("../expressions/source");
|
|
39
40
|
const target_1 = require("../expressions/target");
|
|
40
41
|
const fstarget_1 = require("../expressions/fstarget");
|
|
@@ -43,15 +44,22 @@ const basic_1 = require("../../types/basic");
|
|
|
43
44
|
const _syntax_input_1 = require("../_syntax_input");
|
|
44
45
|
class ModifyInternal {
|
|
45
46
|
runSyntax(node, input) {
|
|
46
|
-
|
|
47
|
-
source_1.Source.runSyntax(s, input);
|
|
48
|
-
}
|
|
47
|
+
var _a;
|
|
49
48
|
// there is only one
|
|
50
49
|
const target = node.findFirstExpression(Expressions.Target);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
// it might be a dynamic target
|
|
51
|
+
const targetType = target ? target_1.Target.runSyntax(target, input) : undefined;
|
|
52
|
+
// the FROM work area has the row type of the table, used for inferring "#"
|
|
53
|
+
const rowType = targetType instanceof basic_1.TableType ? targetType.getRowType() : undefined;
|
|
54
|
+
const children = node.getChildren();
|
|
55
|
+
for (let i = 0; i < children.length; i++) {
|
|
56
|
+
const s = children[i];
|
|
57
|
+
if (s instanceof nodes_1.ExpressionNode && s.get() instanceof Expressions.Source) {
|
|
58
|
+
const isFrom = ((_a = children[i - 1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "FROM";
|
|
59
|
+
source_1.Source.runSyntax(s, input, isFrom ? rowType : undefined);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (target) {
|
|
55
63
|
if (targetType instanceof basic_1.VoidType
|
|
56
64
|
|| targetType instanceof basic_1.AnyType
|
|
57
65
|
|| targetType instanceof basic_1.UnknownType) {
|
package/build/src/registry.js
CHANGED