@abaplint/cli 2.93.94 → 2.93.95

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.
Files changed (2) hide show
  1. package/build/cli.js +24 -24
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -6638,7 +6638,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6638
6638
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6639
6639
 
6640
6640
  "use strict";
6641
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BuiltIn = void 0;\r\n/* eslint-disable max-len */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass BuiltInMethod extends _identifier_1.Identifier {\r\n constructor(token, filename, method, row) {\r\n super(token, filename);\r\n this.method = method;\r\n this.row = row;\r\n }\r\n getRequiredParameters() {\r\n return [];\r\n }\r\n getOptional() {\r\n throw new Error(\"BuiltInMethod->Method not implemented.\");\r\n }\r\n getAll() {\r\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\r\n }\r\n getImporting() {\r\n const ret = [];\r\n for (const i in this.method.mandatory) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\r\n }\r\n for (const i in this.method.optional) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\r\n }\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.method.mandatory === undefined) {\r\n return undefined;\r\n }\r\n const keys = Object.keys(this.method.mandatory);\r\n if (keys.length === 1) {\r\n return keys[0].toUpperCase();\r\n }\r\n return undefined;\r\n }\r\n getExporting() {\r\n return [];\r\n }\r\n getRaising() {\r\n return [];\r\n }\r\n getChanging() {\r\n return [];\r\n }\r\n getReturning() {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\r\n }\r\n getExceptions() {\r\n return [];\r\n }\r\n getVisibility() {\r\n return visibility_1.Visibility.Public;\r\n }\r\n isRedefinition() {\r\n return false;\r\n }\r\n isAbstract() {\r\n return false;\r\n }\r\n isStatic() {\r\n return false;\r\n }\r\n isEventHandler() {\r\n return false;\r\n }\r\n getParameters() {\r\n return this;\r\n }\r\n getParameterDefault(_parameter) {\r\n return undefined;\r\n }\r\n}\r\nclass BuiltIn {\r\n constructor() {\r\n this.row = 1;\r\n }\r\n buildDefinition(method, row) {\r\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\r\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\r\n }\r\n searchBuiltin(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return this.buildDefinition(BuiltIn.methods[index], index);\r\n }\r\n isPredicate(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return BuiltIn.methods[index].predicate;\r\n }\r\n getTypes() {\r\n const ret = this.buildSY();\r\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, \"ABAP_BOOL\")));\r\n return ret;\r\n }\r\n get(extras) {\r\n const ret = this.buildSY();\r\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\r\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\r\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\r\n ret.push(this.buildConstant(\"%_CR_LF\"));\r\n ret.push(this.buildConstant(\"%_ENDIAN\"));\r\n ret.push(this.buildConstant(\"%_FORMFEED\"));\r\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\r\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\r\n ret.push(this.buildConstant(\"%_MINCHAR\"));\r\n ret.push(this.buildConstant(\"%_NEWLINE\"));\r\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\r\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'-'\"));\r\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\r\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\r\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\r\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\r\n ret.push(this.buildConstant(\"col_group\", new basic_1.IntegerType(), \"7\"));\r\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\r\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\r\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\r\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1), \"' '\"));\r\n for (const e of extras) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], \"'?'\"));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////\r\n buildSY() {\r\n const components = [];\r\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, \"sy-abcde\") });\r\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, \"sy-batch\") });\r\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, \"sy-binpt\") });\r\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, \"sy-calld\") });\r\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, \"sy-callr\") });\r\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, \"sy-cprog\") });\r\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, \"sy-datar\") });\r\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\r\n components.push({ name: \"datum\", type: new basic_1.DateType() });\r\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\r\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, \"sy-dbnam\") });\r\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, \"sy-dbsys\") });\r\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, \"sy-dyngr\") });\r\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, \"sy-dynnr\") });\r\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, \"sy-host\") });\r\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"input\", type: new basic_1.CharacterType(1, \"sy-input\") });\r\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, \"sy-langu\", \"ISOLA\") });\r\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, \"sy-ldbpg\") });\r\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, \"sy-lisel\") });\r\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, \"sy-mandt\") });\r\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, \"sy-msgid\") });\r\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, \"sy-msgli\") });\r\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\r\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, \"sy-msgty\") });\r\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, \"sy-msgv1\") });\r\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, \"sy-msgv2\") });\r\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, \"sy-msgv3\") });\r\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, \"sy-msgv4\") });\r\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, \"sy-opsys\") });\r\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, \"sy-pdest\") });\r\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, \"sy-pfkey\") });\r\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, \"sy-repid\") });\r\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, \"sy-saprl\") });\r\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, \"sy-slset\") });\r\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, \"sy-spono\") });\r\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, \"sy-sysid\") });\r\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, \"sy-tcode\") });\r\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\r\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, \"sy-title\") });\r\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, \"sy-tvar0\") });\r\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, \"sy-tvar1\") });\r\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, \"sy-tvar2\") });\r\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, \"sy-tvar3\") });\r\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, \"sy-tvar4\") });\r\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, \"sy-tvar5\") });\r\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, \"sy-tvar6\") });\r\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, \"sy-tvar7\") });\r\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, \"sy-tvar8\") });\r\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, \"sy-tvar9\") });\r\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, \"sy-ucomm\") });\r\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, \"sy-uline\") });\r\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, \"sy-uname\") });\r\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\r\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, \"sy-vline\") });\r\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, \"sy-wtitl\") });\r\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, \"sy-zonlo\") });\r\n const type = new basic_1.StructureType(components);\r\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\r\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\r\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n return [sy, syst];\r\n }\r\n buildConstant(name, type, value) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n if (type === undefined) {\r\n type = new basic_1.VoidType(name);\r\n }\r\n if (value === undefined) {\r\n value = \"'?'\";\r\n }\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], value);\r\n }\r\n buildVariable(name) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n }\r\n}\r\nexports.BuiltIn = BuiltIn;\r\nBuiltIn.filename = \"_builtin.prog.abap\";\r\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\r\n// todo: \"pcre\", only possible from 755\r\nBuiltIn.methods = [\r\n {\r\n name: \"ABS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"ACOS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ASIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ATAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"BIT-SET\",\r\n mandatory: {\r\n \"val\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLC\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLX\",\r\n mandatory: {\r\n \"bool\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"bit\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CEIL\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CHAR_OFF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"add\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CHARLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONCAT_LINES_OF\",\r\n mandatory: {\r\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONDENSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"del\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n predicate: true,\r\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COSH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COUNT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"DBMAXLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"DISTANCE\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ESCAPE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"format\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"EXP\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"FIND\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_END\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FLOOR\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FRAC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FROM_MIXED\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"INSERT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"sub\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"IPOW\",\r\n mandatory: {\r\n \"base\": new basic_1.FloatType(),\r\n \"exp\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_EXISTS\",\r\n mandatory: {\r\n \"val\": new basic_1.AnyType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_INDEX\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINES\",\r\n mandatory: {\r\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"LOG\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"LOG10\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"MATCH\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n }, optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"MATCHES\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NUMOFCHAR\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"REPEAT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REPLACE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"with\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"RESCALE\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REVERSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ROUND\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SEGMENT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"index\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n \"space\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_LEFT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_RIGHT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SIGN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SINH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SQRT\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"STRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SUBSTRING\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_AFTER\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_BEFORE\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_FROM\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_TO\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TANH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TO_LOWER\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_MIXED\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_UPPER\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRANSLATE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRUNC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"UTCLONG_ADD\",\r\n mandatory: {\r\n \"val\": new basic_1.UTCLongType(),\r\n },\r\n optional: {\r\n \"days\": new basic_1.IntegerType(),\r\n \"hour\": new basic_1.IntegerType(),\r\n \"minutes\": new basic_1.IntegerType(),\r\n \"seconds\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_CURRENT\",\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_DIFF\",\r\n mandatory: {\r\n \"high\": new basic_1.UTCLongType(),\r\n \"low\": new basic_1.UTCLongType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"XSDBOOL\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp08,\r\n },\r\n {\r\n name: \"XSTRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.XStringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n];\r\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6641
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BuiltIn = void 0;\r\n/* eslint-disable max-len */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass BuiltInMethod extends _identifier_1.Identifier {\r\n constructor(token, filename, method, row) {\r\n super(token, filename);\r\n this.method = method;\r\n this.row = row;\r\n }\r\n getRequiredParameters() {\r\n return [];\r\n }\r\n getOptional() {\r\n throw new Error(\"BuiltInMethod->Method not implemented.\");\r\n }\r\n getAll() {\r\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\r\n }\r\n getImporting() {\r\n const ret = [];\r\n for (const i in this.method.mandatory) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\r\n }\r\n for (const i in this.method.optional) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\r\n }\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.method.mandatory === undefined) {\r\n return undefined;\r\n }\r\n const keys = Object.keys(this.method.mandatory);\r\n if (keys.length === 1) {\r\n return keys[0].toUpperCase();\r\n }\r\n return undefined;\r\n }\r\n getExporting() {\r\n return [];\r\n }\r\n getRaising() {\r\n return [];\r\n }\r\n getChanging() {\r\n return [];\r\n }\r\n getReturning() {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\r\n }\r\n getExceptions() {\r\n return [];\r\n }\r\n getVisibility() {\r\n return visibility_1.Visibility.Public;\r\n }\r\n isRedefinition() {\r\n return false;\r\n }\r\n isAbstract() {\r\n return false;\r\n }\r\n isStatic() {\r\n return false;\r\n }\r\n isEventHandler() {\r\n return false;\r\n }\r\n getParameters() {\r\n return this;\r\n }\r\n getParameterDefault(_parameter) {\r\n return undefined;\r\n }\r\n}\r\nclass BuiltIn {\r\n constructor() {\r\n this.row = 1;\r\n }\r\n buildDefinition(method, row) {\r\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\r\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\r\n }\r\n searchBuiltin(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return this.buildDefinition(BuiltIn.methods[index], index);\r\n }\r\n isPredicate(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return BuiltIn.methods[index].predicate;\r\n }\r\n getTypes() {\r\n const ret = this.buildSY();\r\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" })));\r\n return ret;\r\n }\r\n get(extras) {\r\n const ret = this.buildSY();\r\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\r\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\r\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\r\n ret.push(this.buildConstant(\"%_CR_LF\"));\r\n ret.push(this.buildConstant(\"%_ENDIAN\"));\r\n ret.push(this.buildConstant(\"%_FORMFEED\"));\r\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\r\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\r\n ret.push(this.buildConstant(\"%_MINCHAR\"));\r\n ret.push(this.buildConstant(\"%_NEWLINE\"));\r\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\r\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\r\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'-'\"));\r\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\r\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\r\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\r\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\r\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\r\n ret.push(this.buildConstant(\"col_group\", new basic_1.IntegerType(), \"7\"));\r\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\r\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\r\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\r\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1), \"' '\"));\r\n for (const e of extras) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], \"'?'\"));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////\r\n buildSY() {\r\n const components = [];\r\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, { qualifiedName: \"sy-abcde\" }) });\r\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-batch\" }) });\r\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-binpt\" }) });\r\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-calld\" }) });\r\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, { qualifiedName: \"sy-callr\" }) });\r\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-cprog\" }) });\r\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-datar\" }) });\r\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\r\n components.push({ name: \"datum\", type: new basic_1.DateType() });\r\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\r\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-dbnam\" }) });\r\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-dbsys\" }) });\r\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dyngr\" }) });\r\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dynnr\" }) });\r\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, { qualifiedName: \"sy-host\" }) });\r\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"input\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-input\" }) });\r\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-langu\", conversionExit: \"ISOLA\" }) });\r\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-ldbpg\" }) });\r\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-lisel\" }) });\r\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-mandt\" }) });\r\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-msgid\" }) });\r\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, { qualifiedName: \"sy-msgli\" }) });\r\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\r\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-msgty\" }) });\r\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv1\" }) });\r\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv2\" }) });\r\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv3\" }) });\r\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv4\" }) });\r\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-opsys\" }) });\r\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-pdest\" }) });\r\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-pfkey\" }) });\r\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-repid\" }) });\r\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-saprl\" }) });\r\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, { qualifiedName: \"sy-slset\" }) });\r\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-spono\" }) });\r\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-sysid\" }) });\r\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tcode\" }) });\r\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\r\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-title\" }) });\r\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar0\" }) });\r\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar1\" }) });\r\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar2\" }) });\r\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar3\" }) });\r\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar4\" }) });\r\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar5\" }) });\r\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar6\" }) });\r\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar7\" }) });\r\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar8\" }) });\r\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar9\" }) });\r\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-ucomm\" }) });\r\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-uline\" }) });\r\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, { qualifiedName: \"sy-uname\" }) });\r\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\r\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-vline\" }) });\r\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-wtitl\" }) });\r\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, { qualifiedName: \"sy-zonlo\" }) });\r\n const type = new basic_1.StructureType(components);\r\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\r\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\r\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n return [sy, syst];\r\n }\r\n buildConstant(name, type, value) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n if (type === undefined) {\r\n type = new basic_1.VoidType(name);\r\n }\r\n if (value === undefined) {\r\n value = \"'?'\";\r\n }\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], value);\r\n }\r\n buildVariable(name) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* IdentifierMeta.BuiltIn */]);\r\n }\r\n}\r\nexports.BuiltIn = BuiltIn;\r\nBuiltIn.filename = \"_builtin.prog.abap\";\r\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\r\n// todo: \"pcre\", only possible from 755\r\nBuiltIn.methods = [\r\n {\r\n name: \"ABS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"ACOS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ASIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ATAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"BIT-SET\",\r\n mandatory: {\r\n \"val\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLC\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLX\",\r\n mandatory: {\r\n \"bool\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"bit\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CEIL\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CHAR_OFF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"add\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CHARLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONCAT_LINES_OF\",\r\n mandatory: {\r\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONDENSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"del\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n predicate: true,\r\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COSH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COUNT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"DBMAXLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"DISTANCE\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ESCAPE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"format\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"EXP\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"FIND\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_END\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FLOOR\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FRAC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FROM_MIXED\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"INSERT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"sub\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"IPOW\",\r\n mandatory: {\r\n \"base\": new basic_1.FloatType(),\r\n \"exp\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_EXISTS\",\r\n mandatory: {\r\n \"val\": new basic_1.AnyType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_INDEX\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINES\",\r\n mandatory: {\r\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"LOG\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"LOG10\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"MATCH\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n }, optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"MATCHES\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n predicate: true,\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NUMOFCHAR\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"REPEAT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REPLACE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"with\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"RESCALE\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REVERSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ROUND\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SEGMENT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"index\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n \"space\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_LEFT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_RIGHT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SIGN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SINH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SQRT\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"STRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SUBSTRING\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_AFTER\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_BEFORE\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_FROM\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_TO\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TANH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TO_LOWER\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_MIXED\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_UPPER\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRANSLATE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRUNC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"UTCLONG_ADD\",\r\n mandatory: {\r\n \"val\": new basic_1.UTCLongType(),\r\n },\r\n optional: {\r\n \"days\": new basic_1.IntegerType(),\r\n \"hour\": new basic_1.IntegerType(),\r\n \"minutes\": new basic_1.IntegerType(),\r\n \"seconds\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_CURRENT\",\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_DIFF\",\r\n mandatory: {\r\n \"high\": new basic_1.UTCLongType(),\r\n \"low\": new basic_1.UTCLongType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"XSDBOOL\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp08,\r\n },\r\n {\r\n name: \"XSTRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.XStringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n];\r\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6642
6642
 
6643
6643
  /***/ }),
6644
6644
 
@@ -6715,7 +6715,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6715
6715
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6716
6716
 
6717
6717
  "use strict";
6718
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BasicTypes = void 0;\r\n/* eslint-disable default-case */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Types = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ../types/class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst identifier_1 = __webpack_require__(/*! ../1_lexer/tokens/identifier */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ./_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./expressions/field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ./_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass BasicTypes {\r\n constructor(filename, scope) {\r\n this.filename = filename;\r\n this.scope = scope;\r\n }\r\n lookupQualifiedName(name) {\r\n var _a;\r\n // argh, todo, rewrite this entire method, more argh\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const found = this.scope.findType(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (name.includes(\"=>\")) {\r\n const split = name.split(\"=>\");\r\n const ooName = split[0];\r\n const typeName = split[1];\r\n const oo = this.scope.findObjectDefinition(ooName);\r\n if (oo) {\r\n if (typeName.includes(\"-\")) {\r\n const split = typeName.split(\"-\");\r\n const subTypeName = split[0];\r\n const fieldName = split[1];\r\n const stru = oo.getTypeDefinitions().getByName(subTypeName);\r\n const struType = stru === null || stru === void 0 ? void 0 : stru.getType();\r\n if (stru && struType instanceof basic_1.StructureType) {\r\n const f = struType.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);\r\n }\r\n }\r\n }\r\n else {\r\n const f = oo.getTypeDefinitions().getByName(typeName);\r\n if (f) {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n else if (name.includes(\"-\")) {\r\n const split = name.split(\"-\");\r\n const typeName = split[0];\r\n const fieldName = split[1];\r\n const type = this.scope.findType(typeName);\r\n if (type) {\r\n const stru = type.getType();\r\n if (stru instanceof basic_1.StructureType) {\r\n const f = stru.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);\r\n }\r\n }\r\n }\r\n }\r\n const lookup = this.scope.getDDIC().lookupNoVoid(name);\r\n const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();\r\n if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {\r\n return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);\r\n }\r\n const builtin = this.scope.getDDIC().lookupBuiltinType(name);\r\n if (builtin) {\r\n return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);\r\n }\r\n const type = this.scope.findTypePoolType(name);\r\n if (type) {\r\n return type;\r\n }\r\n return undefined;\r\n }\r\n resolveLikeName(node, headerLogic = true) {\r\n var _a;\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n let chain = node.findFirstExpression(Expressions.FieldChain);\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.TypeName);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.FieldSub);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n }\r\n if (chain === undefined) {\r\n throw new Error(\"resolveLikeName, chain undefined\");\r\n }\r\n const fullName = chain.concatTokens();\r\n const children = [...chain.getChildren()];\r\n if (children.length === 0) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName1\");\r\n }\r\n let type = undefined;\r\n if (children[1] && (children[1].getFirstToken().getStr() === \"=>\" || children[1].getFirstToken().getStr() === \"->\")) {\r\n type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);\r\n }\r\n else {\r\n const name = children.shift().getFirstToken().getStr();\r\n let found = this.scope.findVariable(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n if (found === undefined) {\r\n found = this.scope.findExtraLikeType(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n }\r\n if (found) {\r\n this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (type === undefined) {\r\n type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {\r\n this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n while (children.length > 0) {\r\n const child = children.shift();\r\n if (child.getFirstToken().getStr() === \"-\") {\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n }\r\n else if (child.concatTokens() === \"[]\") {\r\n if (type instanceof Types.TableType) {\r\n type = new basic_1.TableType(type.getRowType(), { withHeader: false });\r\n }\r\n }\r\n else { // field name\r\n let sub = undefined;\r\n if (type instanceof Types.TableType) {\r\n type = type.getRowType();\r\n }\r\n if (type instanceof Types.StructureType) {\r\n sub = type.getComponentByName(child.getFirstToken().getStr());\r\n }\r\n if (sub === undefined) {\r\n return new Types.UnknownType(\"Type error, field not part of structure \" + fullName);\r\n }\r\n type = sub;\r\n }\r\n }\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else if (type instanceof basic_1.TableType\r\n && type.isWithHeader()\r\n && headerLogic === true) {\r\n type = type.getRowType();\r\n }\r\n else if (type instanceof Types.TableType\r\n && type.isWithHeader() === true\r\n && type.getRowType() instanceof Types.VoidType) {\r\n return type.getRowType();\r\n }\r\n }\r\n if (!type) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName2\");\r\n }\r\n return type;\r\n }\r\n resolveTypeName(typeName, length, decimals, qualifiedName) {\r\n var _a;\r\n if (typeName === undefined) {\r\n return undefined;\r\n }\r\n let chain = this.resolveTypeChain(typeName);\r\n if (chain) {\r\n if (chain instanceof basic_1.CharacterType && qualifiedName) {\r\n chain = chain.cloneType(qualifiedName);\r\n }\r\n return chain;\r\n }\r\n const chainText = typeName.concatTokens().toUpperCase();\r\n const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);\r\n if (f !== undefined) {\r\n return f;\r\n }\r\n const typ = this.scope.findType(chainText);\r\n if (typ) {\r\n const token = typeName.getFirstToken();\r\n if (chainText.includes(\"~\")) {\r\n const name = chainText.split(\"~\")[0];\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef) {\r\n this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: \"INTF\", ooName: name });\r\n }\r\n }\r\n this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);\r\n return typ.getType();\r\n }\r\n const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (type) {\r\n // this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);\r\n return type;\r\n }\r\n const ddic = this.scope.getDDIC().lookup(chainText);\r\n if (ddic) {\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });\r\n if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else if (ddic.type instanceof basic_1.VoidType) {\r\n this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n }\r\n return ddic.type;\r\n }\r\n return undefined;\r\n }\r\n simpleType(node, qualifiedNamePrefix) {\r\n let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (nameExpr === undefined) {\r\n nameExpr = node.findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (nameExpr === undefined) {\r\n return undefined;\r\n }\r\n let name = nameExpr.getFirstToken();\r\n if (nameExpr.countTokens() > 1) { // workaround for names with dashes\r\n name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());\r\n }\r\n let qualifiedName = undefined;\r\n if (node.get() instanceof Statements.Type) {\r\n if (this.scope.isTypePool() === true) {\r\n qualifiedName = name.getStr();\r\n }\r\n else {\r\n qualifiedName = (qualifiedNamePrefix || \"\") + name.getStr();\r\n if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || this.scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = this.scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n }\r\n }\r\n else if (qualifiedNamePrefix) {\r\n qualifiedName = qualifiedNamePrefix + qualifiedName;\r\n }\r\n const found = this.parseType(node, qualifiedName);\r\n if (found) {\r\n return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);\r\n }\r\n return undefined;\r\n }\r\n parseTable(node, name) {\r\n var _a, _b, _c;\r\n const typename = node.findFirstExpression(Expressions.TypeName);\r\n const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n let type = undefined;\r\n if (text.startsWith(\"TYPE STANDARD TABLE \") || text.startsWith(\"LIKE STANDARD TABLE \")) {\r\n type = basic_1.TableAccessType.standard;\r\n }\r\n else if (text.startsWith(\"TYPE SORTED TABLE \") || text.startsWith(\"LIKE SORTED TABLE \")) {\r\n type = basic_1.TableAccessType.sorted;\r\n }\r\n else if (text.startsWith(\"TYPE HASHED TABLE \") || text.startsWith(\"LIKE HASHED TABLE \")) {\r\n type = basic_1.TableAccessType.hashed;\r\n }\r\n const typeTableKeys = node.findAllExpressions(expressions_1.TypeTableKey);\r\n const firstKey = typeTableKeys[0];\r\n const primaryKey = {\r\n name: \"primary_key\",\r\n type: type,\r\n isUnique: (firstKey === null || firstKey === void 0 ? void 0 : firstKey.concatTokens().toUpperCase().includes(\"WITH UNIQUE \")) === true,\r\n keyFields: [],\r\n };\r\n for (const k of (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n primaryKey.keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n const secondaryKeys = [];\r\n for (let i = 1; i < typeTableKeys.length; i++) {\r\n const row = typeTableKeys[i];\r\n const name = (_b = row.findDirectExpression(expressions_1.Field)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (name === undefined) {\r\n continue;\r\n }\r\n const secondary = {\r\n name: name,\r\n type: row.findDirectTokenByText(\"SORTED\") ? basic_1.TableAccessType.sorted : basic_1.TableAccessType.hashed,\r\n isUnique: (row === null || row === void 0 ? void 0 : row.concatTokens().toUpperCase().includes(\"WITH UNIQUE \")) === true,\r\n keyFields: [],\r\n };\r\n for (const k of (row === null || row === void 0 ? void 0 : row.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n secondary.keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n secondaryKeys.push(secondary);\r\n }\r\n const options = {\r\n withHeader: text.includes(\" WITH HEADER LINE\"),\r\n primaryKey: primaryKey,\r\n secondary: secondaryKeys,\r\n };\r\n let found = undefined;\r\n if (text.startsWith(\"TYPE TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF REF TO \")) {\r\n found = this.resolveTypeRef(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE TABLE OF \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF \")) {\r\n found = this.resolveTypeName(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE TABLE OF \")\r\n || text.startsWith(\"LIKE STANDARD TABLE OF \")\r\n || text.startsWith(\"LIKE SORTED TABLE OF \")\r\n || text.startsWith(\"LIKE HASHED TABLE OF \")) {\r\n found = this.resolveLikeName(node);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), options);\r\n }\r\n else if (text.startsWith(\"TYPE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"TYPE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ]);\r\n return new Types.TableType(structure, options, name);\r\n }\r\n else if (text.startsWith(\"LIKE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n found = this.resolveLikeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"LIKE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ], name);\r\n return new Types.TableType(structure, options);\r\n }\r\n else if (typename && (text.startsWith(\"TYPE TABLE FOR CREATE \")\r\n || text.startsWith(\"TYPE TABLE FOR UPDATE \"))) {\r\n const name = typename.concatTokens();\r\n const type = (_c = this.scope.getDDIC().lookupDDLS(name)) === null || _c === void 0 ? void 0 : _c.type;\r\n if (type) {\r\n return new Types.TableType(new basic_1.VoidType(\"RapTodo\"), options);\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(name)) {\r\n return new Types.UnknownType(`DDLS ${name} not found`);\r\n }\r\n else {\r\n return new Types.VoidType(name);\r\n }\r\n }\r\n // fallback to old style syntax, OCCURS etc\r\n return this.parseType(node, name);\r\n }\r\n parseType(node, qualifiedName) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const typeName = node.findFirstExpression(Expressions.TypeName);\r\n let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();\r\n if ((text === null || text === void 0 ? void 0 : text.startsWith(\"TYPE\")) === false && (text === null || text === void 0 ? void 0 : text.startsWith(\"LIKE\")) === false) {\r\n text = \"TYPE\";\r\n }\r\n }\r\n if (text === undefined) {\r\n text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = \"TYPE\";\r\n }\r\n let found = undefined;\r\n if (text.startsWith(\"LIKE LINE OF \")) {\r\n const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n let e = node.findFirstExpression(Expressions.Type);\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n const type = this.resolveLikeName(e, false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n else if (type instanceof Types.TableType) {\r\n return type.getRowType();\r\n }\r\n else if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else {\r\n return new Types.UnknownType(\"Type error, not a table type \" + name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE REF TO \")) {\r\n const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n return new Types.DataReference(type, name);\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\") });\r\n }\r\n else if (text.startsWith(\"LIKE \")) {\r\n let sub = node.findFirstExpression(Expressions.Type);\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.TypeParam);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n found = this.resolveLikeName(sub);\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: text.includes(\"WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE LINE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\r\n found = found.getType();\r\n }\r\n if (found instanceof Types.TableType) {\r\n return found.getRowType();\r\n }\r\n else if (found instanceof Types.VoidType) {\r\n return found;\r\n }\r\n else if (found instanceof Types.UnknownType) {\r\n return new Types.UnknownType(\"TYPE LINE OF, unknown type, \" + found.getError());\r\n }\r\n else {\r\n return new Types.UnknownType(\"TYPE LINE OF, unexpected type, \" + (found === null || found === void 0 ? void 0 : found.constructor.name));\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE REF TO \")) {\r\n found = this.resolveTypeRef(typeName);\r\n }\r\n else if (text.startsWith(\"TYPE\")) {\r\n found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);\r\n const concat = node.concatTokens().toUpperCase();\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n else if (found && concat.includes(\" WITH HEADER LINE\")) {\r\n if (found instanceof Types.VoidType) {\r\n found = new Types.TableType(found, { withHeader: true });\r\n }\r\n else if (!(found instanceof Types.TableType)) {\r\n throw new Error(\"WITH HEADER LINE can only be used with internal table\");\r\n }\r\n else {\r\n found = new Types.TableType(found.getRowType(), { withHeader: true });\r\n }\r\n }\r\n if (found === undefined && typeName === undefined) {\r\n let length = 1;\r\n const len = node.findDirectExpression(Expressions.ConstantFieldLength);\r\n if (len) {\r\n const int = len.findDirectExpression(Expressions.Integer);\r\n if (int) {\r\n length = parseInt(int.concatTokens(), 10);\r\n }\r\n }\r\n found = new Types.CharacterType(length, qualifiedName); // fallback\r\n if (this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n /////////////////////\r\n isOccurs(node) {\r\n var _a;\r\n if (node.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // todo, rewrite this method\r\n resolveTypeChain(expr) {\r\n var _a;\r\n const chainText = expr.concatTokens().toUpperCase();\r\n if (chainText.includes(\"=>\") === false && chainText.includes(\"-\") === false) {\r\n return undefined;\r\n }\r\n let className;\r\n let rest = chainText;\r\n if (chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n else if (chainText.includes(\"->\")) {\r\n const split = chainText.split(\"->\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n const subs = rest.split(\"-\");\r\n let foundType = undefined;\r\n if (className && chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n const className = split[0];\r\n // the prefix might be itself\r\n if ((this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)\r\n && this.scope.getName().toUpperCase() === className.toUpperCase()) {\r\n const foundId = this.scope.findType(subs[0]);\r\n foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();\r\n if (foundType === undefined) {\r\n return new Types.UnknownType(\"Could not resolve type \" + chainText);\r\n }\r\n this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n // lookup in local and global scope\r\n const obj = this.scope.findObjectDefinition(className);\r\n if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });\r\n return new Types.VoidType(className);\r\n }\r\n else if (obj === undefined) {\r\n return new Types.UnknownType(\"Could not resolve top \" + className + \", resolveTypeChain\");\r\n }\r\n const type = obj instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(subs[0] + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n }\r\n else if (className && chainText.includes(\"->\")) {\r\n const varVar = this.scope.findVariable(className);\r\n const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();\r\n if (foo instanceof basic_1.ObjectReferenceType) {\r\n const typeName = subs[0];\r\n let id = foo.getIdentifier();\r\n if (!(id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(foo.getIdentifierName());\r\n if (found) {\r\n id = found;\r\n }\r\n else {\r\n return new Types.UnknownType(foo.getIdentifierName() + \" not found in scope\");\r\n }\r\n }\r\n if (id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition) {\r\n const type = id instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(typeName + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n return new Types.UnknownType(\"Not an object reference, \" + className + \", \" + id.constructor.name);\r\n }\r\n }\r\n else if (foo === undefined) {\r\n return new Types.UnknownType(className + \" not found in scope\");\r\n }\r\n else {\r\n return new Types.UnknownType(\"Not an object reference, \" + className + \", \" + foo.constructor.name);\r\n }\r\n }\r\n else {\r\n const found = this.scope.findType(subs[0]);\r\n foundType = found === null || found === void 0 ? void 0 : found.getType();\r\n if (foundType === undefined) {\r\n const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (typePoolType) {\r\n // this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);\r\n foundType = typePoolType;\r\n }\r\n if (foundType === undefined) {\r\n const f = this.scope.getDDIC().lookupTableOrView(subs[0]);\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });\r\n if (f.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n foundType = f.type.getType();\r\n }\r\n else {\r\n foundType = f.type;\r\n }\r\n }\r\n }\r\n else {\r\n this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(subs[0]);\r\n }\r\n else if (foundType instanceof Types.VoidType) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return foundType;\r\n }\r\n else if (foundType === undefined) {\r\n return new Types.UnknownType(\"Unknown type \" + subs[0]);\r\n }\r\n }\r\n subs.shift();\r\n while (subs.length > 0) {\r\n if (foundType instanceof Types.UnknownType\r\n || foundType instanceof Types.VoidType) {\r\n return foundType;\r\n }\r\n else if (!(foundType instanceof Types.StructureType)) {\r\n return new Types.UnknownType(\"Not a structured type\");\r\n }\r\n foundType = foundType.getComponentByName(subs[0]);\r\n subs.shift();\r\n }\r\n return foundType;\r\n }\r\n resolveConstantValue(expr) {\r\n var _a, _b;\r\n if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {\r\n throw new Error(\"resolveConstantValue\");\r\n }\r\n const firstNode = expr.getFirstChild();\r\n const firstToken = firstNode.getFirstToken();\r\n const firstName = firstToken.getStr();\r\n if (firstNode.get() instanceof Expressions.Field) {\r\n const found = this.scope.findVariable(firstName);\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName\r\n && firstName.toLowerCase() === this.scope.getName().toLowerCase()\r\n && (this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {\r\n const children = expr.getChildren();\r\n const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const found = this.scope.findVariable(token.getStr());\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName) {\r\n const obj = this.scope.findObjectDefinition(firstName);\r\n if (obj === undefined) {\r\n if (this.scope.existsObject(firstName).found === true) {\r\n return undefined;\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {\r\n throw new Error(\"resolveConstantValue, not found: \" + firstName);\r\n }\r\n else {\r\n this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });\r\n return undefined;\r\n }\r\n }\r\n const children = expr.getChildren();\r\n const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const attr = token.getStr();\r\n const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);\r\n if (c instanceof class_constant_1.ClassConstant) {\r\n this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n const val = c.getValue();\r\n if (typeof val === \"string\") {\r\n return val;\r\n }\r\n else if (typeof val === \"object\" && children[4]) {\r\n const name = children[4].getFirstToken().getStr();\r\n if (val[name] !== undefined) {\r\n return val[name];\r\n }\r\n }\r\n return undefined;\r\n }\r\n throw new Error(\"resolveConstantValue, constant not found \" + attr);\r\n }\r\n else {\r\n throw new Error(\"resolveConstantValue, unexpected structure\");\r\n }\r\n }\r\n resolveTypeRef(chain) {\r\n var _a;\r\n if (chain === undefined) {\r\n return undefined;\r\n }\r\n const name = chain.getFirstToken().getStr();\r\n if (chain.getAllTokens().length === 1) {\r\n if (name.toUpperCase() === \"OBJECT\") {\r\n return new Types.GenericObjectReferenceType();\r\n }\r\n const search = this.scope.existsObject(name);\r\n if (search.found === true && search.id) {\r\n this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });\r\n return new Types.ObjectReferenceType(search.id, name);\r\n }\r\n }\r\n const found = this.resolveTypeName(chain);\r\n if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {\r\n return new Types.DataReference(found);\r\n }\r\n else if (chain.concatTokens().toUpperCase() === \"DATA\") {\r\n return new Types.DataReference(new Types.AnyType());\r\n }\r\n if (this.scope.isBadiDef(name) === true) {\r\n return new Types.VoidType(name);\r\n }\r\n if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {\r\n // this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n return new Types.UnknownType(\"REF, unable to resolve \" + name);\r\n }\r\n findValue(node) {\r\n const val = node.findFirstExpression(Expressions.Value);\r\n if (val === undefined) {\r\n throw new Error(\"VALUE missing in expression\");\r\n }\r\n if (val.concatTokens().toUpperCase() === \"VALUE IS INITIAL\") {\r\n return undefined;\r\n }\r\n const constant = val.findFirstExpression(Expressions.Constant);\r\n if (constant) {\r\n return constant.concatTokens();\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n return this.resolveConstantValue(chain);\r\n }\r\n throw new Error(\"findValue, unexpected\");\r\n }\r\n findDecimals(node) {\r\n var _a, _b;\r\n const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (dec) {\r\n return parseInt(dec, 10);\r\n }\r\n return undefined;\r\n }\r\n findLength(node) {\r\n const val = node.findFirstExpression(Expressions.Length);\r\n const flen = node.findFirstExpression(Expressions.ConstantFieldLength);\r\n if (val && flen) {\r\n throw new Error(\"Only specify length once\");\r\n }\r\n if (flen) {\r\n const cintExpr = flen.findFirstExpression(Expressions.Integer);\r\n if (cintExpr) {\r\n return this.parseInt(cintExpr.concatTokens());\r\n }\r\n const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (cchain) {\r\n const val = this.resolveConstantValue(cchain);\r\n return this.parseInt(val);\r\n }\r\n }\r\n if (val === undefined) {\r\n return 1;\r\n }\r\n const intExpr = val.findFirstExpression(Expressions.Integer);\r\n if (intExpr) {\r\n return this.parseInt(intExpr.concatTokens());\r\n }\r\n const strExpr = val.findFirstExpression(Expressions.ConstantString);\r\n if (strExpr) {\r\n return this.parseInt(strExpr.concatTokens());\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n const val = this.resolveConstantValue(chain);\r\n return this.parseInt(val);\r\n }\r\n throw new Error(\"Unexpected, findLength\");\r\n }\r\n parseInt(text) {\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n if (text.startsWith(\"'\")) {\r\n text = text.split(\"'\")[1];\r\n }\r\n else if (text.startsWith(\"`\")) {\r\n text = text.split(\"`\")[1];\r\n }\r\n return parseInt(text, 10);\r\n }\r\n}\r\nexports.BasicTypes = BasicTypes;\r\n//# sourceMappingURL=basic_types.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js?");
6718
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BasicTypes = void 0;\r\n/* eslint-disable default-case */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Types = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ../types/class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst identifier_1 = __webpack_require__(/*! ../1_lexer/tokens/identifier */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ./_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./expressions/field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ./_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass BasicTypes {\r\n constructor(filename, scope) {\r\n this.filename = filename;\r\n this.scope = scope;\r\n }\r\n lookupQualifiedName(name) {\r\n var _a;\r\n // argh, todo, rewrite this entire method, more argh\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const found = this.scope.findType(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (name.includes(\"=>\")) {\r\n const split = name.split(\"=>\");\r\n const ooName = split[0];\r\n const typeName = split[1];\r\n const oo = this.scope.findObjectDefinition(ooName);\r\n if (oo) {\r\n if (typeName.includes(\"-\")) {\r\n const split = typeName.split(\"-\");\r\n const subTypeName = split[0];\r\n const fieldName = split[1];\r\n const stru = oo.getTypeDefinitions().getByName(subTypeName);\r\n const struType = stru === null || stru === void 0 ? void 0 : stru.getType();\r\n if (stru && struType instanceof basic_1.StructureType) {\r\n const f = struType.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);\r\n }\r\n }\r\n }\r\n else {\r\n const f = oo.getTypeDefinitions().getByName(typeName);\r\n if (f) {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n else if (name.includes(\"-\")) {\r\n const split = name.split(\"-\");\r\n const typeName = split[0];\r\n const fieldName = split[1];\r\n const type = this.scope.findType(typeName);\r\n if (type) {\r\n const stru = type.getType();\r\n if (stru instanceof basic_1.StructureType) {\r\n const f = stru.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);\r\n }\r\n }\r\n }\r\n }\r\n const lookup = this.scope.getDDIC().lookupNoVoid(name);\r\n const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();\r\n if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {\r\n return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);\r\n }\r\n const builtin = this.scope.getDDIC().lookupBuiltinType(name);\r\n if (builtin) {\r\n return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);\r\n }\r\n const type = this.scope.findTypePoolType(name);\r\n if (type) {\r\n return type;\r\n }\r\n return undefined;\r\n }\r\n resolveLikeName(node, headerLogic = true) {\r\n var _a;\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n let chain = node.findFirstExpression(Expressions.FieldChain);\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.TypeName);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.FieldSub);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n }\r\n if (chain === undefined) {\r\n throw new Error(\"resolveLikeName, chain undefined\");\r\n }\r\n const fullName = chain.concatTokens();\r\n const children = [...chain.getChildren()];\r\n if (children.length === 0) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName1\");\r\n }\r\n let type = undefined;\r\n if (children[1] && (children[1].getFirstToken().getStr() === \"=>\" || children[1].getFirstToken().getStr() === \"->\")) {\r\n type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);\r\n }\r\n else {\r\n const name = children.shift().getFirstToken().getStr();\r\n let found = this.scope.findVariable(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n if (found === undefined) {\r\n found = this.scope.findExtraLikeType(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n }\r\n if (found) {\r\n this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (type === undefined) {\r\n type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {\r\n this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n while (children.length > 0) {\r\n const child = children.shift();\r\n if (child.getFirstToken().getStr() === \"-\") {\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n }\r\n else if (child.concatTokens() === \"[]\") {\r\n if (type instanceof Types.TableType) {\r\n type = new basic_1.TableType(type.getRowType(), { withHeader: false });\r\n }\r\n }\r\n else { // field name\r\n let sub = undefined;\r\n if (type instanceof Types.TableType) {\r\n type = type.getRowType();\r\n }\r\n if (type instanceof Types.StructureType) {\r\n sub = type.getComponentByName(child.getFirstToken().getStr());\r\n }\r\n if (sub === undefined) {\r\n return new Types.UnknownType(\"Type error, field not part of structure \" + fullName);\r\n }\r\n type = sub;\r\n }\r\n }\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else if (type instanceof basic_1.TableType\r\n && type.isWithHeader()\r\n && headerLogic === true) {\r\n type = type.getRowType();\r\n }\r\n else if (type instanceof Types.TableType\r\n && type.isWithHeader() === true\r\n && type.getRowType() instanceof Types.VoidType) {\r\n return type.getRowType();\r\n }\r\n }\r\n if (!type) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName2\");\r\n }\r\n return type;\r\n }\r\n resolveTypeName(typeName, length, decimals, qualifiedName) {\r\n var _a;\r\n if (typeName === undefined) {\r\n return undefined;\r\n }\r\n let chain = this.resolveTypeChain(typeName);\r\n if (chain) {\r\n if (chain instanceof basic_1.CharacterType && qualifiedName) {\r\n chain = chain.cloneType(qualifiedName);\r\n }\r\n return chain;\r\n }\r\n const chainText = typeName.concatTokens().toUpperCase();\r\n const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);\r\n if (f !== undefined) {\r\n return f;\r\n }\r\n const typ = this.scope.findType(chainText);\r\n if (typ) {\r\n const token = typeName.getFirstToken();\r\n if (chainText.includes(\"~\")) {\r\n const name = chainText.split(\"~\")[0];\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef) {\r\n this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: \"INTF\", ooName: name });\r\n }\r\n }\r\n this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);\r\n return typ.getType();\r\n }\r\n const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (type) {\r\n // this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);\r\n return type;\r\n }\r\n const ddic = this.scope.getDDIC().lookup(chainText);\r\n if (ddic) {\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });\r\n if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else if (ddic.type instanceof basic_1.VoidType) {\r\n this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n }\r\n return ddic.type;\r\n }\r\n return undefined;\r\n }\r\n simpleType(node, qualifiedNamePrefix) {\r\n let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (nameExpr === undefined) {\r\n nameExpr = node.findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (nameExpr === undefined) {\r\n return undefined;\r\n }\r\n let name = nameExpr.getFirstToken();\r\n if (nameExpr.countTokens() > 1) { // workaround for names with dashes\r\n name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());\r\n }\r\n let qualifiedName = undefined;\r\n if (node.get() instanceof Statements.Type) {\r\n if (this.scope.isTypePool() === true) {\r\n qualifiedName = name.getStr();\r\n }\r\n else {\r\n qualifiedName = (qualifiedNamePrefix || \"\") + name.getStr();\r\n if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || this.scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = this.scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n }\r\n }\r\n else if (qualifiedNamePrefix) {\r\n qualifiedName = qualifiedNamePrefix + qualifiedName;\r\n }\r\n const found = this.parseType(node, qualifiedName);\r\n if (found) {\r\n return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);\r\n }\r\n return undefined;\r\n }\r\n parseTable(node, name) {\r\n var _a, _b, _c;\r\n const typename = node.findFirstExpression(Expressions.TypeName);\r\n const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n let type = undefined;\r\n if (text.startsWith(\"TYPE STANDARD TABLE \") || text.startsWith(\"LIKE STANDARD TABLE \")) {\r\n type = basic_1.TableAccessType.standard;\r\n }\r\n else if (text.startsWith(\"TYPE SORTED TABLE \") || text.startsWith(\"LIKE SORTED TABLE \")) {\r\n type = basic_1.TableAccessType.sorted;\r\n }\r\n else if (text.startsWith(\"TYPE HASHED TABLE \") || text.startsWith(\"LIKE HASHED TABLE \")) {\r\n type = basic_1.TableAccessType.hashed;\r\n }\r\n const typeTableKeys = node.findAllExpressions(expressions_1.TypeTableKey);\r\n const firstKey = typeTableKeys[0];\r\n const primaryKey = {\r\n name: \"primary_key\",\r\n type: type,\r\n isUnique: (firstKey === null || firstKey === void 0 ? void 0 : firstKey.concatTokens().toUpperCase().includes(\"WITH UNIQUE \")) === true,\r\n keyFields: [],\r\n };\r\n for (const k of (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n primaryKey.keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n const secondaryKeys = [];\r\n for (let i = 1; i < typeTableKeys.length; i++) {\r\n const row = typeTableKeys[i];\r\n const name = (_b = row.findDirectExpression(expressions_1.Field)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (name === undefined) {\r\n continue;\r\n }\r\n const secondary = {\r\n name: name,\r\n type: row.findDirectTokenByText(\"SORTED\") ? basic_1.TableAccessType.sorted : basic_1.TableAccessType.hashed,\r\n isUnique: (row === null || row === void 0 ? void 0 : row.concatTokens().toUpperCase().includes(\"WITH UNIQUE \")) === true,\r\n keyFields: [],\r\n };\r\n for (const k of (row === null || row === void 0 ? void 0 : row.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n secondary.keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n secondaryKeys.push(secondary);\r\n }\r\n const options = {\r\n withHeader: text.includes(\" WITH HEADER LINE\"),\r\n primaryKey: primaryKey,\r\n secondary: secondaryKeys,\r\n };\r\n let found = undefined;\r\n if (text.startsWith(\"TYPE TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF REF TO \")) {\r\n found = this.resolveTypeRef(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE TABLE OF \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF \")) {\r\n found = this.resolveTypeName(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE TABLE OF \")\r\n || text.startsWith(\"LIKE STANDARD TABLE OF \")\r\n || text.startsWith(\"LIKE SORTED TABLE OF \")\r\n || text.startsWith(\"LIKE HASHED TABLE OF \")) {\r\n found = this.resolveLikeName(node);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), options);\r\n }\r\n else if (text.startsWith(\"TYPE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"TYPE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ]);\r\n return new Types.TableType(structure, options, name);\r\n }\r\n else if (text.startsWith(\"LIKE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n found = this.resolveLikeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"LIKE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ], name);\r\n return new Types.TableType(structure, options);\r\n }\r\n else if (typename && (text.startsWith(\"TYPE TABLE FOR CREATE \")\r\n || text.startsWith(\"TYPE TABLE FOR UPDATE \"))) {\r\n const name = typename.concatTokens();\r\n const type = (_c = this.scope.getDDIC().lookupDDLS(name)) === null || _c === void 0 ? void 0 : _c.type;\r\n if (type) {\r\n return new Types.TableType(new basic_1.VoidType(\"RapTodo\"), options);\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(name)) {\r\n return new Types.UnknownType(`DDLS ${name} not found`);\r\n }\r\n else {\r\n return new Types.VoidType(name);\r\n }\r\n }\r\n // fallback to old style syntax, OCCURS etc\r\n return this.parseType(node, name);\r\n }\r\n parseType(node, qualifiedName) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const typeName = node.findFirstExpression(Expressions.TypeName);\r\n let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();\r\n if ((text === null || text === void 0 ? void 0 : text.startsWith(\"TYPE\")) === false && (text === null || text === void 0 ? void 0 : text.startsWith(\"LIKE\")) === false) {\r\n text = \"TYPE\";\r\n }\r\n }\r\n if (text === undefined) {\r\n text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = \"TYPE\";\r\n }\r\n let found = undefined;\r\n if (text.startsWith(\"LIKE LINE OF \")) {\r\n const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n let e = node.findFirstExpression(Expressions.Type);\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n const type = this.resolveLikeName(e, false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n else if (type instanceof Types.TableType) {\r\n return type.getRowType();\r\n }\r\n else if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else {\r\n return new Types.UnknownType(\"Type error, not a table type \" + name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE REF TO \")) {\r\n const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n return new Types.DataReference(type, name);\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\") });\r\n }\r\n else if (text.startsWith(\"LIKE \")) {\r\n let sub = node.findFirstExpression(Expressions.Type);\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.TypeParam);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n found = this.resolveLikeName(sub);\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: text.includes(\"WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE LINE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\r\n found = found.getType();\r\n }\r\n if (found instanceof Types.TableType) {\r\n return found.getRowType();\r\n }\r\n else if (found instanceof Types.VoidType) {\r\n return found;\r\n }\r\n else if (found instanceof Types.UnknownType) {\r\n return new Types.UnknownType(\"TYPE LINE OF, unknown type, \" + found.getError());\r\n }\r\n else {\r\n return new Types.UnknownType(\"TYPE LINE OF, unexpected type, \" + (found === null || found === void 0 ? void 0 : found.constructor.name));\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE REF TO \")) {\r\n found = this.resolveTypeRef(typeName);\r\n }\r\n else if (text.startsWith(\"TYPE\")) {\r\n found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);\r\n const concat = node.concatTokens().toUpperCase();\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n else if (found && concat.includes(\" WITH HEADER LINE\")) {\r\n if (found instanceof Types.VoidType) {\r\n found = new Types.TableType(found, { withHeader: true });\r\n }\r\n else if (!(found instanceof Types.TableType)) {\r\n throw new Error(\"WITH HEADER LINE can only be used with internal table\");\r\n }\r\n else {\r\n found = new Types.TableType(found.getRowType(), { withHeader: true });\r\n }\r\n }\r\n if (found === undefined && typeName === undefined) {\r\n let length = 1;\r\n const len = node.findDirectExpression(Expressions.ConstantFieldLength);\r\n if (len) {\r\n const int = len.findDirectExpression(Expressions.Integer);\r\n if (int) {\r\n length = parseInt(int.concatTokens(), 10);\r\n }\r\n }\r\n found = new Types.CharacterType(length, { qualifiedName: qualifiedName }); // fallback\r\n if (this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n /////////////////////\r\n isOccurs(node) {\r\n var _a;\r\n if (node.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // todo, rewrite this method\r\n resolveTypeChain(expr) {\r\n var _a;\r\n const chainText = expr.concatTokens().toUpperCase();\r\n if (chainText.includes(\"=>\") === false && chainText.includes(\"-\") === false) {\r\n return undefined;\r\n }\r\n let className;\r\n let rest = chainText;\r\n if (chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n else if (chainText.includes(\"->\")) {\r\n const split = chainText.split(\"->\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n const subs = rest.split(\"-\");\r\n let foundType = undefined;\r\n if (className && chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n const className = split[0];\r\n // the prefix might be itself\r\n if ((this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)\r\n && this.scope.getName().toUpperCase() === className.toUpperCase()) {\r\n const foundId = this.scope.findType(subs[0]);\r\n foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();\r\n if (foundType === undefined) {\r\n return new Types.UnknownType(\"Could not resolve type \" + chainText);\r\n }\r\n this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n // lookup in local and global scope\r\n const obj = this.scope.findObjectDefinition(className);\r\n if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });\r\n return new Types.VoidType(className);\r\n }\r\n else if (obj === undefined) {\r\n return new Types.UnknownType(\"Could not resolve top \" + className + \", resolveTypeChain\");\r\n }\r\n const type = obj instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(subs[0] + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n }\r\n else if (className && chainText.includes(\"->\")) {\r\n const varVar = this.scope.findVariable(className);\r\n const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();\r\n if (foo instanceof basic_1.ObjectReferenceType) {\r\n const typeName = subs[0];\r\n let id = foo.getIdentifier();\r\n if (!(id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(foo.getIdentifierName());\r\n if (found) {\r\n id = found;\r\n }\r\n else {\r\n return new Types.UnknownType(foo.getIdentifierName() + \" not found in scope\");\r\n }\r\n }\r\n if (id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition) {\r\n const type = id instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(typeName + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n return new Types.UnknownType(\"Not an object reference, \" + className + \", \" + id.constructor.name);\r\n }\r\n }\r\n else if (foo === undefined) {\r\n return new Types.UnknownType(className + \" not found in scope\");\r\n }\r\n else {\r\n return new Types.UnknownType(\"Not an object reference, \" + className + \", \" + foo.constructor.name);\r\n }\r\n }\r\n else {\r\n const found = this.scope.findType(subs[0]);\r\n foundType = found === null || found === void 0 ? void 0 : found.getType();\r\n if (foundType === undefined) {\r\n const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (typePoolType) {\r\n // this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);\r\n foundType = typePoolType;\r\n }\r\n if (foundType === undefined) {\r\n const f = this.scope.getDDIC().lookupTableOrView(subs[0]);\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });\r\n if (f.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n foundType = f.type.getType();\r\n }\r\n else {\r\n foundType = f.type;\r\n }\r\n }\r\n }\r\n else {\r\n this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(subs[0]);\r\n }\r\n else if (foundType instanceof Types.VoidType) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return foundType;\r\n }\r\n else if (foundType === undefined) {\r\n return new Types.UnknownType(\"Unknown type \" + subs[0]);\r\n }\r\n }\r\n subs.shift();\r\n while (subs.length > 0) {\r\n if (foundType instanceof Types.UnknownType\r\n || foundType instanceof Types.VoidType) {\r\n return foundType;\r\n }\r\n else if (!(foundType instanceof Types.StructureType)) {\r\n return new Types.UnknownType(\"Not a structured type\");\r\n }\r\n foundType = foundType.getComponentByName(subs[0]);\r\n subs.shift();\r\n }\r\n return foundType;\r\n }\r\n resolveConstantValue(expr) {\r\n var _a, _b;\r\n if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {\r\n throw new Error(\"resolveConstantValue\");\r\n }\r\n const firstNode = expr.getFirstChild();\r\n const firstToken = firstNode.getFirstToken();\r\n const firstName = firstToken.getStr();\r\n if (firstNode.get() instanceof Expressions.Field) {\r\n const found = this.scope.findVariable(firstName);\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName\r\n && firstName.toLowerCase() === this.scope.getName().toLowerCase()\r\n && (this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {\r\n const children = expr.getChildren();\r\n const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const found = this.scope.findVariable(token.getStr());\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName) {\r\n const obj = this.scope.findObjectDefinition(firstName);\r\n if (obj === undefined) {\r\n if (this.scope.existsObject(firstName).found === true) {\r\n return undefined;\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {\r\n throw new Error(\"resolveConstantValue, not found: \" + firstName);\r\n }\r\n else {\r\n this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });\r\n return undefined;\r\n }\r\n }\r\n const children = expr.getChildren();\r\n const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const attr = token.getStr();\r\n const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);\r\n if (c instanceof class_constant_1.ClassConstant) {\r\n this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n const val = c.getValue();\r\n if (typeof val === \"string\") {\r\n return val;\r\n }\r\n else if (typeof val === \"object\" && children[4]) {\r\n const name = children[4].getFirstToken().getStr();\r\n if (val[name] !== undefined) {\r\n return val[name];\r\n }\r\n }\r\n return undefined;\r\n }\r\n throw new Error(\"resolveConstantValue, constant not found \" + attr);\r\n }\r\n else {\r\n throw new Error(\"resolveConstantValue, unexpected structure\");\r\n }\r\n }\r\n resolveTypeRef(chain) {\r\n var _a;\r\n if (chain === undefined) {\r\n return undefined;\r\n }\r\n const name = chain.getFirstToken().getStr();\r\n if (chain.getAllTokens().length === 1) {\r\n if (name.toUpperCase() === \"OBJECT\") {\r\n return new Types.GenericObjectReferenceType();\r\n }\r\n const search = this.scope.existsObject(name);\r\n if (search.found === true && search.id) {\r\n this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });\r\n return new Types.ObjectReferenceType(search.id, name);\r\n }\r\n }\r\n const found = this.resolveTypeName(chain);\r\n if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {\r\n return new Types.DataReference(found);\r\n }\r\n else if (chain.concatTokens().toUpperCase() === \"DATA\") {\r\n return new Types.DataReference(new Types.AnyType());\r\n }\r\n if (this.scope.isBadiDef(name) === true) {\r\n return new Types.VoidType(name);\r\n }\r\n if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {\r\n // this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n return new Types.UnknownType(\"REF, unable to resolve \" + name);\r\n }\r\n findValue(node) {\r\n const val = node.findFirstExpression(Expressions.Value);\r\n if (val === undefined) {\r\n throw new Error(\"VALUE missing in expression\");\r\n }\r\n if (val.concatTokens().toUpperCase() === \"VALUE IS INITIAL\") {\r\n return undefined;\r\n }\r\n const constant = val.findFirstExpression(Expressions.Constant);\r\n if (constant) {\r\n return constant.concatTokens();\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n return this.resolveConstantValue(chain);\r\n }\r\n throw new Error(\"findValue, unexpected\");\r\n }\r\n findDecimals(node) {\r\n var _a, _b;\r\n const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (dec) {\r\n return parseInt(dec, 10);\r\n }\r\n return undefined;\r\n }\r\n findLength(node) {\r\n const val = node.findFirstExpression(Expressions.Length);\r\n const flen = node.findFirstExpression(Expressions.ConstantFieldLength);\r\n if (val && flen) {\r\n throw new Error(\"Only specify length once\");\r\n }\r\n if (flen) {\r\n const cintExpr = flen.findFirstExpression(Expressions.Integer);\r\n if (cintExpr) {\r\n return this.parseInt(cintExpr.concatTokens());\r\n }\r\n const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (cchain) {\r\n const val = this.resolveConstantValue(cchain);\r\n return this.parseInt(val);\r\n }\r\n }\r\n if (val === undefined) {\r\n return 1;\r\n }\r\n const intExpr = val.findFirstExpression(Expressions.Integer);\r\n if (intExpr) {\r\n return this.parseInt(intExpr.concatTokens());\r\n }\r\n const strExpr = val.findFirstExpression(Expressions.ConstantString);\r\n if (strExpr) {\r\n return this.parseInt(strExpr.concatTokens());\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n const val = this.resolveConstantValue(chain);\r\n return this.parseInt(val);\r\n }\r\n throw new Error(\"Unexpected, findLength\");\r\n }\r\n parseInt(text) {\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n if (text.startsWith(\"'\")) {\r\n text = text.split(\"'\")[1];\r\n }\r\n else if (text.startsWith(\"`\")) {\r\n text = text.split(\"`\")[1];\r\n }\r\n return parseInt(text, 10);\r\n }\r\n}\r\nexports.BasicTypes = BasicTypes;\r\n//# sourceMappingURL=basic_types.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js?");
6719
6719
 
6720
6720
  /***/ }),
6721
6721
 
@@ -6847,7 +6847,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6847
6847
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6848
6848
 
6849
6849
  "use strict";
6850
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Constant = void 0;\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass Constant {\r\n runSyntax(node) {\r\n if (node.findDirectExpression(expressions_1.Integer)) {\r\n return new basic_1.IntegerType(\"I\");\r\n }\r\n else if (node.getFirstToken().getStr().startsWith(\"'\")) {\r\n let len = node.getFirstToken().getStr().length - 2;\r\n if (len <= 0) {\r\n len = 1;\r\n }\r\n return new basic_1.CharacterType(len);\r\n }\r\n else {\r\n return new basic_1.StringType(\"STRING\");\r\n }\r\n }\r\n}\r\nexports.Constant = Constant;\r\n//# sourceMappingURL=constant.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js?");
6850
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Constant = void 0;\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass Constant {\r\n runSyntax(node) {\r\n if (node.findDirectExpression(expressions_1.Integer)) {\r\n return new basic_1.IntegerType({ qualifiedName: \"I\" });\r\n }\r\n else if (node.getFirstToken().getStr().startsWith(\"'\")) {\r\n let len = node.getFirstToken().getStr().length - 2;\r\n if (len <= 0) {\r\n len = 1;\r\n }\r\n return new basic_1.CharacterType(len);\r\n }\r\n else {\r\n return new basic_1.StringType({ qualifiedName: \"STRING\" });\r\n }\r\n }\r\n}\r\nexports.Constant = Constant;\r\n//# sourceMappingURL=constant.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js?");
6851
6851
 
6852
6852
  /***/ }),
6853
6853
 
@@ -7243,7 +7243,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
7243
7243
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7244
7244
 
7245
7245
  "use strict";
7246
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Source = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst method_call_chain_1 = __webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_chain.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst constant_1 = __webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js\");\r\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\r\nconst component_chain_1 = __webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_chain.js\");\r\nconst string_template_1 = __webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/string_template.js\");\r\nconst value_body_1 = __webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/value_body.js\");\r\nconst cond_1 = __webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/cond.js\");\r\nconst reduce_body_1 = __webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/reduce_body.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst switch_body_1 = __webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/switch_body.js\");\r\nconst cond_body_1 = __webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/cond_body.js\");\r\nconst conv_body_1 = __webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/conv_body.js\");\r\nconst filter_body_1 = __webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/filter_body.js\");\r\nconst corresponding_body_1 = __webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/corresponding_body.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst attribute_chain_1 = __webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_chain.js\");\r\nconst dereference_1 = __webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dereference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\n/*\r\n* Type interference, valid scenarios:\r\n* typed = VALUE #( ... ). right hand side must follow left hand type\r\n* DATA(bar) = VALUE type( ... ). left gets the type of rigthand\r\n* typed = VALUE type( ... ). types must match and be compatible???\r\n************* ERRORS *********\r\n* VALUE #( ... ). syntax error\r\n* DATA(bar) = VALUE #( ... ). give error, no type can be derived\r\n*/\r\nclass Source {\r\n runSyntax(node, scope, filename, targetType) {\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n const children = node.getChildren().slice();\r\n let first = children.shift();\r\n if (first instanceof nodes_1.TokenNode) {\r\n const token = first.getFirstToken();\r\n const tok = token.getStr().toUpperCase();\r\n switch (tok) {\r\n case \"(\":\r\n case \"-\":\r\n break;\r\n case \"BOOLC\":\r\n {\r\n const method = new _builtin_1.BuiltIn().searchBuiltin(tok);\r\n scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);\r\n new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);\r\n return new basic_1.StringType();\r\n }\r\n case \"XSDBOOL\":\r\n {\r\n const method = new _builtin_1.BuiltIn().searchBuiltin(tok);\r\n scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);\r\n new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);\r\n return new basic_1.CharacterType(1, \"ABAP_BOOL\");\r\n }\r\n case \"REDUCE\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"SWITCH\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new switch_body_1.SwitchBody().runSyntax(node.findDirectExpression(Expressions.SwitchBody), scope, filename);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"COND\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), scope, filename, foundType);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"CONV\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), scope, filename);\r\n return foundType;\r\n }\r\n case \"REF\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const s = new Source().runSyntax(node.findDirectExpression(Expressions.Source), scope, filename);\r\n if (foundType === undefined && s) {\r\n return new basic_1.DataReference(s);\r\n }\r\n else {\r\n return foundType;\r\n }\r\n }\r\n case \"FILTER\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new filter_body_1.FilterBody().runSyntax(node.findDirectExpression(Expressions.FilterBody), scope, filename, foundType);\r\n if (foundType === undefined || foundType.isGeneric()) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n else {\r\n this.addIfInferred(node, scope, filename, foundType);\r\n }\r\n if (foundType && !(foundType instanceof unknown_type_1.UnknownType)) {\r\n return foundType;\r\n }\r\n else {\r\n return bodyType;\r\n }\r\n }\r\n case \"CORRESPONDING\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n return new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);\r\n }\r\n case \"EXACT\":\r\n return this.determineType(node, scope, filename, targetType);\r\n case \"VALUE\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new value_body_1.ValueBody().runSyntax(node.findDirectExpression(Expressions.ValueBody), scope, filename, foundType);\r\n if (foundType === undefined || foundType.isGeneric()) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n else {\r\n this.addIfInferred(node, scope, filename, foundType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n default:\r\n return new unknown_type_1.UnknownType(\"todo, Source type \" + tok);\r\n }\r\n }\r\n else if (first === undefined || !(first instanceof nodes_1.ExpressionNode)) {\r\n return undefined;\r\n }\r\n let context = new unknown_type_1.UnknownType(\"todo, Source type\");\r\n while (children.length >= 0) {\r\n if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {\r\n context = new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename, targetType);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {\r\n context = new field_chain_1.FieldChain().runSyntax(first, scope, filename, _reference_1.ReferenceType.DataReadReference);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.StringTemplate) {\r\n context = new string_template_1.StringTemplate().runSyntax(first, scope, filename);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Source) {\r\n context = new Source().runSyntax(first, scope, filename);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Constant) {\r\n context = new constant_1.Constant().runSyntax(first);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Dereference) {\r\n context = new dereference_1.Dereference().runSyntax(context);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ArrowOrDash) {\r\n // console.dir(\"dash\");\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ComponentChain) {\r\n context = new component_chain_1.ComponentChain().runSyntax(context, first);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.AttributeChain) {\r\n context = new attribute_chain_1.AttributeChain().runSyntax(context, first, scope, filename, _reference_1.ReferenceType.DataReadReference);\r\n }\r\n first = children.shift();\r\n if (first === undefined) {\r\n break;\r\n }\r\n }\r\n if (node.findDirectTokenByText(\"&&\")) {\r\n return new basic_1.StringType();\r\n }\r\n return context;\r\n }\r\n ////////////////////////////////\r\n addIfInferred(node, scope, filename, inferredType) {\r\n const basic = new basic_types_1.BasicTypes(filename, scope);\r\n const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);\r\n const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();\r\n const typeName = typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr();\r\n if (typeName === \"#\" && inferredType && typeToken) {\r\n const found = basic.lookupQualifiedName(inferredType.getQualifiedName());\r\n if (found) {\r\n scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n else if (inferredType instanceof basic_1.ObjectReferenceType) {\r\n const def = scope.findObjectDefinition(inferredType.getQualifiedName());\r\n if (def) {\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, inferredType);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n }\r\n else if (inferredType instanceof basic_1.CharacterType) {\r\n // character is bit special it does not have a qualified name eg \"TYPE c LENGTH 6\"\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, inferredType);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n }\r\n }\r\n determineType(node, scope, filename, targetType) {\r\n const basic = new basic_types_1.BasicTypes(filename, scope);\r\n const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);\r\n const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();\r\n const typeName = typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr();\r\n if (typeExpression === undefined) {\r\n throw new Error(\"determineType, child TypeNameOrInfer not found\");\r\n }\r\n else if (typeName === \"#\" && targetType) {\r\n const found = basic.lookupQualifiedName(targetType.getQualifiedName());\r\n if (found) {\r\n scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n return targetType;\r\n }\r\n if (typeName !== \"#\" && typeToken) {\r\n const found = basic.parseType(typeExpression);\r\n if (found && found instanceof unknown_type_1.UnknownType) {\r\n if (scope.getDDIC().inErrorNamespace(typeName) === false) {\r\n scope.addReference(typeToken, undefined, _reference_1.ReferenceType.VoidType, filename);\r\n return new basic_1.VoidType(typeName);\r\n }\r\n else {\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, found);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.TypeReference, filename);\r\n return found;\r\n }\r\n }\r\n else if (found === undefined) {\r\n throw new Error(\"Type \\\"\" + typeName + \"\\\" not found in scope, VALUE\");\r\n }\r\n return found;\r\n }\r\n return targetType;\r\n }\r\n}\r\nexports.Source = Source;\r\n//# sourceMappingURL=source.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js?");
7246
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Source = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst method_call_chain_1 = __webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_chain.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst constant_1 = __webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js\");\r\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\r\nconst component_chain_1 = __webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_chain.js\");\r\nconst string_template_1 = __webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/string_template.js\");\r\nconst value_body_1 = __webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/value_body.js\");\r\nconst cond_1 = __webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/cond.js\");\r\nconst reduce_body_1 = __webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/reduce_body.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst switch_body_1 = __webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/switch_body.js\");\r\nconst cond_body_1 = __webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/cond_body.js\");\r\nconst conv_body_1 = __webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/conv_body.js\");\r\nconst filter_body_1 = __webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/filter_body.js\");\r\nconst corresponding_body_1 = __webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/corresponding_body.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst attribute_chain_1 = __webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_chain.js\");\r\nconst dereference_1 = __webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dereference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\n/*\r\n* Type interference, valid scenarios:\r\n* typed = VALUE #( ... ). right hand side must follow left hand type\r\n* DATA(bar) = VALUE type( ... ). left gets the type of rigthand\r\n* typed = VALUE type( ... ). types must match and be compatible???\r\n************* ERRORS *********\r\n* VALUE #( ... ). syntax error\r\n* DATA(bar) = VALUE #( ... ). give error, no type can be derived\r\n*/\r\nclass Source {\r\n runSyntax(node, scope, filename, targetType) {\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n const children = node.getChildren().slice();\r\n let first = children.shift();\r\n if (first instanceof nodes_1.TokenNode) {\r\n const token = first.getFirstToken();\r\n const tok = token.getStr().toUpperCase();\r\n switch (tok) {\r\n case \"(\":\r\n case \"-\":\r\n break;\r\n case \"BOOLC\":\r\n {\r\n const method = new _builtin_1.BuiltIn().searchBuiltin(tok);\r\n scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);\r\n new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);\r\n return new basic_1.StringType();\r\n }\r\n case \"XSDBOOL\":\r\n {\r\n const method = new _builtin_1.BuiltIn().searchBuiltin(tok);\r\n scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);\r\n new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);\r\n return new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" });\r\n }\r\n case \"REDUCE\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"SWITCH\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new switch_body_1.SwitchBody().runSyntax(node.findDirectExpression(Expressions.SwitchBody), scope, filename);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"COND\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), scope, filename, foundType);\r\n if (foundType === undefined) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n case \"CONV\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), scope, filename);\r\n return foundType;\r\n }\r\n case \"REF\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const s = new Source().runSyntax(node.findDirectExpression(Expressions.Source), scope, filename);\r\n if (foundType === undefined && s) {\r\n return new basic_1.DataReference(s);\r\n }\r\n else {\r\n return foundType;\r\n }\r\n }\r\n case \"FILTER\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new filter_body_1.FilterBody().runSyntax(node.findDirectExpression(Expressions.FilterBody), scope, filename, foundType);\r\n if (foundType === undefined || foundType.isGeneric()) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n else {\r\n this.addIfInferred(node, scope, filename, foundType);\r\n }\r\n if (foundType && !(foundType instanceof unknown_type_1.UnknownType)) {\r\n return foundType;\r\n }\r\n else {\r\n return bodyType;\r\n }\r\n }\r\n case \"CORRESPONDING\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n return new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);\r\n }\r\n case \"EXACT\":\r\n return this.determineType(node, scope, filename, targetType);\r\n case \"VALUE\":\r\n {\r\n const foundType = this.determineType(node, scope, filename, targetType);\r\n const bodyType = new value_body_1.ValueBody().runSyntax(node.findDirectExpression(Expressions.ValueBody), scope, filename, foundType);\r\n if (foundType === undefined || foundType.isGeneric()) {\r\n this.addIfInferred(node, scope, filename, bodyType);\r\n }\r\n else {\r\n this.addIfInferred(node, scope, filename, foundType);\r\n }\r\n return foundType ? foundType : bodyType;\r\n }\r\n default:\r\n return new unknown_type_1.UnknownType(\"todo, Source type \" + tok);\r\n }\r\n }\r\n else if (first === undefined || !(first instanceof nodes_1.ExpressionNode)) {\r\n return undefined;\r\n }\r\n let context = new unknown_type_1.UnknownType(\"todo, Source type\");\r\n while (children.length >= 0) {\r\n if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {\r\n context = new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename, targetType);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {\r\n context = new field_chain_1.FieldChain().runSyntax(first, scope, filename, _reference_1.ReferenceType.DataReadReference);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.StringTemplate) {\r\n context = new string_template_1.StringTemplate().runSyntax(first, scope, filename);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Source) {\r\n context = new Source().runSyntax(first, scope, filename);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Constant) {\r\n context = new constant_1.Constant().runSyntax(first);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Dereference) {\r\n context = new dereference_1.Dereference().runSyntax(context);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ArrowOrDash) {\r\n // console.dir(\"dash\");\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ComponentChain) {\r\n context = new component_chain_1.ComponentChain().runSyntax(context, first);\r\n }\r\n else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.AttributeChain) {\r\n context = new attribute_chain_1.AttributeChain().runSyntax(context, first, scope, filename, _reference_1.ReferenceType.DataReadReference);\r\n }\r\n first = children.shift();\r\n if (first === undefined) {\r\n break;\r\n }\r\n }\r\n if (node.findDirectTokenByText(\"&&\")) {\r\n return new basic_1.StringType();\r\n }\r\n return context;\r\n }\r\n ////////////////////////////////\r\n addIfInferred(node, scope, filename, inferredType) {\r\n const basic = new basic_types_1.BasicTypes(filename, scope);\r\n const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);\r\n const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();\r\n const typeName = typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr();\r\n if (typeName === \"#\" && inferredType && typeToken) {\r\n const found = basic.lookupQualifiedName(inferredType.getQualifiedName());\r\n if (found) {\r\n scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n else if (inferredType instanceof basic_1.ObjectReferenceType) {\r\n const def = scope.findObjectDefinition(inferredType.getQualifiedName());\r\n if (def) {\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, inferredType);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n }\r\n else if (inferredType instanceof basic_1.CharacterType) {\r\n // character is bit special it does not have a qualified name eg \"TYPE c LENGTH 6\"\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, inferredType);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n }\r\n }\r\n determineType(node, scope, filename, targetType) {\r\n const basic = new basic_types_1.BasicTypes(filename, scope);\r\n const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);\r\n const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();\r\n const typeName = typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr();\r\n if (typeExpression === undefined) {\r\n throw new Error(\"determineType, child TypeNameOrInfer not found\");\r\n }\r\n else if (typeName === \"#\" && targetType) {\r\n const found = basic.lookupQualifiedName(targetType.getQualifiedName());\r\n if (found) {\r\n scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);\r\n }\r\n return targetType;\r\n }\r\n if (typeName !== \"#\" && typeToken) {\r\n const found = basic.parseType(typeExpression);\r\n if (found && found instanceof unknown_type_1.UnknownType) {\r\n if (scope.getDDIC().inErrorNamespace(typeName) === false) {\r\n scope.addReference(typeToken, undefined, _reference_1.ReferenceType.VoidType, filename);\r\n return new basic_1.VoidType(typeName);\r\n }\r\n else {\r\n const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, found);\r\n scope.addReference(typeToken, tid, _reference_1.ReferenceType.TypeReference, filename);\r\n return found;\r\n }\r\n }\r\n else if (found === undefined) {\r\n throw new Error(\"Type \\\"\" + typeName + \"\\\" not found in scope, VALUE\");\r\n }\r\n return found;\r\n }\r\n return targetType;\r\n }\r\n}\r\nexports.Source = Source;\r\n//# sourceMappingURL=source.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js?");
7247
7247
 
7248
7248
  /***/ }),
7249
7249
 
@@ -7287,7 +7287,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
7287
7287
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7288
7288
 
7289
7289
  "use strict";
7290
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplate = void 0;\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nclass StringTemplate {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findAllExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType(\"STRING\"));\r\n }\r\n return new basic_1.StringType();\r\n }\r\n}\r\nexports.StringTemplate = StringTemplate;\r\n//# sourceMappingURL=string_template.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/string_template.js?");
7290
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplate = void 0;\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nclass StringTemplate {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findAllExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType({ qualifiedName: \"STRING\" }));\r\n }\r\n return new basic_1.StringType();\r\n }\r\n}\r\nexports.StringTemplate = StringTemplate;\r\n//# sourceMappingURL=string_template.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/string_template.js?");
7291
7291
 
7292
7292
  /***/ }),
7293
7293
 
@@ -8739,7 +8739,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8739
8739
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8740
8740
 
8741
8741
  "use strict";
8742
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeEnum = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst enum_type_1 = __webpack_require__(/*! ../../types/basic/enum_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nclass TypeEnum {\r\n runSyntax(node, scope, filename) {\r\n var _a;\r\n let values = [];\r\n const types = [];\r\n if (!(node.get() instanceof Structures.TypeEnum)) {\r\n throw new Error(\"TypeEnum, unexpected type\");\r\n }\r\n const begin = node.findDirectStatement(Statements.TypeEnumBegin);\r\n if (begin === undefined) {\r\n throw new Error(\"TypeEnum, unexpected type, begin\");\r\n }\r\n for (const type of node.findDirectStatements(Statements.Type)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n for (const type of node.findDirectStatements(Statements.TypeEnum)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n const baseType = (_a = begin.findExpressionAfterToken(\"TYPE\")) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();\r\n if (baseType && baseName) {\r\n const found = scope.findType(baseName);\r\n if (found) {\r\n scope.addReference(baseType, found, _reference_1.ReferenceType.TypeReference, filename);\r\n }\r\n }\r\n const name = begin.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (name) {\r\n let qualifiedName = name.concatTokens();\r\n if (scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(qualifiedName), [\"enum\" /* IdentifierMeta.Enum */]);\r\n scope.addType(id);\r\n types.push(id);\r\n }\r\n const stru = begin.findExpressionAfterToken(\"STRUCTURE\");\r\n if (stru) {\r\n const components = [];\r\n for (const r of values) {\r\n components.push({\r\n name: r.getName(),\r\n type: r.getType(),\r\n });\r\n }\r\n values = [];\r\n const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), [\"enum\" /* IdentifierMeta.Enum */]);\r\n values.push(id);\r\n }\r\n return { values, types };\r\n }\r\n}\r\nexports.TypeEnum = TypeEnum;\r\n//# sourceMappingURL=type_enum.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js?");
8742
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeEnum = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst enum_type_1 = __webpack_require__(/*! ../../types/basic/enum_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nclass TypeEnum {\r\n runSyntax(node, scope, filename) {\r\n var _a;\r\n let values = [];\r\n const types = [];\r\n if (!(node.get() instanceof Structures.TypeEnum)) {\r\n throw new Error(\"TypeEnum, unexpected type\");\r\n }\r\n const begin = node.findDirectStatement(Statements.TypeEnumBegin);\r\n if (begin === undefined) {\r\n throw new Error(\"TypeEnum, unexpected type, begin\");\r\n }\r\n for (const type of node.findDirectStatements(Statements.Type)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n for (const type of node.findDirectStatements(Statements.TypeEnum)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n const baseType = (_a = begin.findExpressionAfterToken(\"TYPE\")) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();\r\n if (baseType && baseName) {\r\n const found = scope.findType(baseName);\r\n if (found) {\r\n scope.addReference(baseType, found, _reference_1.ReferenceType.TypeReference, filename);\r\n }\r\n }\r\n const name = begin.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (name) {\r\n let qualifiedName = name.concatTokens();\r\n if (scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType({ qualifiedName: qualifiedName }), [\"enum\" /* IdentifierMeta.Enum */]);\r\n scope.addType(id);\r\n types.push(id);\r\n }\r\n const stru = begin.findExpressionAfterToken(\"STRUCTURE\");\r\n if (stru) {\r\n const components = [];\r\n for (const r of values) {\r\n components.push({\r\n name: r.getName(),\r\n type: r.getType(),\r\n });\r\n }\r\n values = [];\r\n const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), [\"enum\" /* IdentifierMeta.Enum */]);\r\n values.push(id);\r\n }\r\n return { values, types };\r\n }\r\n}\r\nexports.TypeEnum = TypeEnum;\r\n//# sourceMappingURL=type_enum.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js?");
8743
8743
 
8744
8744
  /***/ }),
8745
8745
 
@@ -8926,7 +8926,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8926
8926
  /***/ ((__unused_webpack_module, exports) => {
8927
8927
 
8928
8928
  "use strict";
8929
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AbstractType = void 0;\r\nclass AbstractType {\r\n constructor(qualifiedName, conversionExit) {\r\n this.qualifiedName = qualifiedName;\r\n this.conversionExit = conversionExit;\r\n }\r\n /** fully qualified symbolic name of the type */\r\n getQualifiedName() {\r\n return this.qualifiedName;\r\n }\r\n getConversionExit() {\r\n return this.conversionExit;\r\n }\r\n}\r\nexports.AbstractType = AbstractType;\r\n//# sourceMappingURL=_abstract_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js?");
8929
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AbstractType = void 0;\r\nclass AbstractType {\r\n constructor(input) {\r\n this.data = input;\r\n }\r\n getAbstractTypeData() {\r\n return this.data;\r\n }\r\n /** fully qualified symbolic name of the type */\r\n getQualifiedName() {\r\n var _a;\r\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;\r\n }\r\n getConversionExit() {\r\n var _a;\r\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.conversionExit;\r\n }\r\n getDDICName() {\r\n var _a;\r\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.ddicName;\r\n }\r\n}\r\nexports.AbstractType = AbstractType;\r\n//# sourceMappingURL=_abstract_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js?");
8930
8930
 
8931
8931
  /***/ }),
8932
8932
 
@@ -8948,7 +8948,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8948
8948
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8949
8949
 
8950
8950
  "use strict";
8951
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CharacterType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass CharacterType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName, conversionExit) {\r\n super(qualifiedName, conversionExit);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n cloneType(qualifiedName) {\r\n return new CharacterType(this.length, qualifiedName, this.getConversionExit());\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```c LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"c LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n getIdentifier() {\r\n return undefined;\r\n }\r\n toCDS() {\r\n return \"abap.char( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.CharacterType = CharacterType;\r\n//# sourceMappingURL=character_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js?");
8951
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CharacterType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass CharacterType extends _abstract_type_1.AbstractType {\r\n constructor(length, extra) {\r\n super(extra);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n cloneType(qualifiedName) {\r\n const extra = this.getAbstractTypeData() || {};\r\n extra.qualifiedName = qualifiedName;\r\n return new CharacterType(this.length, extra);\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```c LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"c LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n getIdentifier() {\r\n return undefined;\r\n }\r\n toCDS() {\r\n return \"abap.char( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.CharacterType = CharacterType;\r\n//# sourceMappingURL=character_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js?");
8952
8952
 
8953
8953
  /***/ }),
8954
8954
 
@@ -8981,7 +8981,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8981
8981
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8982
8982
 
8983
8983
  "use strict";
8984
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataReference = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass DataReference extends _abstract_type_1.AbstractType {\r\n constructor(type, qualifiedName) {\r\n super(qualifiedName);\r\n this.type = type;\r\n }\r\n toText(level) {\r\n return \"Data REF TO \" + this.type.toText(level + 1);\r\n }\r\n getType() {\r\n return this.type;\r\n }\r\n toABAP() {\r\n return \"REF TO \" + this.type.toABAP();\r\n }\r\n isGeneric() {\r\n return this.type.isGeneric();\r\n }\r\n containsVoid() {\r\n return this.type.containsVoid();\r\n }\r\n toCDS() {\r\n return \"abap.TODO_REFERENCE\";\r\n }\r\n}\r\nexports.DataReference = DataReference;\r\n//# sourceMappingURL=data_reference_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/data_reference_type.js?");
8984
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataReference = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass DataReference extends _abstract_type_1.AbstractType {\r\n constructor(type, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n this.type = type;\r\n }\r\n toText(level) {\r\n return \"Data REF TO \" + this.type.toText(level + 1);\r\n }\r\n getType() {\r\n return this.type;\r\n }\r\n toABAP() {\r\n return \"REF TO \" + this.type.toABAP();\r\n }\r\n isGeneric() {\r\n return this.type.isGeneric();\r\n }\r\n containsVoid() {\r\n return this.type.containsVoid();\r\n }\r\n toCDS() {\r\n return \"abap.TODO_REFERENCE\";\r\n }\r\n}\r\nexports.DataReference = DataReference;\r\n//# sourceMappingURL=data_reference_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/data_reference_type.js?");
8985
8985
 
8986
8986
  /***/ }),
8987
8987
 
@@ -9058,7 +9058,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9058
9058
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9059
9059
 
9060
9060
  "use strict";
9061
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FloatingPointType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\n// this is the DDIC floating point type\r\nclass FloatingPointType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName) {\r\n super(qualifiedName);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```n LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"n LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.fltp\";\r\n }\r\n}\r\nexports.FloatingPointType = FloatingPointType;\r\n//# sourceMappingURL=floating_point_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/floating_point_type.js?");
9061
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FloatingPointType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\n// this is the DDIC floating point type\r\nclass FloatingPointType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```n LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"n LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.fltp\";\r\n }\r\n}\r\nexports.FloatingPointType = FloatingPointType;\r\n//# sourceMappingURL=floating_point_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/floating_point_type.js?");
9062
9062
 
9063
9063
  /***/ }),
9064
9064
 
@@ -9080,7 +9080,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9080
9080
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9081
9081
 
9082
9082
  "use strict";
9083
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.HexType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass HexType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName) {\r\n super(qualifiedName);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```x LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"x LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.raw( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.HexType = HexType;\r\n//# sourceMappingURL=hex_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/hex_type.js?");
9083
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.HexType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass HexType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```x LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"x LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.raw( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.HexType = HexType;\r\n//# sourceMappingURL=hex_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/hex_type.js?");
9084
9084
 
9085
9085
  /***/ }),
9086
9086
 
@@ -9124,7 +9124,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9124
9124
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9125
9125
 
9126
9126
  "use strict";
9127
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NumericType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass NumericType extends _abstract_type_1.AbstractType {\r\n constructor(length, name) {\r\n super(name);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```n LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"n LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.numc( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.NumericType = NumericType;\r\n//# sourceMappingURL=numeric_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_type.js?");
9127
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NumericType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass NumericType extends _abstract_type_1.AbstractType {\r\n constructor(length, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n this.length = length;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n toText() {\r\n return \"```n LENGTH \" + this.getLength() + \"```\";\r\n }\r\n toABAP() {\r\n return \"n LENGTH \" + this.getLength();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.numc( \" + this.getLength() + \" )\";\r\n }\r\n}\r\nexports.NumericType = NumericType;\r\n//# sourceMappingURL=numeric_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_type.js?");
9128
9128
 
9129
9129
  /***/ }),
9130
9130
 
@@ -9135,7 +9135,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9135
9135
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9136
9136
 
9137
9137
  "use strict";
9138
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObjectReferenceType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\n// use GenericObjectReferenceType for REF TO OBJECT\r\nclass ObjectReferenceType extends _abstract_type_1.AbstractType {\r\n constructor(id, qualifiedName) {\r\n super(qualifiedName);\r\n this.identifier = id;\r\n }\r\n getIdentifierName() {\r\n return this.identifier.getName();\r\n }\r\n toText() {\r\n return \"```REF TO \" + this.identifier.getName() + \"```\";\r\n }\r\n toABAP() {\r\n return \"REF TO \" + this.identifier.getName();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n getIdentifier() {\r\n return this.identifier;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_OBJECTREF\";\r\n }\r\n}\r\nexports.ObjectReferenceType = ObjectReferenceType;\r\n//# sourceMappingURL=object_reference_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/object_reference_type.js?");
9138
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObjectReferenceType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\n// use GenericObjectReferenceType for REF TO OBJECT\r\nclass ObjectReferenceType extends _abstract_type_1.AbstractType {\r\n constructor(id, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n this.identifier = id;\r\n }\r\n getIdentifierName() {\r\n return this.identifier.getName();\r\n }\r\n toText() {\r\n return \"```REF TO \" + this.identifier.getName() + \"```\";\r\n }\r\n toABAP() {\r\n return \"REF TO \" + this.identifier.getName();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n getIdentifier() {\r\n return this.identifier;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_OBJECTREF\";\r\n }\r\n}\r\nexports.ObjectReferenceType = ObjectReferenceType;\r\n//# sourceMappingURL=object_reference_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/object_reference_type.js?");
9139
9139
 
9140
9140
  /***/ }),
9141
9141
 
@@ -9146,7 +9146,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9146
9146
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9147
9147
 
9148
9148
  "use strict";
9149
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PackedType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass PackedType extends _abstract_type_1.AbstractType {\r\n constructor(length, decimals, qualifiedName) {\r\n super(qualifiedName);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n else if (decimals < 0) {\r\n throw new Error(\"Bad DECIMALS\");\r\n }\r\n this.length = length;\r\n this.decimals = decimals;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n getDecimals() {\r\n return this.decimals;\r\n }\r\n toText() {\r\n return \"```p LENGTH \" + this.getLength() + \" DECIMALS \" + this.getDecimals() + \"```\";\r\n }\r\n toABAP() {\r\n return \"p LENGTH \" + this.getLength() + \" DECIMALS \" + this.getDecimals();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_PACKED\";\r\n }\r\n}\r\nexports.PackedType = PackedType;\r\n//# sourceMappingURL=packed_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/packed_type.js?");
9149
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PackedType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass PackedType extends _abstract_type_1.AbstractType {\r\n constructor(length, decimals, extra) {\r\n super(extra);\r\n if (length <= 0) {\r\n throw new Error(\"Bad LENGTH\");\r\n }\r\n else if (decimals < 0) {\r\n throw new Error(\"Bad DECIMALS\");\r\n }\r\n this.length = length;\r\n this.decimals = decimals;\r\n }\r\n getLength() {\r\n return this.length;\r\n }\r\n getDecimals() {\r\n return this.decimals;\r\n }\r\n toText() {\r\n return \"```p LENGTH \" + this.getLength() + \" DECIMALS \" + this.getDecimals() + \"```\";\r\n }\r\n toABAP() {\r\n return \"p LENGTH \" + this.getLength() + \" DECIMALS \" + this.getDecimals();\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_PACKED\";\r\n }\r\n}\r\nexports.PackedType = PackedType;\r\n//# sourceMappingURL=packed_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/packed_type.js?");
9150
9150
 
9151
9151
  /***/ }),
9152
9152
 
@@ -9179,7 +9179,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9179
9179
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9180
9180
 
9181
9181
  "use strict";
9182
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StructureType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass StructureType extends _abstract_type_1.AbstractType {\r\n constructor(components, qualifiedName) {\r\n super(qualifiedName);\r\n if (components.length === 0) {\r\n throw new Error(\"Structure does not contain any components\");\r\n }\r\n this.indexed = {};\r\n for (const c of components) {\r\n const upper = c.name.toUpperCase();\r\n if (this.indexed[upper] !== undefined) {\r\n throw new Error(\"Structure, duplicate field name \\\"\" + upper + \"\\\", \" + qualifiedName);\r\n }\r\n this.indexed[upper] = c.type;\r\n }\r\n this.components = components;\r\n }\r\n getComponents() {\r\n return this.components;\r\n }\r\n getComponentByName(name) {\r\n return this.indexed[name.toUpperCase()];\r\n }\r\n toText(level) {\r\n const compo = [];\r\n for (const c of this.components) {\r\n compo.push(c.name + \" TYPE \" + c.type.toText(level + 1));\r\n }\r\n const spaces = \" \".repeat(level);\r\n return \"Structure\\n\" + spaces + \"* \" + compo.join(\"\\n\" + spaces + \"* \");\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n toABAP() {\r\n const ret = this.getQualifiedName();\r\n if (ret) {\r\n return ret;\r\n }\r\n return \"StructureTypetoABAPtodo\";\r\n }\r\n containsVoid() {\r\n return this.getComponents().some(c => { return c.type.containsVoid(); });\r\n }\r\n toCDS() {\r\n return \"abap.TODO_STRUCTURE\";\r\n }\r\n}\r\nexports.StructureType = StructureType;\r\n//# sourceMappingURL=structure_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js?");
9182
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StructureType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass StructureType extends _abstract_type_1.AbstractType {\r\n constructor(components, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n if (components.length === 0) {\r\n throw new Error(\"Structure does not contain any components\");\r\n }\r\n this.indexed = {};\r\n for (const c of components) {\r\n const upper = c.name.toUpperCase();\r\n if (this.indexed[upper] !== undefined) {\r\n throw new Error(\"Structure, duplicate field name \\\"\" + upper + \"\\\", \" + qualifiedName);\r\n }\r\n this.indexed[upper] = c.type;\r\n }\r\n this.components = components;\r\n }\r\n getComponents() {\r\n return this.components;\r\n }\r\n getComponentByName(name) {\r\n return this.indexed[name.toUpperCase()];\r\n }\r\n toText(level) {\r\n const compo = [];\r\n for (const c of this.components) {\r\n compo.push(c.name + \" TYPE \" + c.type.toText(level + 1));\r\n }\r\n const spaces = \" \".repeat(level);\r\n return \"Structure\\n\" + spaces + \"* \" + compo.join(\"\\n\" + spaces + \"* \");\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n toABAP() {\r\n const ret = this.getQualifiedName();\r\n if (ret) {\r\n return ret;\r\n }\r\n return \"StructureTypetoABAPtodo\";\r\n }\r\n containsVoid() {\r\n return this.getComponents().some(c => { return c.type.containsVoid(); });\r\n }\r\n toCDS() {\r\n return \"abap.TODO_STRUCTURE\";\r\n }\r\n}\r\nexports.StructureType = StructureType;\r\n//# sourceMappingURL=structure_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js?");
9183
9183
 
9184
9184
  /***/ }),
9185
9185
 
@@ -9190,7 +9190,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9190
9190
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9191
9191
 
9192
9192
  "use strict";
9193
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TableType = exports.TableAccessType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nvar TableAccessType;\r\n(function (TableAccessType) {\r\n TableAccessType[\"standard\"] = \"STANDARD\";\r\n TableAccessType[\"sorted\"] = \"SORTED\";\r\n TableAccessType[\"hashed\"] = \"HASHED\";\r\n TableAccessType[\"index\"] = \"INDEX\";\r\n TableAccessType[\"any\"] = \"ANY\";\r\n})(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));\r\nclass TableType extends _abstract_type_1.AbstractType {\r\n constructor(rowType, options, qualifiedName) {\r\n super(qualifiedName);\r\n this.rowType = rowType;\r\n this.options = options;\r\n }\r\n getOptions() {\r\n return this.options;\r\n }\r\n isWithHeader() {\r\n return this.options.withHeader;\r\n }\r\n getAccessType() {\r\n var _a;\r\n return (_a = this.options.primaryKey) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n getRowType() {\r\n return this.rowType;\r\n }\r\n toABAP() {\r\n // todo, this is used for downport, so use default key for now\r\n return \"STANDARD TABLE OF \" + this.rowType.toABAP() + \" WITH DEFAULT KEY\";\r\n }\r\n toText(level) {\r\n const type = this.rowType;\r\n if (this.options.withHeader === true) {\r\n return \"Table with header of \" + type.toText(level + 1);\r\n }\r\n else {\r\n return \"Table of \" + type.toText(level + 1);\r\n }\r\n }\r\n isGeneric() {\r\n return this.rowType.isGeneric();\r\n }\r\n containsVoid() {\r\n return this.rowType.containsVoid();\r\n }\r\n toCDS() {\r\n return \"abap.TODO_TABLE\";\r\n }\r\n}\r\nexports.TableType = TableType;\r\n//# sourceMappingURL=table_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/table_type.js?");
9193
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TableType = exports.TableAccessType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nvar TableAccessType;\r\n(function (TableAccessType) {\r\n TableAccessType[\"standard\"] = \"STANDARD\";\r\n TableAccessType[\"sorted\"] = \"SORTED\";\r\n TableAccessType[\"hashed\"] = \"HASHED\";\r\n TableAccessType[\"index\"] = \"INDEX\";\r\n TableAccessType[\"any\"] = \"ANY\";\r\n})(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));\r\nclass TableType extends _abstract_type_1.AbstractType {\r\n constructor(rowType, options, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n this.rowType = rowType;\r\n this.options = options;\r\n }\r\n getOptions() {\r\n return this.options;\r\n }\r\n isWithHeader() {\r\n return this.options.withHeader;\r\n }\r\n getAccessType() {\r\n var _a;\r\n return (_a = this.options.primaryKey) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n getRowType() {\r\n return this.rowType;\r\n }\r\n toABAP() {\r\n // todo, this is used for downport, so use default key for now\r\n return \"STANDARD TABLE OF \" + this.rowType.toABAP() + \" WITH DEFAULT KEY\";\r\n }\r\n toText(level) {\r\n const type = this.rowType;\r\n if (this.options.withHeader === true) {\r\n return \"Table with header of \" + type.toText(level + 1);\r\n }\r\n else {\r\n return \"Table of \" + type.toText(level + 1);\r\n }\r\n }\r\n isGeneric() {\r\n return this.rowType.isGeneric();\r\n }\r\n containsVoid() {\r\n return this.rowType.containsVoid();\r\n }\r\n toCDS() {\r\n return \"abap.TODO_TABLE\";\r\n }\r\n}\r\nexports.TableType = TableType;\r\n//# sourceMappingURL=table_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/table_type.js?");
9194
9194
 
9195
9195
  /***/ }),
9196
9196
 
@@ -9212,7 +9212,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9212
9212
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9213
9213
 
9214
9214
  "use strict";
9215
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnknownType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass UnknownType extends _abstract_type_1.AbstractType {\r\n constructor(error, qualifiedName) {\r\n super(qualifiedName);\r\n this.error = error;\r\n }\r\n getError() {\r\n return this.error;\r\n }\r\n toText() {\r\n return \"Unknown type: \" + this.error;\r\n }\r\n toABAP() {\r\n throw new Error(\"unknown, generic: \" + this.error);\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_UNKNOWN\";\r\n }\r\n}\r\nexports.UnknownType = UnknownType;\r\n//# sourceMappingURL=unknown_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js?");
9215
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnknownType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass UnknownType extends _abstract_type_1.AbstractType {\r\n constructor(error, qualifiedName) {\r\n super({ qualifiedName: qualifiedName });\r\n this.error = error;\r\n }\r\n getError() {\r\n return this.error;\r\n }\r\n toText() {\r\n return \"Unknown type: \" + this.error;\r\n }\r\n toABAP() {\r\n throw new Error(\"unknown, generic: \" + this.error);\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return false;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_UNKNOWN\";\r\n }\r\n}\r\nexports.UnknownType = UnknownType;\r\n//# sourceMappingURL=unknown_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js?");
9216
9216
 
9217
9217
  /***/ }),
9218
9218
 
@@ -9234,7 +9234,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9234
9234
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9235
9235
 
9236
9236
  "use strict";
9237
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VoidType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass VoidType extends _abstract_type_1.AbstractType {\r\n constructor(voided, name) {\r\n super(name);\r\n this.voided = voided;\r\n }\r\n getVoided() {\r\n return this.voided;\r\n }\r\n toABAP() {\r\n return this.voided || \"VOIDEDtoABAP\";\r\n }\r\n toText() {\r\n return \"Void(\" + this.voided + \")\";\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return true;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_VOID\";\r\n }\r\n}\r\nexports.VoidType = VoidType;\r\n//# sourceMappingURL=void_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js?");
9237
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VoidType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass VoidType extends _abstract_type_1.AbstractType {\r\n constructor(voided, name) {\r\n super({ qualifiedName: name });\r\n this.voided = voided;\r\n }\r\n getVoided() {\r\n return this.voided;\r\n }\r\n toABAP() {\r\n return this.voided || \"VOIDEDtoABAP\";\r\n }\r\n toText() {\r\n return \"Void(\" + this.voided + \")\";\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return true;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_VOID\";\r\n }\r\n}\r\nexports.VoidType = VoidType;\r\n//# sourceMappingURL=void_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js?");
9238
9238
 
9239
9239
  /***/ }),
9240
9240
 
@@ -9883,7 +9883,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9883
9883
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9884
9884
 
9885
9885
  "use strict";
9886
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DDIC = void 0;\r\nconst Types = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass DDIC {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n // the class might be local with a local super class with a global exception class as super\r\n // todo: returns true for both local and global exception classes\r\n isException(def, _obj) {\r\n var _a;\r\n if (def === undefined) {\r\n return false;\r\n }\r\n if (def.name.toUpperCase() === \"CX_ROOT\") {\r\n return true;\r\n }\r\n let superClassName = def.superClassName;\r\n if (superClassName === undefined) {\r\n return false;\r\n }\r\n let i = 0;\r\n // max depth, make sure not to hit cyclic super class defintions\r\n while (i++ < 10 && superClassName !== undefined) {\r\n const found = this.reg.getObject(\"CLAS\", superClassName);\r\n if (found === undefined) {\r\n break;\r\n }\r\n const superDef = (_a = found.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().getClassDefinitionByName(superClassName);\r\n if (superDef === undefined) {\r\n break;\r\n }\r\n if (superDef.superClassName) {\r\n superClassName = superDef.superClassName;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n // todo, this should check for \"CX_ROOT\"\r\n const isException = ((superClassName === null || superClassName === void 0 ? void 0 : superClassName.match(/^.?cx_.*$/i)) || (superClassName === null || superClassName === void 0 ? void 0 : superClassName.match(/^\\/.+\\/cx_.*$/i))) ? true : false;\r\n return isException;\r\n }\r\n lookupBuiltinType(name, length, decimals, qualifiedName) {\r\n switch (name) {\r\n case \"STRING\":\r\n return new Types.StringType(qualifiedName || name);\r\n case \"XSTRING\":\r\n return new Types.XStringType(qualifiedName || name);\r\n case \"D\":\r\n return new Types.DateType(qualifiedName || name);\r\n case \"T\":\r\n return new Types.TimeType(qualifiedName || name);\r\n case \"XSEQUENCE\":\r\n return new Types.XSequenceType(qualifiedName);\r\n case \"CLIKE\":\r\n return new Types.CLikeType(qualifiedName);\r\n case \"DECFLOAT\":\r\n return new Types.DecFloatType(qualifiedName);\r\n case \"ANY\":\r\n return new Types.AnyType(qualifiedName);\r\n case \"SIMPLE\":\r\n return new Types.SimpleType(qualifiedName);\r\n case \"%_C_POINTER\":\r\n return new Types.HexType(8, qualifiedName);\r\n case \"TABLE\":\r\n return new Types.TableType(new Types.AnyType(), { withHeader: false });\r\n case \"DATA\":\r\n return new Types.AnyType(qualifiedName);\r\n case \"NUMERIC\":\r\n return new Types.NumericGenericType(qualifiedName);\r\n case \"UTCLONG\": // todo, take version into account\r\n return new Types.UTCLongType(qualifiedName);\r\n case \"DECFLOAT16\":\r\n return new Types.DecFloat16Type(qualifiedName);\r\n case \"DECFLOAT34\":\r\n return new Types.DecFloat34Type(qualifiedName);\r\n case \"CSEQUENCE\":\r\n return new Types.CSequenceType(qualifiedName);\r\n case \"I\":\r\n case \"INT8\": // todo, take version into account\r\n return new Types.IntegerType(qualifiedName || name);\r\n case \"F\":\r\n return new Types.FloatType(qualifiedName || name);\r\n case \"P\":\r\n if (length && decimals) {\r\n return new Types.PackedType(length, decimals, qualifiedName);\r\n }\r\n else if (length) {\r\n return new Types.PackedType(length, 0, qualifiedName);\r\n }\r\n else {\r\n return new Types.PackedType(1, 0, qualifiedName);\r\n }\r\n case \"C\":\r\n if (length) {\r\n return new Types.CharacterType(length, qualifiedName);\r\n }\r\n else {\r\n return new Types.CharacterType(1, qualifiedName);\r\n }\r\n case \"X\":\r\n if (length) {\r\n return new Types.HexType(length, qualifiedName);\r\n }\r\n else {\r\n return new Types.HexType(1, qualifiedName);\r\n }\r\n case \"N\":\r\n if (length) {\r\n return new Types.NumericType(length, qualifiedName);\r\n }\r\n else {\r\n return new Types.NumericType(1, qualifiedName);\r\n }\r\n }\r\n return undefined;\r\n }\r\n inErrorNamespace(name) {\r\n if (name === undefined) {\r\n return true;\r\n }\r\n return this.reg.inErrorNamespace(name);\r\n }\r\n lookupObject(name) {\r\n const clas = this.reg.getObject(\"CLAS\", name);\r\n const globalClas = clas === null || clas === void 0 ? void 0 : clas.getIdentifier();\r\n if (globalClas) {\r\n return { type: new basic_1.ObjectReferenceType(globalClas, name), object: clas };\r\n }\r\n const intf = this.reg.getObject(\"INTF\", name);\r\n const globalIntf = intf === null || intf === void 0 ? void 0 : intf.getIdentifier();\r\n if (globalIntf) {\r\n return { type: new basic_1.ObjectReferenceType(globalIntf, name), object: intf };\r\n }\r\n if (this.inErrorNamespace(name) === true) {\r\n return { type: new basic_1.UnknownType(name) };\r\n }\r\n else {\r\n return { type: new basic_1.VoidType(name) };\r\n }\r\n }\r\n lookupNoVoid(name) {\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return { type: foundTABL.parseType(this.reg), object: foundTABL };\r\n }\r\n const foundVIEW = this.reg.getObject(\"VIEW\", name);\r\n if (foundVIEW) {\r\n return { type: foundVIEW.parseType(this.reg), object: foundVIEW };\r\n }\r\n const foundTTYP = this.reg.getObject(\"TTYP\", name);\r\n if (foundTTYP) {\r\n return { type: foundTTYP.parseType(this.reg), object: foundTTYP };\r\n }\r\n const foundDTEL = this.reg.getObject(\"DTEL\", name);\r\n if (foundDTEL) {\r\n return { type: foundDTEL.parseType(this.reg), object: foundDTEL };\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS;\r\n }\r\n return undefined;\r\n }\r\n lookupDDLS(name) {\r\n var _a;\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const upper = name.toUpperCase();\r\n for (const obj of this.reg.getObjectsByType(\"DDLS\")) {\r\n const ddls = obj;\r\n if (ddls.getSQLViewName() === upper || ((_a = ddls.getDefinitionName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {\r\n return { type: ddls.parseType(this.reg), object: ddls };\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** lookup with voiding and unknown types */\r\n lookup(name) {\r\n const found = this.lookupNoVoid(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookup\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupDomain(name, parent) {\r\n const found = this.reg.getObject(\"DOMA\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg, parent), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \", lookupDomain\"), object: undefined };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name), object: undefined };\r\n }\r\n }\r\n lookupDataElement(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupDataElement\") };\r\n }\r\n const found = this.reg.getObject(\"DTEL\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupDataElement\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupTableOrView(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupTableOrView\") };\r\n }\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return { type: foundTABL.parseType(this.reg), object: foundTABL };\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS;\r\n }\r\n return this.lookupView(name);\r\n }\r\n /** this method only looks up the object, does not parse the type */\r\n lookupTableOrView2(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return foundTABL;\r\n }\r\n const foundVIEW = this.reg.getObject(\"VIEW\", name);\r\n if (foundVIEW) {\r\n return foundVIEW;\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS.object;\r\n }\r\n return undefined;\r\n }\r\n lookupTable(name) {\r\n if (name === undefined) {\r\n return new Types.UnknownType(\"undefined, lookupTable\");\r\n }\r\n const found = this.reg.getObject(\"TABL\", name);\r\n if (found) {\r\n return found.parseType(this.reg);\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return new Types.UnknownType(name + \" not found, lookupTable\");\r\n }\r\n else {\r\n return new Types.VoidType(name);\r\n }\r\n }\r\n lookupView(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupView\") };\r\n }\r\n const found = this.reg.getObject(\"VIEW\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupView\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupTableType(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupTableType\") };\r\n }\r\n const found = this.reg.getObject(\"TTYP\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupTableType\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n textToType(text, length, decimals, parent, qualify = true, conversionExit) {\r\n // todo, support short strings, and length of different integers, NUMC vs CHAR, min/max length\r\n const qualified = qualify ? parent : undefined;\r\n switch (text) {\r\n case \"DEC\": // 1 <= len <= 31\r\n case \"D16F\": // 1 <= len <= 31\r\n case \"D34F\": // 1 <= len <= 31\r\n case \"DF16_DEC\": // 1 <= len <= 31\r\n case \"DF34_DEC\": // 1 <= len <= 31\r\n case \"CURR\": // 1 <= len <= 31\r\n case \"QUAN\": // 1 <= len <= 31\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length, \" + parent, parent);\r\n }\r\n else if (decimals === undefined) {\r\n return new Types.PackedType(parseInt(length, 10), 0, qualified);\r\n }\r\n return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), qualified);\r\n case \"ACCP\":\r\n return new Types.CharacterType(6, qualified, conversionExit); // YYYYMM\r\n case \"LANG\":\r\n return new Types.CharacterType(1, qualified, conversionExit);\r\n case \"CLNT\":\r\n return new Types.CharacterType(3, qualified, conversionExit);\r\n case \"CUKY\":\r\n return new Types.CharacterType(5, qualified, conversionExit);\r\n case \"UNIT\": // 2 <= len <= 3\r\n return new Types.CharacterType(3, qualified, conversionExit);\r\n case \"UTCLONG\":\r\n return new Types.CharacterType(27, qualified, conversionExit);\r\n case \"NUMC\": // 1 <= len <= 255\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", parent);\r\n }\r\n return new Types.NumericType(parseInt(length, 10), qualified);\r\n case \"CHAR\": // 1 <= len <= 30000 (1333 for table fields)\r\n case \"LCHR\": // 256 <= len <= 32000\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", parent);\r\n }\r\n return new Types.CharacterType(parseInt(length, 10), qualified, conversionExit);\r\n case \"RAW\": // 1 <= len <= 32000\r\n case \"LRAW\": // 256 <= len <= 32000\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", parent);\r\n }\r\n return new Types.HexType(parseInt(length, 10), qualified);\r\n case \"TIMN\": // Native HANA\r\n case \"TIMS\":\r\n return new Types.TimeType(qualified); //HHMMSS\r\n case \"DECFLOAT16\": // len = 16\r\n case \"DECFLOAT34\": // len = 34\r\n case \"D16R\": // len = 16\r\n case \"D34R\": // len = 34\r\n case \"DF16_RAW\": // len = 16\r\n case \"DF34_RAW\": // len = 34\r\n case \"FLTP\": // len = 16\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", parent);\r\n }\r\n return new Types.FloatingPointType(parseInt(length, 10), qualified);\r\n case \"DATN\": // Native HANA\r\n case \"DATS\":\r\n return new Types.DateType(qualified); //YYYYMMDD\r\n case \"INT1\":\r\n case \"INT2\":\r\n case \"INT4\":\r\n case \"INT8\":\r\n return new Types.IntegerType(qualified);\r\n case \"SSTR\": // 1 <= len <= 1333\r\n case \"SSTRING\": // 1 <= len <= 1333\r\n case \"STRG\": // 256 <= len\r\n case \"STRING\": // 256 <= len\r\n return new Types.StringType(qualified);\r\n case \"RSTR\": // 256 <= len\r\n case \"RAWSTRING\": // 256 <= len\r\n case \"GEOM_EWKB\":\r\n return new Types.XStringType(qualified);\r\n case \"D16S\":\r\n case \"D34S\":\r\n case \"DF16_SCL\":\r\n case \"DF34_SCL\":\r\n case \"PREC\":\r\n case \"VARC\":\r\n return new Types.UnknownType(text + \" is an obsolete data type\", parent);\r\n default:\r\n return new Types.UnknownType(text + \" unknown\", parent);\r\n }\r\n }\r\n}\r\nexports.DDIC = DDIC;\r\n//# sourceMappingURL=ddic.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/ddic.js?");
9886
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DDIC = void 0;\r\nconst Types = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass DDIC {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n // the class might be local with a local super class with a global exception class as super\r\n // todo: returns true for both local and global exception classes\r\n isException(def, _obj) {\r\n var _a;\r\n if (def === undefined) {\r\n return false;\r\n }\r\n if (def.name.toUpperCase() === \"CX_ROOT\") {\r\n return true;\r\n }\r\n let superClassName = def.superClassName;\r\n if (superClassName === undefined) {\r\n return false;\r\n }\r\n let i = 0;\r\n // max depth, make sure not to hit cyclic super class defintions\r\n while (i++ < 10 && superClassName !== undefined) {\r\n const found = this.reg.getObject(\"CLAS\", superClassName);\r\n if (found === undefined) {\r\n break;\r\n }\r\n const superDef = (_a = found.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().getClassDefinitionByName(superClassName);\r\n if (superDef === undefined) {\r\n break;\r\n }\r\n if (superDef.superClassName) {\r\n superClassName = superDef.superClassName;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n // todo, this should check for \"CX_ROOT\"\r\n const isException = ((superClassName === null || superClassName === void 0 ? void 0 : superClassName.match(/^.?cx_.*$/i)) || (superClassName === null || superClassName === void 0 ? void 0 : superClassName.match(/^\\/.+\\/cx_.*$/i))) ? true : false;\r\n return isException;\r\n }\r\n lookupBuiltinType(name, length, decimals, qualifiedName) {\r\n switch (name) {\r\n case \"STRING\":\r\n return new Types.StringType({ qualifiedName: qualifiedName || name });\r\n case \"XSTRING\":\r\n return new Types.XStringType({ qualifiedName: qualifiedName || name });\r\n case \"D\":\r\n return new Types.DateType({ qualifiedName: qualifiedName || name });\r\n case \"T\":\r\n return new Types.TimeType({ qualifiedName: qualifiedName || name });\r\n case \"XSEQUENCE\":\r\n return new Types.XSequenceType({ qualifiedName: qualifiedName });\r\n case \"CLIKE\":\r\n return new Types.CLikeType({ qualifiedName: qualifiedName });\r\n case \"DECFLOAT\":\r\n return new Types.DecFloatType({ qualifiedName: qualifiedName });\r\n case \"ANY\":\r\n return new Types.AnyType({ qualifiedName: qualifiedName });\r\n case \"SIMPLE\":\r\n return new Types.SimpleType({ qualifiedName: qualifiedName });\r\n case \"%_C_POINTER\":\r\n return new Types.HexType(8, qualifiedName);\r\n case \"TABLE\":\r\n return new Types.TableType(new Types.AnyType(), { withHeader: false });\r\n case \"DATA\":\r\n return new Types.AnyType({ qualifiedName: qualifiedName });\r\n case \"NUMERIC\":\r\n return new Types.NumericGenericType({ qualifiedName: qualifiedName });\r\n case \"UTCLONG\": // todo, take version into account\r\n return new Types.UTCLongType({ qualifiedName: qualifiedName });\r\n case \"DECFLOAT16\":\r\n return new Types.DecFloat16Type({ qualifiedName: qualifiedName });\r\n case \"DECFLOAT34\":\r\n return new Types.DecFloat34Type({ qualifiedName: qualifiedName });\r\n case \"CSEQUENCE\":\r\n return new Types.CSequenceType({ qualifiedName: qualifiedName });\r\n case \"I\":\r\n case \"INT8\": // todo, take version into account\r\n return new Types.IntegerType({ qualifiedName: qualifiedName || name });\r\n case \"F\":\r\n return new Types.FloatType({ qualifiedName: qualifiedName || name });\r\n case \"P\":\r\n if (length && decimals) {\r\n return new Types.PackedType(length, decimals, { qualifiedName: qualifiedName });\r\n }\r\n else if (length) {\r\n return new Types.PackedType(length, 0, { qualifiedName: qualifiedName });\r\n }\r\n else {\r\n return new Types.PackedType(1, 0, { qualifiedName: qualifiedName });\r\n }\r\n case \"C\":\r\n if (length) {\r\n return new Types.CharacterType(length, { qualifiedName: qualifiedName });\r\n }\r\n else {\r\n return new Types.CharacterType(1, { qualifiedName: qualifiedName });\r\n }\r\n case \"X\":\r\n if (length) {\r\n return new Types.HexType(length, qualifiedName);\r\n }\r\n else {\r\n return new Types.HexType(1, qualifiedName);\r\n }\r\n case \"N\":\r\n if (length) {\r\n return new Types.NumericType(length, qualifiedName);\r\n }\r\n else {\r\n return new Types.NumericType(1, qualifiedName);\r\n }\r\n }\r\n return undefined;\r\n }\r\n inErrorNamespace(name) {\r\n if (name === undefined) {\r\n return true;\r\n }\r\n return this.reg.inErrorNamespace(name);\r\n }\r\n lookupObject(name) {\r\n const clas = this.reg.getObject(\"CLAS\", name);\r\n const globalClas = clas === null || clas === void 0 ? void 0 : clas.getIdentifier();\r\n if (globalClas) {\r\n return { type: new basic_1.ObjectReferenceType(globalClas, name), object: clas };\r\n }\r\n const intf = this.reg.getObject(\"INTF\", name);\r\n const globalIntf = intf === null || intf === void 0 ? void 0 : intf.getIdentifier();\r\n if (globalIntf) {\r\n return { type: new basic_1.ObjectReferenceType(globalIntf, name), object: intf };\r\n }\r\n if (this.inErrorNamespace(name) === true) {\r\n return { type: new basic_1.UnknownType(name) };\r\n }\r\n else {\r\n return { type: new basic_1.VoidType(name) };\r\n }\r\n }\r\n lookupNoVoid(name) {\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return { type: foundTABL.parseType(this.reg), object: foundTABL };\r\n }\r\n const foundVIEW = this.reg.getObject(\"VIEW\", name);\r\n if (foundVIEW) {\r\n return { type: foundVIEW.parseType(this.reg), object: foundVIEW };\r\n }\r\n const foundTTYP = this.reg.getObject(\"TTYP\", name);\r\n if (foundTTYP) {\r\n return { type: foundTTYP.parseType(this.reg), object: foundTTYP };\r\n }\r\n const foundDTEL = this.reg.getObject(\"DTEL\", name);\r\n if (foundDTEL) {\r\n return { type: foundDTEL.parseType(this.reg), object: foundDTEL };\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS;\r\n }\r\n return undefined;\r\n }\r\n lookupDDLS(name) {\r\n var _a;\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const upper = name.toUpperCase();\r\n for (const obj of this.reg.getObjectsByType(\"DDLS\")) {\r\n const ddls = obj;\r\n if (ddls.getSQLViewName() === upper || ((_a = ddls.getDefinitionName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {\r\n return { type: ddls.parseType(this.reg), object: ddls };\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** lookup with voiding and unknown types */\r\n lookup(name) {\r\n const found = this.lookupNoVoid(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookup\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupDomain(name, dataElement) {\r\n const found = this.reg.getObject(\"DOMA\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg, dataElement), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \", lookupDomain\"), object: undefined };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name), object: undefined };\r\n }\r\n }\r\n lookupDataElement(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupDataElement\") };\r\n }\r\n const found = this.reg.getObject(\"DTEL\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupDataElement\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupTableOrView(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupTableOrView\") };\r\n }\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return { type: foundTABL.parseType(this.reg), object: foundTABL };\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS;\r\n }\r\n return this.lookupView(name);\r\n }\r\n /** this method only looks up the object, does not parse the type */\r\n lookupTableOrView2(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const foundTABL = this.reg.getObject(\"TABL\", name);\r\n if (foundTABL) {\r\n return foundTABL;\r\n }\r\n const foundVIEW = this.reg.getObject(\"VIEW\", name);\r\n if (foundVIEW) {\r\n return foundVIEW;\r\n }\r\n const foundDDLS = this.lookupDDLS(name);\r\n if (foundDDLS) {\r\n return foundDDLS.object;\r\n }\r\n return undefined;\r\n }\r\n lookupTable(name) {\r\n if (name === undefined) {\r\n return new Types.UnknownType(\"undefined, lookupTable\");\r\n }\r\n const found = this.reg.getObject(\"TABL\", name);\r\n if (found) {\r\n return found.parseType(this.reg);\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return new Types.UnknownType(name + \" not found, lookupTable\");\r\n }\r\n else {\r\n return new Types.VoidType(name);\r\n }\r\n }\r\n lookupView(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupView\") };\r\n }\r\n const found = this.reg.getObject(\"VIEW\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupView\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n lookupTableType(name) {\r\n if (name === undefined) {\r\n return { type: new Types.UnknownType(\"undefined, lookupTableType\") };\r\n }\r\n const found = this.reg.getObject(\"TTYP\", name);\r\n if (found) {\r\n return { type: found.parseType(this.reg), object: found };\r\n }\r\n else if (this.reg.inErrorNamespace(name)) {\r\n return { type: new Types.UnknownType(name + \" not found, lookupTableType\") };\r\n }\r\n else {\r\n return { type: new Types.VoidType(name) };\r\n }\r\n }\r\n textToType(text, length, decimals, infoText, qualifiedName, conversionExit, ddicName) {\r\n // todo: support short strings, and length of different integers, NUMC vs CHAR, min/max length\r\n switch (text) {\r\n case \"DEC\": // 1 <= len <= 31\r\n case \"D16F\": // 1 <= len <= 31\r\n case \"D34F\": // 1 <= len <= 31\r\n case \"DF16_DEC\": // 1 <= len <= 31\r\n case \"DF34_DEC\": // 1 <= len <= 31\r\n case \"CURR\": // 1 <= len <= 31\r\n case \"QUAN\": // 1 <= len <= 31\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length, \" + infoText, infoText);\r\n }\r\n else if (decimals === undefined) {\r\n return new Types.PackedType(parseInt(length, 10), 0, { qualifiedName, conversionExit, ddicName });\r\n }\r\n return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), { qualifiedName, conversionExit, ddicName });\r\n case \"ACCP\":\r\n return new Types.CharacterType(6, { qualifiedName, conversionExit, ddicName }); // YYYYMM\r\n case \"LANG\":\r\n return new Types.CharacterType(1, { qualifiedName, conversionExit, ddicName });\r\n case \"CLNT\":\r\n return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });\r\n case \"CUKY\":\r\n return new Types.CharacterType(5, { qualifiedName, conversionExit, ddicName });\r\n case \"UNIT\": // 2 <= len <= 3\r\n return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });\r\n case \"UTCLONG\":\r\n return new Types.CharacterType(27, { qualifiedName, conversionExit, ddicName });\r\n case \"NUMC\": // 1 <= len <= 255\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", infoText);\r\n }\r\n return new Types.NumericType(parseInt(length, 10), qualifiedName);\r\n case \"CHAR\": // 1 <= len <= 30000 (1333 for table fields)\r\n case \"LCHR\": // 256 <= len <= 32000\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", infoText);\r\n }\r\n return new Types.CharacterType(parseInt(length, 10), { qualifiedName, conversionExit, ddicName });\r\n case \"RAW\": // 1 <= len <= 32000\r\n case \"LRAW\": // 256 <= len <= 32000\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", infoText);\r\n }\r\n return new Types.HexType(parseInt(length, 10), qualifiedName);\r\n case \"TIMN\": // Native HANA\r\n case \"TIMS\":\r\n return new Types.TimeType({ qualifiedName: qualifiedName }); //HHMMSS\r\n case \"DECFLOAT16\": // len = 16\r\n case \"DECFLOAT34\": // len = 34\r\n case \"D16R\": // len = 16\r\n case \"D34R\": // len = 34\r\n case \"DF16_RAW\": // len = 16\r\n case \"DF34_RAW\": // len = 34\r\n case \"FLTP\": // len = 16\r\n if (length === undefined) {\r\n return new Types.UnknownType(text + \" unknown length\", infoText);\r\n }\r\n return new Types.FloatingPointType(parseInt(length, 10), qualifiedName);\r\n case \"DATN\": // Native HANA\r\n case \"DATS\":\r\n return new Types.DateType({ qualifiedName: qualifiedName }); //YYYYMMDD\r\n case \"INT1\":\r\n case \"INT2\":\r\n case \"INT4\":\r\n case \"INT8\":\r\n return new Types.IntegerType({ qualifiedName: qualifiedName });\r\n case \"SSTR\": // 1 <= len <= 1333\r\n case \"SSTRING\": // 1 <= len <= 1333\r\n case \"STRG\": // 256 <= len\r\n case \"STRING\": // 256 <= len\r\n return new Types.StringType({ qualifiedName: qualifiedName });\r\n case \"RSTR\": // 256 <= len\r\n case \"RAWSTRING\": // 256 <= len\r\n case \"GEOM_EWKB\":\r\n return new Types.XStringType({ qualifiedName: qualifiedName });\r\n case \"D16S\":\r\n case \"D34S\":\r\n case \"DF16_SCL\":\r\n case \"DF34_SCL\":\r\n case \"PREC\":\r\n case \"VARC\":\r\n return new Types.UnknownType(text + \" is an obsolete data type\", infoText);\r\n default:\r\n return new Types.UnknownType(text + \" unknown\", infoText);\r\n }\r\n }\r\n}\r\nexports.DDIC = DDIC;\r\n//# sourceMappingURL=ddic.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/ddic.js?");
9887
9887
 
9888
9888
  /***/ }),
9889
9889
 
@@ -10092,7 +10092,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10092
10092
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10093
10093
 
10094
10094
  "use strict";
10095
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LSPLookup = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nclass LSPLookup {\r\n static lookup(cursor, reg, obj) {\r\n const inc = this.findInclude(cursor, reg);\r\n if (inc) {\r\n const found = this.ABAPFileResult(inc);\r\n return { hover: \"Include\", definition: found, implementation: found };\r\n }\r\n const fm = this.findFunctionModule(cursor);\r\n if (fm) {\r\n return { hover: \"Function Module \" + fm };\r\n }\r\n const bottomScope = new syntax_1.SyntaxLogic(reg, obj).run().spaghetti.lookupPosition(cursor.identifier.getStart(), cursor.identifier.getFilename());\r\n if (bottomScope === undefined) {\r\n return undefined;\r\n }\r\n const clas = bottomScope.findClassDefinition(cursor.token.getStr());\r\n if (clas && clas.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(clas);\r\n return {\r\n hover: \"Class Definition, \" + cursor.token.getStr(),\r\n definition: found,\r\n definitionId: clas,\r\n implementation: undefined,\r\n scope: bottomScope,\r\n };\r\n }\r\n const intf = bottomScope.findInterfaceDefinition(cursor.token.getStr());\r\n if (intf && intf.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(intf);\r\n return {\r\n hover: \"Interface Definition, \" + cursor.token.getStr(),\r\n definition: found,\r\n definitionId: intf,\r\n implementation: undefined,\r\n scope: bottomScope,\r\n };\r\n }\r\n const type = bottomScope.findType(cursor.token.getStr());\r\n if (type !== undefined && type.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(type);\r\n const hover = \"Type Definition, \" + cursor.token.getStr() + \"\\n\\n\" + this.dumpType(type);\r\n return { hover, definition: found, definitionId: type, scope: bottomScope };\r\n }\r\n const method = this.findMethodDefinition(cursor, bottomScope);\r\n if (method !== undefined && method.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(method);\r\n const hover = \"Method Definition \\\"\" + method.getName() + \"\\\"\";\r\n return { hover, definition: found, definitionId: method, scope: bottomScope };\r\n }\r\n const variable = bottomScope.findVariable(cursor.token.getStr());\r\n if (variable !== undefined && variable.getStart().equals(cursor.token.getStart())) {\r\n const hover = \"Variable Definition\\n\\n\" + this.dumpType(variable);\r\n let location = undefined;\r\n if (variable.getMeta().includes(\"built-in\" /* IdentifierMeta.BuiltIn */) === false) {\r\n location = _lsp_utils_1.LSPUtils.identiferToLocation(variable);\r\n }\r\n return { hover, definition: location, implementation: location, definitionId: variable, scope: bottomScope };\r\n }\r\n let hoverValue = \"\";\r\n const ddicRefs = reg.getDDICReferences().listByFilename(cursor.identifier.getFilename(), cursor.identifier.getStart().getRow());\r\n for (const d of ddicRefs) {\r\n if (d.object && d.token && d.token.getStart().equals(cursor.identifier.getStart())) {\r\n hoverValue += `DDIC: ${d.object.getType()} ${d.object.getName()}`;\r\n }\r\n }\r\n const refs = this.searchReferences(bottomScope, cursor.token);\r\n if (refs.length > 0) {\r\n for (const ref of refs) {\r\n if (hoverValue !== \"\") {\r\n hoverValue += \"\\n_________________\\n\";\r\n }\r\n hoverValue += this.referenceHover(ref, bottomScope, reg);\r\n }\r\n let definition = undefined;\r\n if (refs[0].resolved) {\r\n definition = _lsp_utils_1.LSPUtils.identiferToLocation(refs[0].resolved);\r\n if (definition.uri === _builtin_1.BuiltIn.filename) {\r\n definition = undefined;\r\n }\r\n }\r\n return { hover: hoverValue, definition, definitionId: refs[0].resolved, scope: bottomScope };\r\n }\r\n if (hoverValue !== \"\") {\r\n return { hover: hoverValue, scope: bottomScope };\r\n }\r\n return undefined;\r\n }\r\n ////////////////////////////////////////////\r\n static dumpType(variable) {\r\n let value = variable.toText() + \"\\n\\nType: \" + variable.getType().toText(0);\r\n if (variable.getValue()) {\r\n value += \"\\n\\nValue: ```\" + variable.getValue() + \"```\";\r\n }\r\n if (variable.getMeta().length > 0) {\r\n value += \"\\n\\nMeta: \" + variable.getMeta().join(\", \");\r\n }\r\n if (variable.getType().containsVoid() === true) {\r\n value += \"\\n\\nContains Void types\";\r\n }\r\n if (variable.getType().getQualifiedName()) {\r\n value += \"\\n\\nQualified Type Name: ```\" + variable.getType().getQualifiedName() + \"```\";\r\n }\r\n if (variable.getType().isGeneric() === true) {\r\n value += \"\\n\\nIs Generic Type\";\r\n }\r\n if (variable.getType().getConversionExit() !== undefined) {\r\n value += \"\\n\\nConversion Exit: ```\" + variable.getType().getConversionExit() + \"```\";\r\n }\r\n return value;\r\n }\r\n static referenceHover(ref, scope, reg) {\r\n var _a, _b, _c, _d, _e;\r\n let name = \"\";\r\n if (ref.resolved) {\r\n name = \"```\" + ref.resolved.getName() + \"```\";\r\n }\r\n let ret = `${ref.referenceType} ${name}`;\r\n if (ref.referenceType === _reference_1.ReferenceType.MethodReference && ((_a = ref.extra) === null || _a === void 0 ? void 0 : _a.ooName)) {\r\n let cdef = scope.findClassDefinition(ref.extra.ooName);\r\n if (cdef === undefined) {\r\n cdef = scope.findInterfaceDefinition(ref.extra.ooName);\r\n }\r\n if (cdef === undefined) {\r\n cdef = (_b = reg.getObject(\"CLAS\", ref.extra.ooName)) === null || _b === void 0 ? void 0 : _b.getDefinition();\r\n }\r\n if (cdef === undefined) {\r\n cdef = (_c = reg.getObject(\"INTF\", ref.extra.ooName)) === null || _c === void 0 ? void 0 : _c.getDefinition();\r\n }\r\n ret += \"\\n\\n\" + this.hoverMethod(ref.position.getName(), cdef);\r\n }\r\n else if (ref.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n ret += \"\\n\\n\" + this.dumpType(ref.resolved);\r\n }\r\n else if (ref.referenceType === _reference_1.ReferenceType.BuiltinMethodReference) {\r\n const builtinDef = new _builtin_1.BuiltIn().searchBuiltin((_e = (_d = ref.resolved) === null || _d === void 0 ? void 0 : _d.getName()) === null || _e === void 0 ? void 0 : _e.toUpperCase());\r\n if (builtinDef === undefined) {\r\n return \"Error: builtin method signature not found\";\r\n }\r\n ret += \"\\n\\n\" + this.methodParameters(builtinDef);\r\n }\r\n if (ref.resolved) {\r\n ret += \"\\n\\n(Resolved)\";\r\n }\r\n if (ref.extra !== undefined && Object.keys(ref.extra).length > 0) {\r\n ret += \"\\n\\nExtra: \" + JSON.stringify(ref.extra);\r\n }\r\n return ret;\r\n }\r\n static hoverMethod(method, classDef) {\r\n if (classDef === undefined) {\r\n return \"class not found\";\r\n }\r\n const methodDef = classDef.getMethodDefinitions().getByName(method);\r\n if (methodDef === undefined) {\r\n return \"method not found in definition\";\r\n }\r\n return this.methodParameters(methodDef);\r\n }\r\n static methodParameters(methodDef) {\r\n let ret = \"\";\r\n const parameters = methodDef.getParameters();\r\n const importing = parameters.getImporting();\r\n if (importing.length > 0) {\r\n ret += \"IMPORTING\\n\";\r\n for (const p of importing) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const exporting = parameters.getExporting();\r\n if (exporting.length > 0) {\r\n ret += \"EXPORTING\\n\";\r\n for (const p of exporting) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const changing = parameters.getChanging();\r\n if (changing.length > 0) {\r\n ret += \"CHANGING\\n\";\r\n for (const p of changing) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const r = parameters.getReturning();\r\n if (r) {\r\n ret += \"RETURNING\\n\" + this.singleParameter(r);\r\n }\r\n if (methodDef.getRaising().length > 0) {\r\n ret += \"RAISING\\n\";\r\n for (const p of methodDef.getRaising()) {\r\n ret += \"* \" + p + \"\\n\";\r\n }\r\n }\r\n return ret;\r\n }\r\n static singleParameter(p) {\r\n let extra = p.getMeta().join(\", \");\r\n if (extra !== \"\") {\r\n extra = \"(Meta: \" + extra + \")\";\r\n }\r\n return \"* \" + p.getName() + extra + \" TYPE \" + p.getType().toText(1) + \"\\n\\n\";\r\n }\r\n static searchReferences(scope, token) {\r\n const ret = [];\r\n for (const r of scope.getData().references) {\r\n if (r.position.getStart().equals(token.getStart())) {\r\n ret.push(r);\r\n }\r\n }\r\n const parent = scope.getParent();\r\n if (parent) {\r\n ret.push(...this.searchReferences(parent, token));\r\n }\r\n return ret;\r\n }\r\n static ABAPFileResult(abap) {\r\n return {\r\n uri: abap.getFilename(),\r\n range: LServer.Range.create(0, 0, 0, 0),\r\n };\r\n }\r\n static findMethodDefinition(found, scope) {\r\n var _a, _b, _c, _d;\r\n if (scope.getIdentifier().stype !== _scope_type_1.ScopeType.ClassDefinition\r\n || !(found.snode.get() instanceof Statements.MethodDef)) {\r\n return undefined;\r\n }\r\n const nameToken = (_a = found.snode.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n return undefined;\r\n }\r\n if (found.snode.findFirstExpression(Expressions.Redefinition)) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n if (nameToken.getStart().getCol() !== found.token.getStart().getCol()\r\n || nameToken.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n const def = (_d = (_c = (_b = scope.getParent()) === null || _b === void 0 ? void 0 : _b.findClassDefinition(scope.getIdentifier().sname)) === null || _c === void 0 ? void 0 : _c.getMethodDefinitions()) === null || _d === void 0 ? void 0 : _d.getByName(nameToken.getStr());\r\n return def;\r\n }\r\n static findFunctionModule(found) {\r\n if (!(found.snode.get() instanceof Statements.CallFunction)) {\r\n return undefined;\r\n }\r\n const name = found.snode.findFirstExpression(Expressions.FunctionName);\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n const token = name.getFirstToken();\r\n if (token.getStart().getCol() !== found.token.getStart().getCol()\r\n || token.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n return token.getStr();\r\n }\r\n static findInclude(found, reg) {\r\n if (!(found.snode.get() instanceof Statements.Include)) {\r\n return;\r\n }\r\n const name = found.snode.findFirstExpression(Expressions.IncludeName);\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n const token = name.getFirstToken();\r\n if (token.getStart().getCol() !== found.token.getStart().getCol()\r\n || token.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n const obj = reg.getObject(\"PROG\", token.getStr());\r\n if (obj) {\r\n return obj.getABAPFiles()[0];\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.LSPLookup = LSPLookup;\r\n//# sourceMappingURL=_lookup.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/_lookup.js?");
10095
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LSPLookup = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nclass LSPLookup {\r\n static lookup(cursor, reg, obj) {\r\n const inc = this.findInclude(cursor, reg);\r\n if (inc) {\r\n const found = this.ABAPFileResult(inc);\r\n return { hover: \"Include\", definition: found, implementation: found };\r\n }\r\n const fm = this.findFunctionModule(cursor);\r\n if (fm) {\r\n return { hover: \"Function Module \" + fm };\r\n }\r\n const bottomScope = new syntax_1.SyntaxLogic(reg, obj).run().spaghetti.lookupPosition(cursor.identifier.getStart(), cursor.identifier.getFilename());\r\n if (bottomScope === undefined) {\r\n return undefined;\r\n }\r\n const clas = bottomScope.findClassDefinition(cursor.token.getStr());\r\n if (clas && clas.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(clas);\r\n return {\r\n hover: \"Class Definition, \" + cursor.token.getStr(),\r\n definition: found,\r\n definitionId: clas,\r\n implementation: undefined,\r\n scope: bottomScope,\r\n };\r\n }\r\n const intf = bottomScope.findInterfaceDefinition(cursor.token.getStr());\r\n if (intf && intf.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(intf);\r\n return {\r\n hover: \"Interface Definition, \" + cursor.token.getStr(),\r\n definition: found,\r\n definitionId: intf,\r\n implementation: undefined,\r\n scope: bottomScope,\r\n };\r\n }\r\n const type = bottomScope.findType(cursor.token.getStr());\r\n if (type !== undefined && type.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(type);\r\n const hover = \"Type Definition, \" + cursor.token.getStr() + \"\\n\\n\" + this.dumpType(type);\r\n return { hover, definition: found, definitionId: type, scope: bottomScope };\r\n }\r\n const method = this.findMethodDefinition(cursor, bottomScope);\r\n if (method !== undefined && method.getStart().equals(cursor.token.getStart())) {\r\n const found = _lsp_utils_1.LSPUtils.identiferToLocation(method);\r\n const hover = \"Method Definition \\\"\" + method.getName() + \"\\\"\";\r\n return { hover, definition: found, definitionId: method, scope: bottomScope };\r\n }\r\n const variable = bottomScope.findVariable(cursor.token.getStr());\r\n if (variable !== undefined && variable.getStart().equals(cursor.token.getStart())) {\r\n const hover = \"Variable Definition\\n\\n\" + this.dumpType(variable);\r\n let location = undefined;\r\n if (variable.getMeta().includes(\"built-in\" /* IdentifierMeta.BuiltIn */) === false) {\r\n location = _lsp_utils_1.LSPUtils.identiferToLocation(variable);\r\n }\r\n return { hover, definition: location, implementation: location, definitionId: variable, scope: bottomScope };\r\n }\r\n let hoverValue = \"\";\r\n const ddicRefs = reg.getDDICReferences().listByFilename(cursor.identifier.getFilename(), cursor.identifier.getStart().getRow());\r\n for (const d of ddicRefs) {\r\n if (d.object && d.token && d.token.getStart().equals(cursor.identifier.getStart())) {\r\n hoverValue += `DDIC: ${d.object.getType()} ${d.object.getName()}`;\r\n }\r\n }\r\n const refs = this.searchReferences(bottomScope, cursor.token);\r\n if (refs.length > 0) {\r\n for (const ref of refs) {\r\n if (hoverValue !== \"\") {\r\n hoverValue += \"\\n_________________\\n\";\r\n }\r\n hoverValue += this.referenceHover(ref, bottomScope, reg);\r\n }\r\n let definition = undefined;\r\n if (refs[0].resolved) {\r\n definition = _lsp_utils_1.LSPUtils.identiferToLocation(refs[0].resolved);\r\n if (definition.uri === _builtin_1.BuiltIn.filename) {\r\n definition = undefined;\r\n }\r\n }\r\n return { hover: hoverValue, definition, definitionId: refs[0].resolved, scope: bottomScope };\r\n }\r\n if (hoverValue !== \"\") {\r\n return { hover: hoverValue, scope: bottomScope };\r\n }\r\n return undefined;\r\n }\r\n ////////////////////////////////////////////\r\n static dumpType(variable) {\r\n let value = variable.toText() + \"\\n\\nType: \" + variable.getType().toText(0);\r\n if (variable.getValue()) {\r\n value += \"\\n\\nValue: ```\" + variable.getValue() + \"```\";\r\n }\r\n if (variable.getMeta().length > 0) {\r\n value += \"\\n\\nMeta: \" + variable.getMeta().join(\", \");\r\n }\r\n if (variable.getType().containsVoid() === true) {\r\n value += \"\\n\\nContains Void types\";\r\n }\r\n if (variable.getType().getQualifiedName()) {\r\n value += \"\\n\\nQualified Type Name: ```\" + variable.getType().getQualifiedName() + \"```\";\r\n }\r\n if (variable.getType().isGeneric() === true) {\r\n value += \"\\n\\nIs Generic Type\";\r\n }\r\n if (variable.getType().getConversionExit() !== undefined) {\r\n value += \"\\n\\nConversion Exit: ```\" + variable.getType().getConversionExit() + \"```\";\r\n }\r\n if (variable.getType().getDDICName() !== undefined) {\r\n value += \"\\n\\nDDIC Name: ```\" + variable.getType().getDDICName() + \"```\";\r\n }\r\n return value;\r\n }\r\n static referenceHover(ref, scope, reg) {\r\n var _a, _b, _c, _d, _e;\r\n let name = \"\";\r\n if (ref.resolved) {\r\n name = \"```\" + ref.resolved.getName() + \"```\";\r\n }\r\n let ret = `${ref.referenceType} ${name}`;\r\n if (ref.referenceType === _reference_1.ReferenceType.MethodReference && ((_a = ref.extra) === null || _a === void 0 ? void 0 : _a.ooName)) {\r\n let cdef = scope.findClassDefinition(ref.extra.ooName);\r\n if (cdef === undefined) {\r\n cdef = scope.findInterfaceDefinition(ref.extra.ooName);\r\n }\r\n if (cdef === undefined) {\r\n cdef = (_b = reg.getObject(\"CLAS\", ref.extra.ooName)) === null || _b === void 0 ? void 0 : _b.getDefinition();\r\n }\r\n if (cdef === undefined) {\r\n cdef = (_c = reg.getObject(\"INTF\", ref.extra.ooName)) === null || _c === void 0 ? void 0 : _c.getDefinition();\r\n }\r\n ret += \"\\n\\n\" + this.hoverMethod(ref.position.getName(), cdef);\r\n }\r\n else if (ref.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n ret += \"\\n\\n\" + this.dumpType(ref.resolved);\r\n }\r\n else if (ref.referenceType === _reference_1.ReferenceType.BuiltinMethodReference) {\r\n const builtinDef = new _builtin_1.BuiltIn().searchBuiltin((_e = (_d = ref.resolved) === null || _d === void 0 ? void 0 : _d.getName()) === null || _e === void 0 ? void 0 : _e.toUpperCase());\r\n if (builtinDef === undefined) {\r\n return \"Error: builtin method signature not found\";\r\n }\r\n ret += \"\\n\\n\" + this.methodParameters(builtinDef);\r\n }\r\n if (ref.resolved) {\r\n ret += \"\\n\\n(Resolved)\";\r\n }\r\n if (ref.extra !== undefined && Object.keys(ref.extra).length > 0) {\r\n ret += \"\\n\\nExtra: \" + JSON.stringify(ref.extra);\r\n }\r\n return ret;\r\n }\r\n static hoverMethod(method, classDef) {\r\n if (classDef === undefined) {\r\n return \"class not found\";\r\n }\r\n const methodDef = classDef.getMethodDefinitions().getByName(method);\r\n if (methodDef === undefined) {\r\n return \"method not found in definition\";\r\n }\r\n return this.methodParameters(methodDef);\r\n }\r\n static methodParameters(methodDef) {\r\n let ret = \"\";\r\n const parameters = methodDef.getParameters();\r\n const importing = parameters.getImporting();\r\n if (importing.length > 0) {\r\n ret += \"IMPORTING\\n\";\r\n for (const p of importing) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const exporting = parameters.getExporting();\r\n if (exporting.length > 0) {\r\n ret += \"EXPORTING\\n\";\r\n for (const p of exporting) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const changing = parameters.getChanging();\r\n if (changing.length > 0) {\r\n ret += \"CHANGING\\n\";\r\n for (const p of changing) {\r\n ret += this.singleParameter(p);\r\n }\r\n }\r\n const r = parameters.getReturning();\r\n if (r) {\r\n ret += \"RETURNING\\n\" + this.singleParameter(r);\r\n }\r\n if (methodDef.getRaising().length > 0) {\r\n ret += \"RAISING\\n\";\r\n for (const p of methodDef.getRaising()) {\r\n ret += \"* \" + p + \"\\n\";\r\n }\r\n }\r\n return ret;\r\n }\r\n static singleParameter(p) {\r\n let extra = p.getMeta().join(\", \");\r\n if (extra !== \"\") {\r\n extra = \"(Meta: \" + extra + \")\";\r\n }\r\n return \"* \" + p.getName() + extra + \" TYPE \" + p.getType().toText(1) + \"\\n\\n\";\r\n }\r\n static searchReferences(scope, token) {\r\n const ret = [];\r\n for (const r of scope.getData().references) {\r\n if (r.position.getStart().equals(token.getStart())) {\r\n ret.push(r);\r\n }\r\n }\r\n const parent = scope.getParent();\r\n if (parent) {\r\n ret.push(...this.searchReferences(parent, token));\r\n }\r\n return ret;\r\n }\r\n static ABAPFileResult(abap) {\r\n return {\r\n uri: abap.getFilename(),\r\n range: LServer.Range.create(0, 0, 0, 0),\r\n };\r\n }\r\n static findMethodDefinition(found, scope) {\r\n var _a, _b, _c, _d;\r\n if (scope.getIdentifier().stype !== _scope_type_1.ScopeType.ClassDefinition\r\n || !(found.snode.get() instanceof Statements.MethodDef)) {\r\n return undefined;\r\n }\r\n const nameToken = (_a = found.snode.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n return undefined;\r\n }\r\n if (found.snode.findFirstExpression(Expressions.Redefinition)) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n if (nameToken.getStart().getCol() !== found.token.getStart().getCol()\r\n || nameToken.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n const def = (_d = (_c = (_b = scope.getParent()) === null || _b === void 0 ? void 0 : _b.findClassDefinition(scope.getIdentifier().sname)) === null || _c === void 0 ? void 0 : _c.getMethodDefinitions()) === null || _d === void 0 ? void 0 : _d.getByName(nameToken.getStr());\r\n return def;\r\n }\r\n static findFunctionModule(found) {\r\n if (!(found.snode.get() instanceof Statements.CallFunction)) {\r\n return undefined;\r\n }\r\n const name = found.snode.findFirstExpression(Expressions.FunctionName);\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n const token = name.getFirstToken();\r\n if (token.getStart().getCol() !== found.token.getStart().getCol()\r\n || token.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n return token.getStr();\r\n }\r\n static findInclude(found, reg) {\r\n if (!(found.snode.get() instanceof Statements.Include)) {\r\n return;\r\n }\r\n const name = found.snode.findFirstExpression(Expressions.IncludeName);\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // check the cursor is at the right token\r\n const token = name.getFirstToken();\r\n if (token.getStart().getCol() !== found.token.getStart().getCol()\r\n || token.getStart().getRow() !== found.token.getStart().getRow()) {\r\n return undefined;\r\n }\r\n const obj = reg.getObject(\"PROG\", token.getStr());\r\n if (obj) {\r\n return obj.getABAPFiles()[0];\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.LSPLookup = LSPLookup;\r\n//# sourceMappingURL=_lookup.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/_lookup.js?");
10096
10096
 
10097
10097
  /***/ }),
10098
10098
 
@@ -10642,7 +10642,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10642
10642
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10643
10643
 
10644
10644
  "use strict";
10645
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataElement = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass DataElement extends _abstract_object_1.AbstractObject {\r\n constructor() {\r\n super(...arguments);\r\n this.parsedXML = undefined;\r\n }\r\n getType() {\r\n return \"DTEL\";\r\n }\r\n getDescription() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n super.setDirty();\r\n }\r\n getDomainName() {\r\n var _a;\r\n this.parse();\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.domname;\r\n }\r\n parseType(reg) {\r\n const references = [];\r\n let lookup = undefined;\r\n if (this.parsedXML === undefined) {\r\n lookup = { type: new Types.UnknownType(\"Data Element \" + this.getName() + \", parser error\") };\r\n }\r\n else {\r\n const ddic = new ddic_1.DDIC(reg);\r\n if (this.parsedXML.refkind === \"D\") {\r\n if (this.parsedXML.domname === undefined || this.parsedXML.domname === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DOMNAME unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName());\r\n }\r\n }\r\n else if (this.parsedXML.refkind === \"R\") {\r\n if (this.parsedXML.domname === undefined || this.parsedXML.domname === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DOMNAME unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = ddic.lookupObject(this.parsedXML.domname);\r\n }\r\n }\r\n else {\r\n if (this.parsedXML.datatype === undefined || this.parsedXML.datatype === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DATATYPE unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName()) };\r\n }\r\n }\r\n }\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n reg.getDDICReferences().setUsing(this, references);\r\n return lookup.type;\r\n }\r\n parse() {\r\n var _a, _b, _c;\r\n if (this.parsedXML !== undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const start = Date.now();\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const dd04v = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a[\"asx:abap\"]) === null || _b === void 0 ? void 0 : _b[\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD04V;\r\n this.parsedXML = {\r\n description: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DDTEXT,\r\n refkind: dd04v === null || dd04v === void 0 ? void 0 : dd04v.REFKIND,\r\n domname: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DOMNAME,\r\n datatype: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DATATYPE,\r\n leng: dd04v === null || dd04v === void 0 ? void 0 : dd04v.LENG,\r\n decimals: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DECIMALS,\r\n };\r\n const end = Date.now();\r\n return { updated: true, runtime: end - start };\r\n }\r\n}\r\nexports.DataElement = DataElement;\r\n//# sourceMappingURL=data_element.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/data_element.js?");
10645
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataElement = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass DataElement extends _abstract_object_1.AbstractObject {\r\n constructor() {\r\n super(...arguments);\r\n this.parsedXML = undefined;\r\n }\r\n getType() {\r\n return \"DTEL\";\r\n }\r\n getDescription() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n super.setDirty();\r\n }\r\n getDomainName() {\r\n var _a;\r\n this.parse();\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.domname;\r\n }\r\n parseType(reg) {\r\n const references = [];\r\n let lookup = undefined;\r\n if (this.parsedXML === undefined) {\r\n lookup = { type: new Types.UnknownType(\"Data Element \" + this.getName() + \", parser error\") };\r\n }\r\n else {\r\n const ddic = new ddic_1.DDIC(reg);\r\n if (this.parsedXML.refkind === \"D\") {\r\n if (this.parsedXML.domname === undefined || this.parsedXML.domname === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DOMNAME unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName());\r\n }\r\n }\r\n else if (this.parsedXML.refkind === \"R\") {\r\n if (this.parsedXML.domname === undefined || this.parsedXML.domname === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DOMNAME unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = ddic.lookupObject(this.parsedXML.domname);\r\n }\r\n }\r\n else {\r\n if (this.parsedXML.datatype === undefined || this.parsedXML.datatype === \"\") {\r\n lookup = { type: new Types.UnknownType(\"DATATYPE unexpectely empty in \" + this.getName()) };\r\n }\r\n else {\r\n lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName(), this.getName()) };\r\n }\r\n }\r\n }\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n reg.getDDICReferences().setUsing(this, references);\r\n return lookup.type;\r\n }\r\n parse() {\r\n var _a, _b, _c;\r\n if (this.parsedXML !== undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const start = Date.now();\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const dd04v = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a[\"asx:abap\"]) === null || _b === void 0 ? void 0 : _b[\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD04V;\r\n this.parsedXML = {\r\n description: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DDTEXT,\r\n refkind: dd04v === null || dd04v === void 0 ? void 0 : dd04v.REFKIND,\r\n domname: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DOMNAME,\r\n datatype: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DATATYPE,\r\n leng: dd04v === null || dd04v === void 0 ? void 0 : dd04v.LENG,\r\n decimals: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DECIMALS,\r\n };\r\n const end = Date.now();\r\n return { updated: true, runtime: end - start };\r\n }\r\n}\r\nexports.DataElement = DataElement;\r\n//# sourceMappingURL=data_element.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/data_element.js?");
10646
10646
 
10647
10647
  /***/ }),
10648
10648
 
@@ -10675,7 +10675,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10675
10675
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10676
10676
 
10677
10677
  "use strict";
10678
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Domain = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\r\nclass Domain extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"DOMA\";\r\n }\r\n getDescription() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;\r\n }\r\n getConversionExit() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.conversionExit;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n this.parsedType = undefined;\r\n super.setDirty();\r\n }\r\n parseType(reg, parent) {\r\n if (this.parsedType) {\r\n return this.parsedType;\r\n }\r\n else if (this.parsedXML === undefined) {\r\n return new Types.UnknownType(\"Domain \" + this.getName() + \" parser error\", this.getName());\r\n }\r\n const ddic = new ddic_1.DDIC(reg);\r\n this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, parent || this.getName(), parent !== undefined, this.parsedXML.conversionExit);\r\n return this.parsedType;\r\n }\r\n parse() {\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n if (this.parsedXML) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const start = Date.now();\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const dd01v = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a[\"asx:abap\"]) === null || _b === void 0 ? void 0 : _b[\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD01V;\r\n const dd07v_tab = (0, xml_utils_1.xmlToArray)((_g = (_f = (_e = (_d = parsed.abapGit) === null || _d === void 0 ? void 0 : _d[\"asx:abap\"]) === null || _e === void 0 ? void 0 : _e[\"asx:values\"]) === null || _f === void 0 ? void 0 : _f.DD07V_TAB) === null || _g === void 0 ? void 0 : _g.DD07V);\r\n const values = [];\r\n for (const ddo7v of dd07v_tab) {\r\n const value = {\r\n description: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DDTEXT,\r\n low: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DOMVALUE_L,\r\n high: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DOMVALUE_H,\r\n language: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DDLANGUAGE,\r\n };\r\n values.push(value);\r\n }\r\n this.parsedXML = {\r\n description: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DDTEXT,\r\n datatype: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DATATYPE,\r\n length: dd01v === null || dd01v === void 0 ? void 0 : dd01v.LENG,\r\n conversionExit: dd01v === null || dd01v === void 0 ? void 0 : dd01v.CONVEXIT,\r\n decimals: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DECIMALS,\r\n values: values,\r\n };\r\n const end = Date.now();\r\n return { updated: true, runtime: end - start };\r\n }\r\n getFixedValues() {\r\n var _a, _b;\r\n return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : [];\r\n }\r\n}\r\nexports.Domain = Domain;\r\n//# sourceMappingURL=domain.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/domain.js?");
10678
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Domain = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\r\nclass Domain extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"DOMA\";\r\n }\r\n getDescription() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;\r\n }\r\n getConversionExit() {\r\n var _a;\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.conversionExit;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n this.parsedType = undefined;\r\n super.setDirty();\r\n }\r\n parseType(reg, dataElement) {\r\n if (this.parsedType) {\r\n return this.parsedType;\r\n }\r\n else if (this.parsedXML === undefined) {\r\n return new Types.UnknownType(\"Domain \" + this.getName() + \" parser error\", this.getName());\r\n }\r\n const ddic = new ddic_1.DDIC(reg);\r\n this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);\r\n return this.parsedType;\r\n }\r\n parse() {\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n if (this.parsedXML) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const start = Date.now();\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const dd01v = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a[\"asx:abap\"]) === null || _b === void 0 ? void 0 : _b[\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD01V;\r\n const dd07v_tab = (0, xml_utils_1.xmlToArray)((_g = (_f = (_e = (_d = parsed.abapGit) === null || _d === void 0 ? void 0 : _d[\"asx:abap\"]) === null || _e === void 0 ? void 0 : _e[\"asx:values\"]) === null || _f === void 0 ? void 0 : _f.DD07V_TAB) === null || _g === void 0 ? void 0 : _g.DD07V);\r\n const values = [];\r\n for (const ddo7v of dd07v_tab) {\r\n const value = {\r\n description: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DDTEXT,\r\n low: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DOMVALUE_L,\r\n high: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DOMVALUE_H,\r\n language: ddo7v === null || ddo7v === void 0 ? void 0 : ddo7v.DDLANGUAGE,\r\n };\r\n values.push(value);\r\n }\r\n this.parsedXML = {\r\n description: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DDTEXT,\r\n datatype: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DATATYPE,\r\n length: dd01v === null || dd01v === void 0 ? void 0 : dd01v.LENG,\r\n conversionExit: dd01v === null || dd01v === void 0 ? void 0 : dd01v.CONVEXIT,\r\n decimals: dd01v === null || dd01v === void 0 ? void 0 : dd01v.DECIMALS,\r\n values: values,\r\n };\r\n const end = Date.now();\r\n return { updated: true, runtime: end - start };\r\n }\r\n getFixedValues() {\r\n var _a, _b;\r\n return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : [];\r\n }\r\n}\r\nexports.Domain = Domain;\r\n//# sourceMappingURL=domain.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/domain.js?");
10679
10679
 
10680
10680
  /***/ }),
10681
10681
 
@@ -11456,7 +11456,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11456
11456
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11457
11457
 
11458
11458
  "use strict";
11459
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TableType = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass TableType extends _abstract_object_1.AbstractObject {\r\n constructor() {\r\n super(...arguments);\r\n this.parsedXML = undefined;\r\n }\r\n getType() {\r\n return \"TTYP\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n super.setDirty();\r\n }\r\n parseType(reg) {\r\n this.parseXML();\r\n const ddic = new ddic_1.DDIC(reg);\r\n const references = [];\r\n let type;\r\n if (this.parsedXML === undefined) {\r\n type = new Types.UnknownType(\"Table Type, parser error\", this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"S\") {\r\n const lookup = ddic.lookupTableOrView(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"E\") {\r\n const lookup = ddic.lookupDataElement(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"L\") {\r\n const lookup = ddic.lookupTableType(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype === \"OBJECT\") {\r\n type = new Types.TableType(new basic_1.GenericObjectReferenceType(), { withHeader: false }, this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype === \"DATA\") {\r\n type = new Types.TableType(new basic_1.DataReference(new basic_1.AnyType()), { withHeader: false }, this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype !== undefined) {\r\n const lookup = ddic.lookupObject(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"\") {\r\n if (this.parsedXML.datatype === undefined) {\r\n type = new Types.UnknownType(\"Table Type, empty DATATYPE\" + this.getName(), this.getName());\r\n }\r\n else {\r\n const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName(), false);\r\n type = new Types.TableType(row, { withHeader: false }, this.getName());\r\n }\r\n }\r\n else {\r\n type = new Types.UnknownType(\"Table Type, unknown kind \\\"\" + this.parsedXML.rowkind + \"\\\"\" + this.getName(), this.getName());\r\n }\r\n reg.getDDICReferences().setUsing(this, references);\r\n return type;\r\n }\r\n ////////////////////\r\n parseXML() {\r\n if (this.parsedXML !== undefined) {\r\n return;\r\n }\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined || parsed.abapGit === undefined) {\r\n return;\r\n }\r\n const dd40v = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DD40V;\r\n this.parsedXML.rowtype = dd40v.ROWTYPE ? dd40v.ROWTYPE : \"\";\r\n this.parsedXML.rowkind = dd40v.ROWKIND ? dd40v.ROWKIND : \"\";\r\n this.parsedXML.datatype = dd40v.DATATYPE;\r\n this.parsedXML.leng = dd40v.LENG;\r\n this.parsedXML.decimals = dd40v.DECIMALS;\r\n }\r\n}\r\nexports.TableType = TableType;\r\n//# sourceMappingURL=table_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/table_type.js?");
11459
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TableType = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass TableType extends _abstract_object_1.AbstractObject {\r\n constructor() {\r\n super(...arguments);\r\n this.parsedXML = undefined;\r\n }\r\n getType() {\r\n return \"TTYP\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n setDirty() {\r\n this.parsedXML = undefined;\r\n super.setDirty();\r\n }\r\n parseType(reg) {\r\n this.parseXML();\r\n const ddic = new ddic_1.DDIC(reg);\r\n const references = [];\r\n let type;\r\n if (this.parsedXML === undefined) {\r\n type = new Types.UnknownType(\"Table Type, parser error\", this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"S\") {\r\n const lookup = ddic.lookupTableOrView(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"E\") {\r\n const lookup = ddic.lookupDataElement(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"L\") {\r\n const lookup = ddic.lookupTableType(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype === \"OBJECT\") {\r\n type = new Types.TableType(new basic_1.GenericObjectReferenceType(), { withHeader: false }, this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype === \"DATA\") {\r\n type = new Types.TableType(new basic_1.DataReference(new basic_1.AnyType()), { withHeader: false }, this.getName());\r\n }\r\n else if (this.parsedXML.rowkind === \"R\" && this.parsedXML.rowtype !== undefined) {\r\n const lookup = ddic.lookupObject(this.parsedXML.rowtype);\r\n type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());\r\n if (lookup.object) {\r\n references.push({ object: lookup.object });\r\n }\r\n }\r\n else if (this.parsedXML.rowkind === \"\") {\r\n if (this.parsedXML.datatype === undefined) {\r\n type = new Types.UnknownType(\"Table Type, empty DATATYPE\" + this.getName(), this.getName());\r\n }\r\n else {\r\n const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName());\r\n type = new Types.TableType(row, { withHeader: false }, this.getName());\r\n }\r\n }\r\n else {\r\n type = new Types.UnknownType(\"Table Type, unknown kind \\\"\" + this.parsedXML.rowkind + \"\\\"\" + this.getName(), this.getName());\r\n }\r\n reg.getDDICReferences().setUsing(this, references);\r\n return type;\r\n }\r\n ////////////////////\r\n parseXML() {\r\n if (this.parsedXML !== undefined) {\r\n return;\r\n }\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined || parsed.abapGit === undefined) {\r\n return;\r\n }\r\n const dd40v = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DD40V;\r\n this.parsedXML.rowtype = dd40v.ROWTYPE ? dd40v.ROWTYPE : \"\";\r\n this.parsedXML.rowkind = dd40v.ROWKIND ? dd40v.ROWKIND : \"\";\r\n this.parsedXML.datatype = dd40v.DATATYPE;\r\n this.parsedXML.leng = dd40v.LENG;\r\n this.parsedXML.decimals = dd40v.DECIMALS;\r\n }\r\n}\r\nexports.TableType = TableType;\r\n//# sourceMappingURL=table_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/table_type.js?");
11460
11460
 
11461
11461
  /***/ }),
11462
11462
 
@@ -11665,7 +11665,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11665
11665
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11666
11666
 
11667
11667
  "use strict";
11668
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.94\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11668
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.95\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11669
11669
 
11670
11670
  /***/ }),
11671
11671
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.93.94",
3
+ "version": "2.93.95",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.93.94",
40
+ "@abaplint/core": "^2.93.95",
41
41
  "@types/chai": "^4.3.4",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",
@@ -49,7 +49,7 @@
49
49
  "eslint": "^8.28.0",
50
50
  "glob": "^7.2.3",
51
51
  "json5": "^2.2.1",
52
- "memfs": "^3.4.11",
52
+ "memfs": "^3.4.12",
53
53
  "minimist": "^1.2.7",
54
54
  "mocha": "^10.1.0",
55
55
  "progress": "^2.0.3",