@abaplint/core
Version:
abaplint - Core API
25 lines • 947 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldLength = void 0;
const Expressions = require("../../2_statements/expressions");
const _reference_1 = require("../_reference");
const field_chain_1 = require("./field_chain");
class FieldLength {
static runSyntax(node, input) {
const field = node.findDirectExpression(Expressions.SimpleFieldChain2);
if (field) {
field_chain_1.FieldChain.runSyntax(field, input, _reference_1.ReferenceType.DataReadReference);
return undefined;
}
else {
const children = node.getChildren();
const num = children[children.length - 2];
if (num.getLastToken().getStr() === "*") {
return undefined;
}
return parseInt(num.getLastToken().getStr(), 10);
}
}
}
exports.FieldLength = FieldLength;
//# sourceMappingURL=field_length.js.map