@abaplint/core
Version:
abaplint - Core API
33 lines • 1.5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Call = void 0;
const nodes_1 = require("../../nodes");
const method_call_chain_1 = require("../expressions/method_call_chain");
const method_source_1 = require("../expressions/method_source");
const method_call_body_1 = require("../expressions/method_call_body");
const void_type_1 = require("../../types/basic/void_type");
const _syntax_input_1 = require("../_syntax_input");
class Call {
runSyntax(node, input) {
const children = node.getChildren();
if (children.length === 2) {
const first = children[0];
new method_call_chain_1.MethodCallChain().runSyntax(first, input);
return;
}
const methodSource = children[2];
if (methodSource === undefined) {
const message = "Call, child MethodSource not found";
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
return;
}
const methodDef = new method_source_1.MethodSource().runSyntax(methodSource, input);
const body = children[3];
if (body instanceof nodes_1.ExpressionNode) {
// todo, resolve the method definition above and pass, if possible, in case of dynamic pass void
new method_call_body_1.MethodCallBody().runSyntax(body, input, methodDef || new void_type_1.VoidType("CallTODO"));
}
}
}
exports.Call = Call;
//# sourceMappingURL=call.js.map