@abaplint/core
Version:
abaplint - Core API
28 lines • 1.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FSTarget = void 0;
const Expressions = require("../../2_statements/expressions");
const inline_fs_1 = require("./inline_fs");
const _reference_1 = require("../_reference");
const _syntax_input_1 = require("../_syntax_input");
class FSTarget {
static runSyntax(node, input, type) {
const inlinefs = node === null || node === void 0 ? void 0 : node.findDirectExpression(Expressions.InlineFS);
if (inlinefs) {
inline_fs_1.InlineFS.runSyntax(inlinefs, input, type);
}
const target = node === null || node === void 0 ? void 0 : node.findDirectExpression(Expressions.TargetFieldSymbol);
if (target) {
const token = target.getFirstToken();
const found = input.scope.findVariable(token.getStr());
if (found === undefined) {
const message = `"${token.getStr()}" not found, FSTarget`;
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
return;
}
input.scope.addReference(token, found, _reference_1.ReferenceType.DataWriteReference, input.filename);
}
}
}
exports.FSTarget = FSTarget;
//# sourceMappingURL=fstarget.js.map