UNPKG

@abaplint/core

Version:
30 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FieldSymbol = void 0; const Expressions = require("../../2_statements/expressions"); const _typed_identifier_1 = require("../../types/_typed_identifier"); const basic_types_1 = require("../basic_types"); const unknown_type_1 = require("../../types/basic/unknown_type"); const basic_1 = require("../../types/basic"); class FieldSymbol { runSyntax(node, input) { var _a; const fsname = (_a = node.findFirstExpression(Expressions.FieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken(); if (fsname === undefined) { return; } if (node.getChildren().length === 5) { // no type specified input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, basic_1.VoidType.get("FS-SIMPLE"))); return; } const bfound = new basic_types_1.BasicTypes(input).parseType(node); if (bfound) { input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, bfound)); return; } input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback"))); } } exports.FieldSymbol = FieldSymbol; //# sourceMappingURL=fieldsymbol.js.map