@abaplint/transpiler-cli 2.3.52 → 2.3.53

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/bundle.js +8 -8
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -6506,7 +6506,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6506
6506
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6507
6507
 
6508
6508
  "use strict";
6509
- 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\") });\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/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6509
+ 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/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6510
6510
 
6511
6511
  /***/ }),
6512
6512
 
@@ -8794,7 +8794,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8794
8794
  /***/ ((__unused_webpack_module, exports) => {
8795
8795
 
8796
8796
  "use strict";
8797
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AbstractType = void 0;\r\nclass AbstractType {\r\n constructor(qualifiedName) {\r\n this.qualifiedName = qualifiedName;\r\n }\r\n /** fully qualified symbolic name of the type */\r\n getQualifiedName() {\r\n return this.qualifiedName;\r\n }\r\n}\r\nexports.AbstractType = AbstractType;\r\n//# sourceMappingURL=_abstract_type.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js?");
8797
+ 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/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js?");
8798
8798
 
8799
8799
  /***/ }),
8800
8800
 
@@ -8816,7 +8816,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8816
8816
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8817
8817
 
8818
8818
  "use strict";
8819
- 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) {\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 cloneType(qualifiedName) {\r\n return new CharacterType(this.length, qualifiedName);\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/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js?");
8819
+ 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);\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/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js?");
8820
8820
 
8821
8821
  /***/ }),
8822
8822
 
@@ -9751,7 +9751,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9751
9751
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9752
9752
 
9753
9753
  "use strict";
9754
- 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) {\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); // YYYYMM\r\n case \"LANG\":\r\n return new Types.CharacterType(1, qualified);\r\n case \"CLNT\":\r\n return new Types.CharacterType(3, qualified);\r\n case \"CUKY\":\r\n return new Types.CharacterType(5, qualified);\r\n case \"UNIT\": // 2 <= len <= 3\r\n return new Types.CharacterType(3, qualified);\r\n case \"UTCLONG\":\r\n return new Types.CharacterType(27, qualified);\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);\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/transpiler-cli/./node_modules/@abaplint/core/build/src/ddic.js?");
9754
+ 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/transpiler-cli/./node_modules/@abaplint/core/build/src/ddic.js?");
9755
9755
 
9756
9756
  /***/ }),
9757
9757
 
@@ -9960,7 +9960,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9960
9960
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9961
9961
 
9962
9962
  "use strict";
9963
- 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 = value + \"\\n\\nValue: ```\" + variable.getValue() + \"```\";\r\n }\r\n if (variable.getMeta().length > 0) {\r\n value = value + \"\\n\\nMeta: \" + variable.getMeta().join(\", \");\r\n }\r\n if (variable.getType().containsVoid() === true) {\r\n value = value + \"\\n\\nContains Void types\";\r\n }\r\n if (variable.getType().getQualifiedName()) {\r\n value = value + \"\\n\\nQualified Type Name: ```\" + variable.getType().getQualifiedName() + \"```\";\r\n }\r\n if (variable.getType().isGeneric() === true) {\r\n value = value + \"\\n\\nIs Generic Type\";\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/transpiler-cli/./node_modules/@abaplint/core/build/src/lsp/_lookup.js?");
9963
+ 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/transpiler-cli/./node_modules/@abaplint/core/build/src/lsp/_lookup.js?");
9964
9964
 
9965
9965
  /***/ }),
9966
9966
 
@@ -10543,7 +10543,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10543
10543
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10544
10544
 
10545
10545
  "use strict";
10546
- 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);\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/transpiler-cli/./node_modules/@abaplint/core/build/src/objects/domain.js?");
10546
+ 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/transpiler-cli/./node_modules/@abaplint/core/build/src/objects/domain.js?");
10547
10547
 
10548
10548
  /***/ }),
10549
10549
 
@@ -11533,7 +11533,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11533
11533
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11534
11534
 
11535
11535
  "use strict";
11536
- 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.92\";\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/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
11536
+ 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.93\";\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/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
11537
11537
 
11538
11538
  /***/ }),
11539
11539
 
@@ -15603,7 +15603,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
15603
15603
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15604
15604
 
15605
15605
  "use strict";
15606
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TranspileTypes = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass TranspileTypes {\r\n declare(t) {\r\n const type = t.getType();\r\n return \"let \" + t.getName().toLowerCase() + \" = \" + this.toType(type) + \";\";\r\n }\r\n declareStaticSkipVoid(pre, t) {\r\n const type = t.getType();\r\n const code = this.toType(type);\r\n // todo, this should look at the configuration, for runtime vs compile time errors\r\n if (code.includes(\"Void type\") || code.includes(\"abap.types.typeTodo\")) {\r\n return \"\";\r\n }\r\n return pre + t.getName().toLowerCase() + \" = \" + code + \";\\n\";\r\n }\r\n toType(type) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n let resolved = \"\";\r\n let extra = \"\";\r\n if (type instanceof abaplint.BasicTypes.ObjectReferenceType\r\n || type instanceof abaplint.BasicTypes.GenericObjectReferenceType) {\r\n resolved = \"ABAPObject\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_a = type.getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.TableType) {\r\n resolved = \"Table\";\r\n extra = this.toType(type.getRowType());\r\n extra += \", \" + JSON.stringify(type.getOptions());\r\n if (type.getQualifiedName() !== undefined) {\r\n extra += \", \\\"\" + type.getQualifiedName() + \"\\\"\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.IntegerType) {\r\n resolved = \"Integer\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_b = type.getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.StringType) {\r\n resolved = \"String\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_c = type.getQualifiedName()) === null || _c === void 0 ? void 0 : _c.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.UTCLongType) {\r\n resolved = \"UTCLong\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_d = type.getQualifiedName()) === null || _d === void 0 ? void 0 : _d.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DateType) {\r\n resolved = \"Date\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_e = type.getQualifiedName()) === null || _e === void 0 ? void 0 : _e.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.TimeType) {\r\n resolved = \"Time\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_f = type.getQualifiedName()) === null || _f === void 0 ? void 0 : _f.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DataReference) {\r\n resolved = \"DataReference\";\r\n extra = this.toType(type.getType());\r\n }\r\n else if (type instanceof abaplint.BasicTypes.StructureType) {\r\n resolved = \"Structure\";\r\n const list = [];\r\n for (const c of type.getComponents()) {\r\n list.push(`\"` + c.name.toLowerCase() + `\": ` + this.toType(c.type));\r\n }\r\n extra = \"{\" + list.join(\", \") + \"}\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra += \", \\\"\" + type.getQualifiedName() + \"\\\"\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.CLikeType\r\n || type instanceof abaplint.BasicTypes.CSequenceType) {\r\n // if not supplied its a Character(1)\r\n resolved = \"Character\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.AnyType) {\r\n // if not supplied its a Character(4)\r\n resolved = \"Character\";\r\n extra = \"{length: 4}\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.SimpleType) {\r\n // if not supplied its a Character(1)\r\n resolved = \"Character\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.CharacterType) {\r\n resolved = \"Character\";\r\n if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n else if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.NumericType) {\r\n resolved = \"Numc\";\r\n if (type.getQualifiedName() && type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n else if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \"}\";\r\n }\r\n else if (type.getQualifiedName()) {\r\n extra = \"{qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.PackedType) {\r\n resolved = \"Packed\";\r\n if (type.getQualifiedName()) {\r\n extra = \"{length: \" + type.getLength() + \", decimals: \" + type.getDecimals() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n else {\r\n extra = \"{length: \" + type.getLength() + \", decimals: \" + type.getDecimals() + \"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.NumericGenericType) {\r\n resolved = \"Packed\";\r\n extra = \"{length: 8, decimals: 0}\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.XStringType) {\r\n resolved = \"XString\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_g = type.getQualifiedName()) === null || _g === void 0 ? void 0 : _g.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.XSequenceType) {\r\n // if not supplied itsa a Hex(1)\r\n resolved = \"Hex\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.HexType) {\r\n resolved = \"Hex\";\r\n if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.FloatType) {\r\n resolved = \"Float\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_h = type.getQualifiedName()) === null || _h === void 0 ? void 0 : _h.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.FloatingPointType) {\r\n resolved = \"Float\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_j = type.getQualifiedName()) === null || _j === void 0 ? void 0 : _j.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DecFloat34Type) {\r\n resolved = \"DecFloat34\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.UnknownType) {\r\n return `(() => { throw \"Unknown type: ${type.getError()}\" })()`;\r\n }\r\n else if (type instanceof abaplint.BasicTypes.VoidType) {\r\n return `(() => { throw \"Void type: ${type.getVoided()}\" })()`;\r\n }\r\n else {\r\n resolved = \"typeTodo\" + type.constructor.name;\r\n }\r\n return \"new abap.types.\" + resolved + \"(\" + extra + \")\";\r\n }\r\n}\r\nexports.TranspileTypes = TranspileTypes;\r\n//# sourceMappingURL=transpile_types.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/transpile_types.js?");
15606
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TranspileTypes = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass TranspileTypes {\r\n declare(t) {\r\n const type = t.getType();\r\n return \"let \" + t.getName().toLowerCase() + \" = \" + this.toType(type) + \";\";\r\n }\r\n declareStaticSkipVoid(pre, t) {\r\n const type = t.getType();\r\n const code = this.toType(type);\r\n // todo, this should look at the configuration, for runtime vs compile time errors\r\n if (code.includes(\"Void type\") || code.includes(\"abap.types.typeTodo\")) {\r\n return \"\";\r\n }\r\n return pre + t.getName().toLowerCase() + \" = \" + code + \";\\n\";\r\n }\r\n toType(type) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n let resolved = \"\";\r\n let extra = \"\";\r\n if (type instanceof abaplint.BasicTypes.ObjectReferenceType\r\n || type instanceof abaplint.BasicTypes.GenericObjectReferenceType) {\r\n resolved = \"ABAPObject\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_a = type.getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.TableType) {\r\n resolved = \"Table\";\r\n extra = this.toType(type.getRowType());\r\n extra += \", \" + JSON.stringify(type.getOptions());\r\n if (type.getQualifiedName() !== undefined) {\r\n extra += \", \\\"\" + type.getQualifiedName() + \"\\\"\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.IntegerType) {\r\n resolved = \"Integer\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_b = type.getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.StringType) {\r\n resolved = \"String\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_c = type.getQualifiedName()) === null || _c === void 0 ? void 0 : _c.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.UTCLongType) {\r\n resolved = \"UTCLong\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_d = type.getQualifiedName()) === null || _d === void 0 ? void 0 : _d.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DateType) {\r\n resolved = \"Date\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_e = type.getQualifiedName()) === null || _e === void 0 ? void 0 : _e.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.TimeType) {\r\n resolved = \"Time\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_f = type.getQualifiedName()) === null || _f === void 0 ? void 0 : _f.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DataReference) {\r\n resolved = \"DataReference\";\r\n extra = this.toType(type.getType());\r\n }\r\n else if (type instanceof abaplint.BasicTypes.StructureType) {\r\n resolved = \"Structure\";\r\n const list = [];\r\n for (const c of type.getComponents()) {\r\n list.push(`\"` + c.name.toLowerCase() + `\": ` + this.toType(c.type));\r\n }\r\n extra = \"{\" + list.join(\", \") + \"}\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra += \", \\\"\" + type.getQualifiedName() + \"\\\"\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.CLikeType\r\n || type instanceof abaplint.BasicTypes.CSequenceType) {\r\n // if not supplied its a Character(1)\r\n resolved = \"Character\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.AnyType) {\r\n // if not supplied its a Character(4)\r\n resolved = \"Character\";\r\n extra = \"{length: 4}\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.SimpleType) {\r\n // if not supplied its a Character(1)\r\n resolved = \"Character\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.CharacterType) {\r\n resolved = \"Character\";\r\n const e = {\r\n length: type.getLength() || undefined,\r\n qualifiedName: type.getQualifiedName(),\r\n conversionExit: type.getConversionExit(),\r\n };\r\n if (type.getLength() === 1) {\r\n delete e.length;\r\n }\r\n extra = JSON.stringify(e);\r\n if (extra === \"{}\") {\r\n extra = \"\";\r\n }\r\n /*\r\n if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n } else if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n */\r\n }\r\n else if (type instanceof abaplint.BasicTypes.NumericType) {\r\n resolved = \"Numc\";\r\n if (type.getQualifiedName() && type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n else if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \"}\";\r\n }\r\n else if (type.getQualifiedName()) {\r\n extra = \"{qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.PackedType) {\r\n resolved = \"Packed\";\r\n if (type.getQualifiedName()) {\r\n extra = \"{length: \" + type.getLength() + \", decimals: \" + type.getDecimals() + \", qualifiedName: \\\"\" + type.getQualifiedName() + \"\\\"}\";\r\n }\r\n else {\r\n extra = \"{length: \" + type.getLength() + \", decimals: \" + type.getDecimals() + \"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.NumericGenericType) {\r\n resolved = \"Packed\";\r\n extra = \"{length: 8, decimals: 0}\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.XStringType) {\r\n resolved = \"XString\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_g = type.getQualifiedName()) === null || _g === void 0 ? void 0 : _g.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.XSequenceType) {\r\n // if not supplied itsa a Hex(1)\r\n resolved = \"Hex\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.HexType) {\r\n resolved = \"Hex\";\r\n if (type.getLength() !== 1) {\r\n extra = \"{length: \" + type.getLength() + \"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.FloatType) {\r\n resolved = \"Float\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_h = type.getQualifiedName()) === null || _h === void 0 ? void 0 : _h.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.FloatingPointType) {\r\n resolved = \"Float\";\r\n if (type.getQualifiedName() !== undefined) {\r\n extra = \"{qualifiedName: \\\"\" + ((_j = type.getQualifiedName()) === null || _j === void 0 ? void 0 : _j.toUpperCase()) + \"\\\"}\";\r\n }\r\n }\r\n else if (type instanceof abaplint.BasicTypes.DecFloat34Type) {\r\n resolved = \"DecFloat34\";\r\n }\r\n else if (type instanceof abaplint.BasicTypes.UnknownType) {\r\n return `(() => { throw \"Unknown type: ${type.getError()}\" })()`;\r\n }\r\n else if (type instanceof abaplint.BasicTypes.VoidType) {\r\n return `(() => { throw \"Void type: ${type.getVoided()}\" })()`;\r\n }\r\n else {\r\n resolved = \"typeTodo\" + type.constructor.name;\r\n }\r\n return \"new abap.types.\" + resolved + \"(\" + extra + \")\";\r\n }\r\n}\r\nexports.TranspileTypes = TranspileTypes;\r\n//# sourceMappingURL=transpile_types.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/transpile_types.js?");
15607
15607
 
15608
15608
  /***/ }),
15609
15609
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.52",
3
+ "version": "2.3.53",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,11 +25,11 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.3.52",
28
+ "@abaplint/transpiler": "^2.3.53",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",
32
- "@abaplint/core": "^2.93.92",
32
+ "@abaplint/core": "^2.93.93",
33
33
  "progress": "^2.0.3",
34
34
  "webpack": "^5.75.0",
35
35
  "webpack-cli": "^5.0.0",