@abaplint/cli 2.97.7 → 2.97.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/cli.js +23 -12
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -4658,7 +4658,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
4658
4658
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4659
4659
 
4660
4660
  "use strict";
4661
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Message = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nclass Message {\n getMatcher() {\n const s = (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource3);\n const like = (0, combi_1.seq)(\"DISPLAY LIKE\", expressions_1.Source);\n const into = (0, combi_1.seq)(\"INTO\", expressions_1.Target);\n const raising = (0, combi_1.seq)(\"RAISING\", expressions_1.ExceptionName);\n const options = (0, combi_1.per)(like, into, raising);\n const type = (0, combi_1.seq)(\"TYPE\", expressions_1.Source);\n const sou = (0, combi_1.altPrio)(options, s);\n const sourc = (0, combi_1.alt)(sou, (0, combi_1.seq)(s, sou), (0, combi_1.seq)(s, s, sou), (0, combi_1.seq)(s, s, s, options));\n const mwith = (0, combi_1.seq)(\"WITH\", s, (0, combi_1.opt)(sourc));\n const foo = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.opt)(options), (0, combi_1.opt)(mwith));\n const text = (0, combi_1.seq)(s, type, (0, combi_1.optPrio)(like), (0, combi_1.optPrio)(raising));\n const ret = (0, combi_1.seq)(\"MESSAGE\", (0, combi_1.altPrio)(foo, text));\n return ret;\n }\n}\nexports.Message = Message;\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js?");
4661
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Message = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nclass Message {\n getMatcher() {\n const s = (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource3);\n const like = (0, combi_1.seq)(\"DISPLAY LIKE\", expressions_1.Source);\n const into = (0, combi_1.seq)(\"INTO\", expressions_1.Target);\n const raising = (0, combi_1.seq)(\"RAISING\", expressions_1.ExceptionName);\n const options = (0, combi_1.per)(like, into, raising);\n const type = (0, combi_1.seq)(\"TYPE\", expressions_1.Source);\n const sou = (0, combi_1.altPrio)(options, s);\n const sourc = (0, combi_1.alt)(sou, (0, combi_1.seq)(s, sou), (0, combi_1.seq)(s, s, sou), (0, combi_1.seq)(s, s, s, options));\n const mwith = (0, combi_1.seq)(\"WITH\", s, (0, combi_1.opt)(sourc));\n const foo = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.opt)(options), (0, combi_1.opt)(mwith));\n const text = (0, combi_1.seq)(s, type, (0, combi_1.optPrio)(like), (0, combi_1.optPrio)(raising));\n const cloud = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.opt)((0, combi_1.seq)(\"WITH\", expressions_1.Source, (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source))), into);\n const ret = (0, combi_1.seq)(\"MESSAGE\", (0, combi_1.altPrio)((0, combi_1.verNot)(version_1.Version.Cloud, foo), (0, combi_1.verNot)(version_1.Version.Cloud, text), (0, combi_1.ver)(version_1.Version.Cloud, cloud)));\n return ret;\n }\n}\nexports.Message = Message;\n//# sourceMappingURL=message.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js?");
4662
4662
 
4663
4663
  /***/ }),
4664
4664
 
@@ -6715,7 +6715,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
6715
6715
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6716
6716
 
6717
6717
  "use strict";
6718
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BuiltIn = exports.BuiltInMethod = void 0;\n/* eslint-disable max-len */\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nclass BuiltInMethod extends _identifier_1.Identifier {\n constructor(token, filename, method, row) {\n super(token, filename);\n this.method = method;\n this.row = row;\n }\n getRequiredParameters() {\n return [];\n }\n getOptional() {\n throw new Error(\"BuiltInMethod->Method not implemented.\");\n }\n getAll() {\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\n }\n getImporting() {\n const ret = [];\n for (const i in this.method.mandatory) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\n }\n for (const i in this.method.optional) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\n }\n return ret;\n }\n getDefaultImporting() {\n if (this.method.mandatory === undefined) {\n return undefined;\n }\n const keys = Object.keys(this.method.mandatory);\n if (keys.length === 1) {\n return keys[0].toUpperCase();\n }\n return undefined;\n }\n getExporting() {\n return [];\n }\n getRaising() {\n return [];\n }\n getChanging() {\n return [];\n }\n getReturning() {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\n }\n getExceptions() {\n return [];\n }\n getVisibility() {\n return visibility_1.Visibility.Public;\n }\n isRedefinition() {\n return false;\n }\n isAbstract() {\n return false;\n }\n isStatic() {\n return false;\n }\n isEventHandler() {\n return false;\n }\n getParameters() {\n return this;\n }\n getParameterDefault(_parameter) {\n return undefined;\n }\n}\nexports.BuiltInMethod = BuiltInMethod;\nclass BuiltIn {\n constructor() {\n this.row = 1;\n }\n buildDefinition(method, row) {\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\n }\n searchBuiltin(name) {\n if (name === undefined) {\n return undefined;\n }\n // todo, optimize, use hash map\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\n if (index < 0) {\n return undefined;\n }\n return this.buildDefinition(BuiltIn.methods[index], index);\n }\n isPredicate(name) {\n if (name === undefined) {\n return undefined;\n }\n // todo, optimize, use hash map\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\n if (index < 0) {\n return undefined;\n }\n return BuiltIn.methods[index].predicate;\n }\n getTypes() {\n const ret = this.buildSY();\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" })));\n return ret;\n }\n get(extras) {\n const ret = this.buildSY();\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\n ret.push(this.buildConstant(\"%_CR_LF\"));\n ret.push(this.buildConstant(\"%_ENDIAN\"));\n ret.push(this.buildConstant(\"%_FORMFEED\"));\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\n ret.push(this.buildConstant(\"%_MINCHAR\"));\n ret.push(this.buildConstant(\"%_NEWLINE\"));\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'-'\"));\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\n ret.push(this.buildConstant(\"col_group\", new basic_1.IntegerType(), \"7\"));\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1), \"' '\"));\n for (const e of extras) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], \"'?'\"));\n }\n return ret;\n }\n /////////////////////////////\n buildSY() {\n const components = [];\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, { qualifiedName: \"sy-abcde\" }) });\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-batch\" }) });\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-binpt\" }) });\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-calld\" }) });\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, { qualifiedName: \"sy-callr\" }) });\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-cprog\" }) });\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-datar\" }) });\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\n components.push({ name: \"datum\", type: new basic_1.DateType() });\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-dbnam\" }) });\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-dbsys\" }) });\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dyngr\" }) });\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dynnr\" }) });\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, { qualifiedName: \"sy-host\" }) });\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\n components.push({ name: \"input\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-input\" }) });\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-langu\", conversionExit: \"ISOLA\" }) });\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-ldbpg\" }) });\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-lisel\" }) });\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-mandt\" }) });\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-msgid\" }) });\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, { qualifiedName: \"sy-msgli\" }) });\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-msgty\" }) });\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv1\" }) });\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv2\" }) });\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv3\" }) });\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv4\" }) });\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-opsys\" }) });\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-pdest\" }) });\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-pfkey\" }) });\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-repid\" }) });\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-saprl\" }) });\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, { qualifiedName: \"sy-slset\" }) });\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-spono\" }) });\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-sysid\" }) });\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tcode\" }) });\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-title\" }) });\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar0\" }) });\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar1\" }) });\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar2\" }) });\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar3\" }) });\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar4\" }) });\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar5\" }) });\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar6\" }) });\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar7\" }) });\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar8\" }) });\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar9\" }) });\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-ucomm\" }) });\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-uline\" }) });\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, { qualifiedName: \"sy-uname\" }) });\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-vline\" }) });\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-wtitl\" }) });\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, { qualifiedName: \"sy-zonlo\" }) });\n const type = new basic_1.StructureType(components);\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\n return [sy, syst];\n }\n buildConstant(name, type, value) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\n if (type === undefined) {\n type = new basic_1.VoidType(name);\n }\n if (value === undefined) {\n value = \"'?'\";\n }\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], value);\n }\n buildVariable(name) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* IdentifierMeta.BuiltIn */]);\n }\n}\nBuiltIn.filename = \"_builtin.prog.abap\";\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\n// todo: \"pcre\", only possible from 755\nBuiltIn.methods = [\n {\n name: \"ABS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"ACOS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"ASIN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"ATAN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"BIT-SET\",\n mandatory: {\n \"val\": new basic_1.IntegerType(),\n },\n return: new basic_1.XStringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"BOOLC\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"BOOLX\",\n mandatory: {\n \"bool\": new basic_1.StringType(),\n },\n optional: {\n \"bit\": new basic_1.IntegerType(),\n },\n return: new basic_1.XStringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CEIL\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"CHAR_OFF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"add\": new basic_1.IntegerType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CHARLEN\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"CMAX\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CMIN\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONCAT_LINES_OF\",\n mandatory: {\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),\n },\n optional: {\n \"sep\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONDENSE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"del\": new basic_1.StringType(),\n \"from\": new basic_1.StringType(),\n \"to\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n predicate: true,\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"COS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"COSH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"COUNT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"COUNT_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"COUNT_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"DBMAXLEN\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"DISTANCE\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"ESCAPE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"format\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"EXP\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"FIND\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_END\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FLOOR\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"FRAC\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"FROM_MIXED\",\n mandatory: { \"val\": new basic_1.StringType() },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"sep\": new basic_1.IntegerType(),\n \"min\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"INSERT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"sub\": new basic_1.StringType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"IPOW\",\n mandatory: {\n \"base\": new basic_1.FloatType(),\n \"exp\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINE_EXISTS\",\n mandatory: {\n \"val\": new basic_1.AnyType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINE_INDEX\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINES\",\n mandatory: {\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"LOG\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"LOG10\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"MATCH\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n }, optional: {\n \"case\": new basic_1.CharacterType(1),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"MATCHES\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"NMAX\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val8\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"NMIN\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val8\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"NUMOFCHAR\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"REPEAT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"REPLACE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"with\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"RESCALE\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n optional: {\n \"dec\": new basic_1.IntegerType(),\n \"prec\": new basic_1.IntegerType(),\n \"mode\": new basic_1.IntegerType(),\n },\n return: new basic_1.FloatType(),\n version: version_1.Version.v702,\n },\n {\n name: \"REVERSE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"ROUND\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n optional: {\n \"dec\": new basic_1.IntegerType(),\n \"prec\": new basic_1.IntegerType(),\n \"mode\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SEGMENT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"index\": new basic_1.IntegerType(),\n },\n optional: {\n \"sep\": new basic_1.StringType(),\n \"space\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SHIFT_LEFT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"places\": new basic_1.IntegerType(),\n \"circular\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SHIFT_RIGHT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"places\": new basic_1.IntegerType(),\n \"circular\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SIGN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"SIN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"SINH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"SQRT\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"STRLEN\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"SUBSTRING\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_AFTER\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_BEFORE\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_FROM\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_TO\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TAN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"TANH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"TO_LOWER\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TO_MIXED\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"sep\": new basic_1.IntegerType(),\n \"min\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TO_UPPER\",\n mandatory: { \"val\": new basic_1.StringType() },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TRANSLATE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"from\": new basic_1.StringType(),\n \"to\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TRUNC\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"UTCLONG_ADD\",\n mandatory: {\n \"val\": new basic_1.UTCLongType(),\n },\n optional: {\n \"days\": new basic_1.IntegerType(),\n \"hour\": new basic_1.IntegerType(),\n \"minutes\": new basic_1.IntegerType(),\n \"seconds\": new basic_1.FloatType(),\n },\n return: new basic_1.UTCLongType(),\n version: version_1.Version.v754,\n },\n {\n name: \"UTCLONG_CURRENT\",\n return: new basic_1.UTCLongType(),\n version: version_1.Version.v754,\n },\n {\n name: \"UTCLONG_DIFF\",\n mandatory: {\n \"high\": new basic_1.UTCLongType(),\n \"low\": new basic_1.UTCLongType(),\n },\n return: new basic_1.FloatType(),\n version: version_1.Version.v754,\n },\n {\n name: \"XSDBOOL\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.CharacterType(1),\n version: version_1.Version.v740sp08,\n },\n {\n name: \"XSTRLEN\",\n mandatory: {\n \"val\": new basic_1.XStringType(),\n },\n return: new basic_1.IntegerType(),\n },\n];\nexports.BuiltIn = BuiltIn;\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6718
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BuiltIn = exports.BuiltInMethod = void 0;\n/* eslint-disable max-len */\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nclass BuiltInMethod extends _identifier_1.Identifier {\n constructor(token, filename, method, row) {\n super(token, filename);\n this.method = method;\n this.row = row;\n }\n getRequiredParameters() {\n return [];\n }\n getOptional() {\n throw new Error(\"BuiltInMethod->Method not implemented.\");\n }\n getAll() {\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\n }\n getImporting() {\n const ret = [];\n for (const i in this.method.mandatory) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\n }\n for (const i in this.method.optional) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\n }\n return ret;\n }\n getDefaultImporting() {\n if (this.method.mandatory === undefined) {\n return undefined;\n }\n const keys = Object.keys(this.method.mandatory);\n if (keys.length === 1) {\n return keys[0].toUpperCase();\n }\n return undefined;\n }\n getExporting() {\n return [];\n }\n getRaising() {\n return [];\n }\n getChanging() {\n return [];\n }\n getReturning() {\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\n }\n getExceptions() {\n return [];\n }\n getVisibility() {\n return visibility_1.Visibility.Public;\n }\n isRedefinition() {\n return false;\n }\n isAbstract() {\n return false;\n }\n isStatic() {\n return false;\n }\n isEventHandler() {\n return false;\n }\n getParameters() {\n return this;\n }\n getParameterDefault(_parameter) {\n return undefined;\n }\n}\nexports.BuiltInMethod = BuiltInMethod;\nclass BuiltIn {\n constructor() {\n this.row = 1;\n }\n buildDefinition(method, row) {\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\n }\n searchBuiltin(name) {\n if (name === undefined) {\n return undefined;\n }\n // todo, optimize, use hash map\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\n if (index < 0) {\n return undefined;\n }\n return this.buildDefinition(BuiltIn.methods[index], index);\n }\n isPredicate(name) {\n if (name === undefined) {\n return undefined;\n }\n // todo, optimize, use hash map\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\n if (index < 0) {\n return undefined;\n }\n return BuiltIn.methods[index].predicate;\n }\n getTypes() {\n const ret = this.buildSY();\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" })));\n return ret;\n }\n get(extras) {\n const ret = this.buildSY();\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\n ret.push(this.buildConstant(\"%_CR_LF\"));\n ret.push(this.buildConstant(\"%_ENDIAN\"));\n ret.push(this.buildConstant(\"%_FORMFEED\"));\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\n ret.push(this.buildConstant(\"%_MINCHAR\"));\n ret.push(this.buildConstant(\"%_NEWLINE\"));\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'-'\"));\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"' '\"));\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, { qualifiedName: \"ABAP_BOOL\", ddicName: \"ABAP_BOOL\" }), \"'X'\"));\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\n ret.push(this.buildConstant(\"col_group\", new basic_1.IntegerType(), \"7\"));\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1, { derivedFromConstant: true }), \"' '\"));\n for (const e of extras) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], \"'?'\"));\n }\n return ret;\n }\n /////////////////////////////\n buildSY() {\n const components = [];\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, { qualifiedName: \"sy-abcde\" }) });\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-batch\" }) });\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-binpt\" }) });\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-calld\" }) });\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, { qualifiedName: \"sy-callr\" }) });\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-cprog\" }) });\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-datar\" }) });\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\n components.push({ name: \"datum\", type: new basic_1.DateType() });\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-dbnam\" }) });\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-dbsys\" }) });\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dyngr\" }) });\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-dynnr\" }) });\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, { qualifiedName: \"sy-host\" }) });\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\n components.push({ name: \"input\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-input\" }) });\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-langu\", conversionExit: \"ISOLA\" }) });\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-ldbpg\" }) });\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-lisel\" }) });\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-mandt\" }) });\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-msgid\" }) });\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, { qualifiedName: \"sy-msgli\" }) });\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-msgty\" }) });\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv1\" }) });\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv2\" }) });\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv3\" }) });\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, { qualifiedName: \"sy-msgv4\" }) });\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-opsys\" }) });\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-pdest\" }) });\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-pfkey\" }) });\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, { qualifiedName: \"sy-repid\" }) });\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, { qualifiedName: \"sy-saprl\" }) });\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, { qualifiedName: \"sy-slset\" }) });\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, { qualifiedName: \"sy-spono\" }) });\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, { qualifiedName: \"sy-sysid\" }) });\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tcode\" }) });\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-title\" }) });\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar0\" }) });\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar1\" }) });\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar2\" }) });\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar3\" }) });\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar4\" }) });\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar5\" }) });\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar6\" }) });\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar7\" }) });\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar8\" }) });\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, { qualifiedName: \"sy-tvar9\" }) });\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, { qualifiedName: \"sy-ucomm\" }) });\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, { qualifiedName: \"sy-uline\" }) });\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, { qualifiedName: \"sy-uname\" }) });\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-vline\" }) });\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, { qualifiedName: \"sy-wtitl\" }) });\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, { qualifiedName: \"sy-zonlo\" }) });\n const type = new basic_1.StructureType(components);\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */]);\n return [sy, syst];\n }\n buildConstant(name, type, value) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\n if (type === undefined) {\n type = new basic_1.VoidType(name);\n }\n if (value === undefined) {\n value = \"'?'\";\n }\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* IdentifierMeta.ReadOnly */, \"built-in\" /* IdentifierMeta.BuiltIn */], value);\n }\n buildVariable(name) {\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* IdentifierMeta.BuiltIn */]);\n }\n}\nBuiltIn.filename = \"_builtin.prog.abap\";\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\n// todo: \"pcre\", only possible from 755\nBuiltIn.methods = [\n {\n name: \"ABS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"ACOS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"ASIN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"ATAN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"BIT-SET\",\n mandatory: {\n \"val\": new basic_1.IntegerType(),\n },\n return: new basic_1.XStringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"BOOLC\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"BOOLX\",\n mandatory: {\n \"bool\": new basic_1.StringType(),\n },\n optional: {\n \"bit\": new basic_1.IntegerType(),\n },\n return: new basic_1.XStringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CEIL\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"CHAR_OFF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"add\": new basic_1.IntegerType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CHARLEN\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"CMAX\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CMIN\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONCAT_LINES_OF\",\n mandatory: {\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),\n },\n optional: {\n \"sep\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONDENSE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"del\": new basic_1.StringType(),\n \"from\": new basic_1.StringType(),\n \"to\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n predicate: true,\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\n },\n {\n name: \"CONTAINS_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"start\": new basic_1.StringType(),\n \"end\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"COS\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"COSH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"COUNT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"COUNT_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"COUNT_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"DBMAXLEN\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"DISTANCE\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"ESCAPE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"format\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"EXP\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"FIND\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_ANY_NOT_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_ANY_OF\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FIND_END\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"FLOOR\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"FRAC\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"FROM_MIXED\",\n mandatory: { \"val\": new basic_1.StringType() },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"sep\": new basic_1.IntegerType(),\n \"min\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"INSERT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"sub\": new basic_1.StringType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"IPOW\",\n mandatory: {\n \"base\": new basic_1.FloatType(),\n \"exp\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINE_EXISTS\",\n mandatory: {\n \"val\": new basic_1.AnyType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINE_INDEX\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v740sp02,\n },\n {\n name: \"LINES\",\n mandatory: {\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"LOG\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"LOG10\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"MATCH\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n }, optional: {\n \"case\": new basic_1.CharacterType(1),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"MATCHES\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.CharacterType(1),\n predicate: true,\n version: version_1.Version.v702,\n },\n {\n name: \"NMAX\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val8\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"NMIN\",\n mandatory: {\n \"val1\": new basic_1.StringType(),\n \"val2\": new basic_1.StringType(),\n },\n optional: {\n \"val3\": new basic_1.StringType(),\n \"val4\": new basic_1.StringType(),\n \"val5\": new basic_1.StringType(),\n \"val6\": new basic_1.StringType(),\n \"val7\": new basic_1.StringType(),\n \"val8\": new basic_1.StringType(),\n \"val9\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"NUMOFCHAR\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"REPEAT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"REPLACE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"with\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"RESCALE\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n optional: {\n \"dec\": new basic_1.IntegerType(),\n \"prec\": new basic_1.IntegerType(),\n \"mode\": new basic_1.IntegerType(),\n },\n return: new basic_1.FloatType(),\n version: version_1.Version.v702,\n },\n {\n name: \"REVERSE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"ROUND\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n optional: {\n \"dec\": new basic_1.IntegerType(),\n \"prec\": new basic_1.IntegerType(),\n \"mode\": new basic_1.IntegerType(),\n },\n return: new basic_1.IntegerType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SEGMENT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"index\": new basic_1.IntegerType(),\n },\n optional: {\n \"sep\": new basic_1.StringType(),\n \"space\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SHIFT_LEFT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"places\": new basic_1.IntegerType(),\n \"circular\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SHIFT_RIGHT\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"places\": new basic_1.IntegerType(),\n \"circular\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SIGN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"SIN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"SINH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"SQRT\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"STRLEN\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"SUBSTRING\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"off\": new basic_1.IntegerType(),\n \"len\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_AFTER\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_BEFORE\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_FROM\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"SUBSTRING_TO\",\n mandatory: {\n \"val\": new basic_1.CLikeType(),\n },\n optional: {\n \"sub\": new basic_1.StringType(),\n \"regex\": new basic_1.StringType(),\n \"pcre\": new basic_1.StringType(),\n \"case\": new basic_1.CharacterType(1),\n \"len\": new basic_1.IntegerType(),\n \"occ\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TAN\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"TANH\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.FloatType(),\n },\n {\n name: \"TO_LOWER\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TO_MIXED\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n optional: {\n \"case\": new basic_1.CharacterType(1),\n \"sep\": new basic_1.IntegerType(),\n \"min\": new basic_1.IntegerType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TO_UPPER\",\n mandatory: { \"val\": new basic_1.StringType() },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TRANSLATE\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n \"from\": new basic_1.StringType(),\n \"to\": new basic_1.StringType(),\n },\n return: new basic_1.StringType(),\n version: version_1.Version.v702,\n },\n {\n name: \"TRUNC\",\n mandatory: {\n \"val\": new basic_1.FloatType(),\n },\n return: new basic_1.IntegerType(),\n },\n {\n name: \"UTCLONG_ADD\",\n mandatory: {\n \"val\": new basic_1.UTCLongType(),\n },\n optional: {\n \"days\": new basic_1.IntegerType(),\n \"hour\": new basic_1.IntegerType(),\n \"minutes\": new basic_1.IntegerType(),\n \"seconds\": new basic_1.FloatType(),\n },\n return: new basic_1.UTCLongType(),\n version: version_1.Version.v754,\n },\n {\n name: \"UTCLONG_CURRENT\",\n return: new basic_1.UTCLongType(),\n version: version_1.Version.v754,\n },\n {\n name: \"UTCLONG_DIFF\",\n mandatory: {\n \"high\": new basic_1.UTCLongType(),\n \"low\": new basic_1.UTCLongType(),\n },\n return: new basic_1.FloatType(),\n version: version_1.Version.v754,\n },\n {\n name: \"XSDBOOL\",\n mandatory: {\n \"val\": new basic_1.StringType(),\n },\n return: new basic_1.CharacterType(1),\n version: version_1.Version.v740sp08,\n },\n {\n name: \"XSTRLEN\",\n mandatory: {\n \"val\": new basic_1.XStringType(),\n },\n return: new basic_1.IntegerType(),\n },\n];\nexports.BuiltIn = BuiltIn;\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6719
6719
 
6720
6720
  /***/ }),
6721
6721
 
@@ -6781,7 +6781,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
6781
6781
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6782
6782
 
6783
6783
  "use strict";
6784
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TypeUtils = void 0;\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nclass TypeUtils {\n constructor(scope) {\n this.scope = scope;\n }\n isCharLikeStrict(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isCharLikeStrict(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.StringType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.CharacterType\n || type instanceof basic_1.SimpleType\n || type instanceof basic_1.CLikeType\n || type instanceof basic_1.DateType\n || type instanceof basic_1.CSequenceType\n || type instanceof basic_1.NumericGenericType\n || type instanceof basic_1.NumericType\n || type instanceof basic_1.TimeType\n || type instanceof basic_1.UnknownType\n || type instanceof basic_1.VoidType) {\n return true;\n }\n return false;\n }\n isCharLike(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.TableType && type.isWithHeader()) {\n return this.isCharLike(type.getRowType());\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isCharLike(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.StringType\n || type instanceof basic_1.VoidType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.UnknownType\n || type instanceof basic_1.NumericType\n || type instanceof basic_1.IntegerType\n || type instanceof basic_1.SimpleType\n || type instanceof basic_1.FloatType\n || type instanceof basic_1.FloatingPointType\n || type instanceof basic_1.DecFloatType\n || type instanceof basic_1.DecFloat16Type\n || type instanceof basic_1.DecFloat34Type\n || type instanceof basic_1.NumericGenericType\n || type instanceof basic_1.CSequenceType\n || type instanceof basic_1.DateType\n || type instanceof basic_1.CLikeType\n || type instanceof basic_1.PackedType\n || type instanceof basic_1.TimeType\n || type instanceof basic_1.CharacterType) {\n return true;\n }\n return false;\n }\n isHexLike(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isHexLike(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.XStringType\n || type instanceof basic_1.HexType\n || type instanceof basic_1.VoidType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n isOOAssignable(source, target) {\n let sid = source.getIdentifier();\n let tid = target.getIdentifier();\n const tname = tid.getName().toUpperCase();\n const sname = sid.getName().toUpperCase();\n if (tname === sname) {\n return true;\n }\n if (!(sid instanceof types_1.ClassDefinition || sid instanceof types_1.InterfaceDefinition)) {\n const found = this.scope.findObjectDefinition(sid.getName());\n if (found) {\n sid = found;\n }\n else {\n return false;\n }\n }\n if (!(tid instanceof types_1.ClassDefinition || tid instanceof types_1.InterfaceDefinition)) {\n const found = this.scope.findObjectDefinition(tid.getName());\n if (found) {\n tid = found;\n }\n else {\n return false;\n }\n }\n if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.ClassDefinition) {\n if (sname === tname) {\n return true;\n }\n const slist = this.listAllSupers(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n else if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.InterfaceDefinition) {\n if (sid.getImplementing().some(i => i.name === tname)) {\n return true;\n }\n const slist = this.listAllInterfaces(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n else if (sid instanceof types_1.InterfaceDefinition && tid instanceof types_1.InterfaceDefinition) {\n if (sname === tname) {\n return true;\n }\n if (sid.getImplementing().some(i => i.name === tname)) {\n return true;\n }\n const slist = this.listAllInterfaces(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n return false;\n }\n listAllInterfaces(cdef) {\n var _a;\n const ret = new Set();\n const stack = [];\n // initialize\n cdef.getImplementing().forEach(i => stack.push(i.name));\n if (cdef instanceof types_1.ClassDefinition) {\n const supers = this.listAllSupers(cdef);\n for (const s of supers) {\n (_a = this.scope.findClassDefinition(s)) === null || _a === void 0 ? void 0 : _a.getImplementing().forEach(i => stack.push(i.name));\n }\n }\n // main loop\n while (stack.length > 0) {\n const intf = stack.pop().toUpperCase();\n ret.add(intf);\n const idef = this.scope.findInterfaceDefinition(intf);\n idef === null || idef === void 0 ? void 0 : idef.getImplementing().forEach(i => stack.push(i.name));\n }\n return Array.from(ret.values());\n }\n listAllSupers(cdef) {\n var _a, _b;\n const ret = [];\n let sup = cdef.getSuperClass();\n while (sup !== undefined) {\n ret.push(sup === null || sup === void 0 ? void 0 : sup.toUpperCase());\n sup = (_b = (_a = this.scope.findClassDefinition(sup)) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase();\n }\n return ret;\n }\n isCastable(_source, _target) {\n // todo\n return true;\n }\n isAssignable(source, target) {\n /*\n console.dir(source);\n console.dir(target);\n */\n if (target instanceof basic_1.TableType) {\n if (target.isWithHeader()) {\n return this.isAssignable(source, target.getRowType());\n }\n if (source instanceof basic_1.TableType\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.ObjectReferenceType && source instanceof basic_1.ObjectReferenceType) {\n return this.isOOAssignable(source, target);\n }\n else if (target instanceof basic_1.ObjectReferenceType\n || target instanceof basic_1.GenericObjectReferenceType) {\n if (source instanceof basic_1.ObjectReferenceType\n || source instanceof basic_1.GenericObjectReferenceType\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.DataReference) {\n if (source instanceof basic_1.DataReference\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.StructureType) {\n if (source instanceof basic_1.TableType && source.isWithHeader()) {\n return this.isAssignable(source.getRowType(), target);\n }\n else if (source instanceof basic_1.StructureType\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n else if (target.containsVoid() === true) {\n return true;\n }\n else if (source instanceof basic_1.IntegerType) {\n return false;\n }\n else if (this.isCharLike(target) && this.isCharLike(source)) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.IntegerType\n || target instanceof basic_1.StringType) {\n if (source instanceof basic_1.TableType && source.isWithHeader() === false) {\n return false;\n }\n else if (source instanceof basic_1.DataReference\n || source instanceof basic_1.ObjectReferenceType\n || source instanceof basic_1.GenericObjectReferenceType) {\n return false;\n }\n return true;\n }\n return true;\n }\n}\nexports.TypeUtils = TypeUtils;\n//# sourceMappingURL=_type_utils.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js?");
6784
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TypeUtils = void 0;\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst cgeneric_type_1 = __webpack_require__(/*! ../types/basic/cgeneric_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js\");\nclass TypeUtils {\n constructor(scope) {\n this.scope = scope;\n }\n isCharLikeStrict(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isCharLikeStrict(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.StringType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.CharacterType\n || type instanceof basic_1.SimpleType\n || type instanceof cgeneric_type_1.CGenericType\n || type instanceof basic_1.CLikeType\n || type instanceof basic_1.DateType\n || type instanceof basic_1.CSequenceType\n || type instanceof basic_1.NumericGenericType\n || type instanceof basic_1.NumericType\n || type instanceof basic_1.TimeType\n || type instanceof basic_1.UnknownType\n || type instanceof basic_1.VoidType) {\n return true;\n }\n return false;\n }\n isCharLike(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.TableType && type.isWithHeader()) {\n return this.isCharLike(type.getRowType());\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isCharLike(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.StringType\n || type instanceof basic_1.CharacterType\n || type instanceof basic_1.VoidType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.UnknownType\n || type instanceof basic_1.NumericType\n || type instanceof basic_1.IntegerType\n || type instanceof basic_1.SimpleType\n || type instanceof basic_1.FloatType\n || type instanceof basic_1.FloatingPointType\n || type instanceof basic_1.DecFloatType\n || type instanceof basic_1.DecFloat16Type\n || type instanceof basic_1.DecFloat34Type\n || type instanceof basic_1.NumericGenericType\n || type instanceof basic_1.CSequenceType\n || type instanceof cgeneric_type_1.CGenericType\n || type instanceof basic_1.DateType\n || type instanceof basic_1.CLikeType\n || type instanceof basic_1.PackedType\n || type instanceof basic_1.TimeType) {\n return true;\n }\n return false;\n }\n isHexLike(type) {\n if (type === undefined) {\n return false;\n }\n else if (type instanceof basic_1.StructureType) {\n for (const c of type.getComponents()) {\n if (this.isHexLike(c.type) === false) {\n return false;\n }\n }\n return true;\n }\n else if (type instanceof basic_1.XStringType\n || type instanceof basic_1.HexType\n || type instanceof basic_1.VoidType\n || type instanceof basic_1.AnyType\n || type instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n isOOAssignable(source, target) {\n let sid = source.getIdentifier();\n let tid = target.getIdentifier();\n const tname = tid.getName().toUpperCase();\n const sname = sid.getName().toUpperCase();\n if (tname === sname) {\n return true;\n }\n if (!(sid instanceof types_1.ClassDefinition || sid instanceof types_1.InterfaceDefinition)) {\n const found = this.scope.findObjectDefinition(sid.getName());\n if (found) {\n sid = found;\n }\n else {\n return false;\n }\n }\n if (!(tid instanceof types_1.ClassDefinition || tid instanceof types_1.InterfaceDefinition)) {\n const found = this.scope.findObjectDefinition(tid.getName());\n if (found) {\n tid = found;\n }\n else {\n return false;\n }\n }\n if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.ClassDefinition) {\n if (sname === tname) {\n return true;\n }\n const slist = this.listAllSupers(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n else if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.InterfaceDefinition) {\n if (sid.getImplementing().some(i => i.name === tname)) {\n return true;\n }\n const slist = this.listAllInterfaces(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n else if (sid instanceof types_1.InterfaceDefinition && tid instanceof types_1.InterfaceDefinition) {\n if (sname === tname) {\n return true;\n }\n if (sid.getImplementing().some(i => i.name === tname)) {\n return true;\n }\n const slist = this.listAllInterfaces(sid);\n if (slist.indexOf(tname) >= 0) {\n return true;\n }\n }\n return false;\n }\n listAllInterfaces(cdef) {\n var _a;\n const ret = new Set();\n const stack = [];\n // initialize\n cdef.getImplementing().forEach(i => stack.push(i.name));\n if (cdef instanceof types_1.ClassDefinition) {\n const supers = this.listAllSupers(cdef);\n for (const s of supers) {\n (_a = this.scope.findClassDefinition(s)) === null || _a === void 0 ? void 0 : _a.getImplementing().forEach(i => stack.push(i.name));\n }\n }\n // main loop\n while (stack.length > 0) {\n const intf = stack.pop().toUpperCase();\n ret.add(intf);\n const idef = this.scope.findInterfaceDefinition(intf);\n idef === null || idef === void 0 ? void 0 : idef.getImplementing().forEach(i => stack.push(i.name));\n }\n return Array.from(ret.values());\n }\n listAllSupers(cdef) {\n var _a, _b;\n const ret = [];\n let sup = cdef.getSuperClass();\n while (sup !== undefined) {\n ret.push(sup === null || sup === void 0 ? void 0 : sup.toUpperCase());\n sup = (_b = (_a = this.scope.findClassDefinition(sup)) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase();\n }\n return ret;\n }\n isCastable(_source, _target) {\n // todo\n return true;\n }\n isAssignableStrict(source, target) {\n var _a;\n /*\n console.dir(source);\n console.dir(target);\n */\n if (source instanceof basic_1.CharacterType && target instanceof basic_1.CharacterType) {\n if (((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {\n return source.getLength() <= target.getLength();\n }\n return source.getLength() === target.getLength();\n }\n else if (source instanceof basic_1.StringType && target instanceof basic_1.StructureType) {\n for (const c of target.getComponents()) {\n if (c.type instanceof basic_1.StringType) {\n return false;\n }\n }\n return true;\n }\n return this.isAssignable(source, target);\n }\n isAssignable(source, target) {\n /*\n console.dir(source);\n console.dir(target);\n */\n if (target instanceof basic_1.TableType) {\n if (target.isWithHeader()) {\n return this.isAssignable(source, target.getRowType());\n }\n if (source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n else if (source instanceof basic_1.TableType) {\n return this.isAssignableStrict(source.getRowType(), target.getRowType());\n }\n return false;\n }\n else if (target instanceof basic_1.ObjectReferenceType && source instanceof basic_1.ObjectReferenceType) {\n return this.isOOAssignable(source, target);\n }\n else if (target instanceof basic_1.ObjectReferenceType\n || target instanceof basic_1.GenericObjectReferenceType) {\n if (source instanceof basic_1.ObjectReferenceType\n || source instanceof basic_1.GenericObjectReferenceType\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.DataReference) {\n if (source instanceof basic_1.DataReference\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.StructureType) {\n if (source instanceof basic_1.TableType && source.isWithHeader()) {\n return this.isAssignable(source.getRowType(), target);\n }\n else if (source instanceof basic_1.StructureType\n || source instanceof basic_1.VoidType\n || source instanceof basic_1.AnyType\n || source instanceof basic_1.UnknownType) {\n return true;\n }\n else if (target.containsVoid() === true) {\n return true;\n }\n else if (source instanceof basic_1.IntegerType) {\n return false;\n }\n else if (this.isCharLike(target) && this.isCharLike(source)) {\n return true;\n }\n return false;\n }\n else if (target instanceof basic_1.IntegerType\n || target instanceof basic_1.StringType) {\n if (source instanceof basic_1.TableType && source.isWithHeader() === false) {\n return false;\n }\n else if (source instanceof basic_1.DataReference\n || source instanceof basic_1.ObjectReferenceType\n || source instanceof basic_1.GenericObjectReferenceType) {\n return false;\n }\n return true;\n }\n return true;\n }\n}\nexports.TypeUtils = TypeUtils;\n//# sourceMappingURL=_type_utils.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js?");
6785
6785
 
6786
6786
  /***/ }),
6787
6787
 
@@ -6924,7 +6924,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
6924
6924
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6925
6925
 
6926
6926
  "use strict";
6927
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Constant = void 0;\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nclass Constant {\n runSyntax(node) {\n if (node.findDirectExpression(expressions_1.Integer)) {\n return new basic_1.IntegerType({ qualifiedName: \"I\" });\n }\n else if (node.getFirstToken().getStr().startsWith(\"'\")) {\n let len = node.getFirstToken().getStr().length - 2;\n if (len <= 0) {\n len = 1;\n }\n return new basic_1.CharacterType(len);\n }\n else {\n return new basic_1.StringType({ qualifiedName: \"STRING\" });\n }\n }\n}\nexports.Constant = Constant;\n//# sourceMappingURL=constant.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js?");
6927
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Constant = void 0;\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nclass Constant {\n runSyntax(node) {\n if (node.findDirectExpression(expressions_1.Integer)) {\n return new basic_1.IntegerType({ qualifiedName: \"I\" });\n }\n else if (node.getFirstToken().getStr().startsWith(\"'\")) {\n let len = node.getFirstToken().getStr().length - 2;\n if (len <= 0) {\n len = 1;\n }\n return new basic_1.CharacterType(len, { derivedFromConstant: true });\n }\n else {\n return new basic_1.StringType({ qualifiedName: \"STRING\" });\n }\n }\n}\nexports.Constant = Constant;\n//# sourceMappingURL=constant.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js?");
6928
6928
 
6929
6929
  /***/ }),
6930
6930
 
@@ -7177,7 +7177,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
7177
7177
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7178
7178
 
7179
7179
  "use strict";
7180
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodCallBody = void 0;\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst method_parameters_1 = __webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst method_call_param_1 = __webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_param.js\");\nclass MethodCallBody {\n runSyntax(node, scope, filename, method) {\n const parameters = node.findDirectExpression(Expressions.MethodParameters);\n if (parameters) {\n new method_parameters_1.MethodParameters().runSyntax(parameters, scope, method, filename);\n }\n const param = node.findDirectExpression(Expressions.MethodCallParam);\n if (param) {\n new method_call_param_1.MethodCallParam().runSyntax(param, scope, method, filename);\n }\n for (const s of node.findDirectExpressions(Expressions.Source)) {\n new source_1.Source().runSyntax(s, scope, filename);\n }\n }\n}\nexports.MethodCallBody = MethodCallBody;\n//# sourceMappingURL=method_call_body.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_body.js?");
7180
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodCallBody = void 0;\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst method_parameters_1 = __webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst method_call_param_1 = __webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_param.js\");\nclass MethodCallBody {\n runSyntax(node, scope, filename, method) {\n const parameters = node.findDirectExpression(Expressions.MethodParameters);\n if (parameters) {\n new method_parameters_1.MethodParameters().runSyntax(parameters, scope, method, filename);\n }\n const param = node.findDirectExpression(Expressions.MethodCallParam);\n if (param) {\n new method_call_param_1.MethodCallParam().runSyntax(param, scope, method, filename);\n }\n // for PARAMETER-TABLE and EXCEPTION-TABLE\n for (const s of node.findDirectExpressions(Expressions.Source)) {\n new source_1.Source().runSyntax(s, scope, filename);\n }\n }\n}\nexports.MethodCallBody = MethodCallBody;\n//# sourceMappingURL=method_call_body.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_body.js?");
7181
7181
 
7182
7182
  /***/ }),
7183
7183
 
@@ -7199,7 +7199,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
7199
7199
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7200
7200
 
7201
7201
  "use strict";
7202
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodCallParam = void 0;\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst method_parameters_1 = __webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js\");\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst _type_utils_1 = __webpack_require__(/*! ../_type_utils */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js\");\nclass MethodCallParam {\n runSyntax(node, scope, method, filename) {\n if (!(node.get() instanceof Expressions.MethodCallParam)) {\n throw new Error(\"MethodCallParam, unexpected input\");\n }\n const children = node.getChildren();\n if (children.length < 2 || children.length > 3) {\n throw new Error(\"MethodCallParam, unexpected child length\");\n }\n const child = children[1];\n if (child.get() instanceof tokens_1.WParenRight || child.get() instanceof tokens_1.WParenRightW) {\n if (!(method instanceof basic_1.VoidType)) {\n const required = method.getParameters().getRequiredParameters();\n if (required.length > 0) {\n throw new Error(\"Parameter \\\"\" + required[0].getName() + \"\\\" must be supplied\");\n }\n }\n }\n else if (child instanceof nodes_1.ExpressionNode\n && (child.get() instanceof Expressions.Source\n || child.get() instanceof Expressions.ConstantString)) {\n if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {\n throw new Error(\"Method \\\"\" + method.getName() + \"\\\" has no importing parameters\");\n }\n let targetType = undefined;\n if (!(method instanceof basic_1.VoidType)) {\n const name = method.getParameters().getDefaultImporting();\n if (name === undefined) {\n throw new Error(\"No default importing parameter\");\n }\n for (const i of method.getParameters().getImporting()) {\n if (i.getName().toUpperCase() === name) {\n targetType = i.getType();\n break;\n }\n }\n }\n else {\n targetType = method;\n }\n let sourceType = new basic_1.StringType();\n if (child.get() instanceof Expressions.Source) {\n sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);\n }\n if (sourceType === undefined) {\n throw new Error(\"No source type determined, method source\");\n }\n else if (new _type_utils_1.TypeUtils(scope).isAssignable(sourceType, targetType) === false) {\n throw new Error(\"Method parameter type not compatible\");\n }\n }\n else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.ParameterListS) {\n new method_parameters_1.MethodParameters().checkExporting(child, scope, method, filename);\n }\n else if (child.get() instanceof Expressions.MethodParameters) {\n new method_parameters_1.MethodParameters().runSyntax(child, scope, method, filename);\n }\n else {\n // console.dir(child);\n throw new Error(\"MethodCallParam, unexpected child\");\n }\n }\n}\nexports.MethodCallParam = MethodCallParam;\n//# sourceMappingURL=method_call_param.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_param.js?");
7202
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodCallParam = void 0;\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst method_parameters_1 = __webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js\");\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst _type_utils_1 = __webpack_require__(/*! ../_type_utils */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js\");\nclass MethodCallParam {\n runSyntax(node, scope, method, filename) {\n if (!(node.get() instanceof Expressions.MethodCallParam)) {\n throw new Error(\"MethodCallParam, unexpected input\");\n }\n const children = node.getChildren();\n if (children.length < 2 || children.length > 3) {\n throw new Error(\"MethodCallParam, unexpected child length\");\n }\n const child = children[1];\n if (child.get() instanceof tokens_1.WParenRight || child.get() instanceof tokens_1.WParenRightW) {\n if (!(method instanceof basic_1.VoidType)) {\n const required = method.getParameters().getRequiredParameters();\n if (required.length > 0) {\n throw new Error(\"Parameter \\\"\" + required[0].getName() + \"\\\" must be supplied\");\n }\n }\n }\n else if (child instanceof nodes_1.ExpressionNode\n && (child.get() instanceof Expressions.Source\n || child.get() instanceof Expressions.ConstantString)) {\n if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {\n throw new Error(\"Method \\\"\" + method.getName() + \"\\\" has no importing parameters\");\n }\n let targetType = undefined;\n if (!(method instanceof basic_1.VoidType)) {\n const name = method.getParameters().getDefaultImporting();\n if (name === undefined) {\n throw new Error(\"No default importing parameter\");\n }\n for (const i of method.getParameters().getImporting()) {\n if (i.getName().toUpperCase() === name) {\n targetType = i.getType();\n break;\n }\n }\n }\n else {\n targetType = method;\n }\n let sourceType = new basic_1.StringType();\n if (child.get() instanceof Expressions.Source) {\n sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);\n }\n if (sourceType === undefined) {\n throw new Error(\"No source type determined, method source\");\n }\n else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {\n throw new Error(\"Method parameter type not compatible\");\n }\n }\n else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.ParameterListS) {\n new method_parameters_1.MethodParameters().checkExporting(child, scope, method, filename);\n }\n else if (child.get() instanceof Expressions.MethodParameters) {\n new method_parameters_1.MethodParameters().runSyntax(child, scope, method, filename);\n }\n else {\n // console.dir(child);\n throw new Error(\"MethodCallParam, unexpected child\");\n }\n }\n}\nexports.MethodCallParam = MethodCallParam;\n//# sourceMappingURL=method_call_param.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_param.js?");
7203
7203
 
7204
7204
  /***/ }),
7205
7205
 
@@ -7221,7 +7221,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
7221
7221
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7222
7222
 
7223
7223
  "use strict";
7224
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodParam = void 0;\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst default_1 = __webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/default.js\");\nclass MethodParam {\n runSyntax(node, scope, filename, meta) {\n const name = node.findDirectExpression(Expressions.MethodParamName);\n if (name === undefined) {\n throw new Error(\"MethodParam, todo, handle pass by value and reference\");\n }\n const type = node.findDirectExpression(Expressions.TypeParam);\n if (type === undefined) {\n throw new Error(\"MethodParam, unexpected structure\");\n }\n const def = type.findDirectExpression(Expressions.Default);\n if (def) {\n try {\n new default_1.Default().runSyntax(def, scope, filename);\n }\n catch (e) {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(e.toString()), meta);\n }\n }\n const found = new basic_types_1.BasicTypes(filename, scope).parseType(type);\n if (found) {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, found, meta);\n }\n else {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(\"method param, todo\"), meta);\n }\n }\n}\nexports.MethodParam = MethodParam;\n//# sourceMappingURL=method_param.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_param.js?");
7224
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodParam = void 0;\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst default_1 = __webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/default.js\");\nconst cgeneric_type_1 = __webpack_require__(/*! ../../types/basic/cgeneric_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js\");\nclass MethodParam {\n runSyntax(node, scope, filename, meta) {\n const name = node.findDirectExpression(Expressions.MethodParamName);\n if (name === undefined) {\n throw new Error(\"MethodParam, todo, handle pass by value and reference\");\n }\n const type = node.findDirectExpression(Expressions.TypeParam);\n if (type === undefined) {\n throw new Error(\"MethodParam, unexpected structure\");\n }\n const def = type.findDirectExpression(Expressions.Default);\n if (def) {\n try {\n new default_1.Default().runSyntax(def, scope, filename);\n }\n catch (e) {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(e.toString()), meta);\n }\n }\n const concat = type.concatTokens().toUpperCase();\n if (concat === \"TYPE C\" || concat.startsWith(\"TYPE C \")) {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new cgeneric_type_1.CGenericType(), meta);\n }\n const found = new basic_types_1.BasicTypes(filename, scope).parseType(type);\n if (found) {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, found, meta);\n }\n else {\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(\"method param, todo\"), meta);\n }\n }\n}\nexports.MethodParam = MethodParam;\n//# sourceMappingURL=method_param.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_param.js?");
7225
7225
 
7226
7226
  /***/ }),
7227
7227
 
@@ -7232,7 +7232,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
7232
7232
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7233
7233
 
7234
7234
  "use strict";
7235
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodParameters = void 0;\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst inline_data_1 = __webpack_require__(/*! ./inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\nconst target_1 = __webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst _type_utils_1 = __webpack_require__(/*! ../_type_utils */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js\");\nclass MethodParameters {\n constructor() {\n this.requiredParameters = undefined;\n }\n runSyntax(node, scope, method, filename) {\n var _a;\n if (!(node.get() instanceof Expressions.MethodParameters)) {\n throw new Error(\"MethodParameters, unexpected input\");\n }\n const children = node.getChildren().slice();\n if (method instanceof basic_1.VoidType) {\n this.requiredParameters = new Set();\n }\n else {\n this.requiredParameters = new Set(method.getParameters().getRequiredParameters().map(i => i.getName().toUpperCase()));\n }\n while (children.length > 0) {\n const name = (_a = children.shift()) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n switch (name) {\n case \"EXPORTING\":\n this.checkExporting(children.shift(), scope, method, filename, false);\n break;\n case \"IMPORTING\":\n this.checkImporting(children.shift(), scope, method, filename);\n break;\n case \"CHANGING\":\n this.checkChanging(children.shift(), scope, method, filename);\n break;\n case \"RECEIVING\":\n this.checkReceiving(children.shift(), scope, method, filename);\n break;\n case \"EXCEPTIONS\":\n children.shift(); // todo, old style exceptions\n break;\n default:\n throw new Error(\"MethodParameters, unexpected token, \" + name);\n }\n }\n this.reportErrors();\n }\n ///////////////////////\n checkReceiving(node, scope, method, filename) {\n var _a;\n const type = method instanceof basic_1.VoidType ? method : (_a = method.getParameters().getReturning()) === null || _a === void 0 ? void 0 : _a.getType();\n if (type === undefined) {\n throw new Error(\"Method does not have a returning parameter\");\n }\n else if (!(node instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"checkReceiving, not an expression node\");\n }\n const target = node.findDirectExpression(Expressions.Target);\n const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);\n if (inline) {\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);\n }\n else if (target) {\n const targetType = new target_1.Target().runSyntax(target, scope, filename);\n if (targetType && new _type_utils_1.TypeUtils(scope).isAssignable(type, targetType) === false) {\n throw new Error(\"Method returning value not type compatible\");\n }\n }\n }\n checkImporting(node, scope, method, filename) {\n for (const item of this.parameterListT(node, scope, filename)) {\n let parameterType = undefined;\n if (method instanceof basic_1.VoidType) {\n parameterType = method;\n }\n else {\n const parameter = method.getParameters().getExporting().find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method exporting parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n parameterType = parameter.getType();\n }\n const inline = item.target.findDirectExpression(Expressions.InlineData);\n if (inline) {\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, parameterType);\n }\n else if (item.targetType === undefined) {\n throw new Error(\"Could not determine target type\");\n }\n else if (item.targetType && new _type_utils_1.TypeUtils(scope).isAssignable(parameterType, item.targetType) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n }\n }\n checkChanging(node, scope, method, filename) {\n var _a;\n for (const item of this.parameterListT(node, scope, filename)) {\n let parameterType = undefined;\n if (method instanceof basic_1.VoidType) {\n parameterType = method;\n }\n else {\n const parameter = method.getParameters().getChanging().find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method changing parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n parameterType = parameter.getType();\n }\n if (item.targetType && new _type_utils_1.TypeUtils(scope).isAssignable(parameterType, item.targetType) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n (_a = this.requiredParameters) === null || _a === void 0 ? void 0 : _a.delete(item.name);\n }\n }\n checkExporting(node, scope, method, filename, errors = true) {\n const items = this.parameterListS(node, scope, filename, method);\n if (method instanceof basic_1.VoidType) {\n return;\n }\n const allImporting = method.getParameters().getImporting();\n if (this.requiredParameters === undefined) {\n this.requiredParameters = new Set(method.getParameters().getRequiredParameters().map(i => i.getName().toUpperCase()));\n }\n for (const item of items) {\n const parameter = allImporting.find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method importing parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n else if (new _type_utils_1.TypeUtils(scope).isAssignable(item.sourceType, parameter.getType()) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n this.requiredParameters.delete(item.name);\n }\n if (errors === true) {\n this.reportErrors();\n }\n }\n reportErrors() {\n var _a;\n for (const r of ((_a = this.requiredParameters) === null || _a === void 0 ? void 0 : _a.values()) || []) {\n throw new Error(`method parameter \"${r}\" must be supplied`);\n }\n }\n parameterListS(node, scope, filename, method) {\n var _a;\n if (node === undefined) {\n return [];\n }\n else if (!(node.get() instanceof Expressions.ParameterListS)) {\n throw new Error(\"parameterListS, unexpected node\");\n }\n const ret = [];\n for (const c of node.getChildren()) {\n if (!(c.get() instanceof Expressions.ParameterS) || !(c instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"parameterListS, unexpected node, child\");\n }\n const name = (_a = c.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n if (name === undefined) {\n throw new Error(\"parameterListS, no name determined\");\n }\n const source = c.findDirectExpression(Expressions.Source);\n if (source === undefined) {\n throw new Error(\"parameterListS, no source found\");\n }\n let targetType = undefined;\n if (!(method instanceof basic_1.VoidType)) {\n for (const i of method.getParameters().getImporting()) {\n if (i.getName().toUpperCase() === name) {\n targetType = i.getType();\n }\n }\n }\n let sourceType = new source_1.Source().runSyntax(source, scope, filename, targetType);\n if (sourceType === undefined) {\n if (method instanceof basic_1.VoidType) {\n sourceType = method;\n }\n else {\n throw new Error(\"No source type determined for parameter \" + name + \" input\");\n }\n }\n ret.push({ name, source, sourceType });\n }\n return ret;\n }\n parameterListT(node, scope, filename) {\n var _a;\n if (node === undefined) {\n return [];\n }\n else if (!(node.get() instanceof Expressions.ParameterListT)) {\n throw new Error(\"parameterListT, unexpected node\");\n }\n const ret = [];\n for (const c of node.getChildren()) {\n if (!(c.get() instanceof Expressions.ParameterT) || !(c instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"parameterListT, unexpected node, child\");\n }\n const name = (_a = c.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n if (name === undefined) {\n throw new Error(\"parameterListT, no name determined\");\n }\n const target = c.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n throw new Error(\"parameterListT, no target found\");\n }\n const targetType = new target_1.Target().runSyntax(target, scope, filename);\n ret.push({ name, target, targetType });\n }\n return ret;\n }\n}\nexports.MethodParameters = MethodParameters;\n//# sourceMappingURL=method_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js?");
7235
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodParameters = void 0;\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst nodes_1 = __webpack_require__(/*! ../../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst inline_data_1 = __webpack_require__(/*! ./inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\nconst target_1 = __webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\nconst source_1 = __webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\nconst _type_utils_1 = __webpack_require__(/*! ../_type_utils */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js\");\nclass MethodParameters {\n constructor() {\n this.requiredParameters = undefined;\n }\n runSyntax(node, scope, method, filename) {\n var _a;\n if (!(node.get() instanceof Expressions.MethodParameters)) {\n throw new Error(\"MethodParameters, unexpected input\");\n }\n const children = node.getChildren().slice();\n if (method instanceof basic_1.VoidType) {\n this.requiredParameters = new Set();\n }\n else {\n this.requiredParameters = new Set(method.getParameters().getRequiredParameters().map(i => i.getName().toUpperCase()));\n }\n while (children.length > 0) {\n const name = (_a = children.shift()) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n switch (name) {\n case \"EXPORTING\":\n this.checkExporting(children.shift(), scope, method, filename, false);\n break;\n case \"IMPORTING\":\n this.checkImporting(children.shift(), scope, method, filename);\n break;\n case \"CHANGING\":\n this.checkChanging(children.shift(), scope, method, filename);\n break;\n case \"RECEIVING\":\n this.checkReceiving(children.shift(), scope, method, filename);\n break;\n case \"EXCEPTIONS\":\n children.shift(); // todo, old style exceptions\n break;\n default:\n throw new Error(\"MethodParameters, unexpected token, \" + name);\n }\n }\n this.reportErrors();\n }\n ///////////////////////\n checkReceiving(node, scope, method, filename) {\n var _a;\n const type = method instanceof basic_1.VoidType ? method : (_a = method.getParameters().getReturning()) === null || _a === void 0 ? void 0 : _a.getType();\n if (type === undefined) {\n throw new Error(\"Method does not have a returning parameter\");\n }\n else if (!(node instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"checkReceiving, not an expression node\");\n }\n const target = node.findDirectExpression(Expressions.Target);\n const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);\n if (inline) {\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);\n }\n else if (target) {\n const targetType = new target_1.Target().runSyntax(target, scope, filename);\n if (targetType && new _type_utils_1.TypeUtils(scope).isAssignable(type, targetType) === false) {\n throw new Error(\"Method returning value not type compatible\");\n }\n }\n }\n checkImporting(node, scope, method, filename) {\n for (const item of this.parameterListT(node, scope, filename)) {\n let parameterType = undefined;\n if (method instanceof basic_1.VoidType) {\n parameterType = method;\n }\n else {\n const parameter = method.getParameters().getExporting().find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method exporting parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n parameterType = parameter.getType();\n }\n const inline = item.target.findDirectExpression(Expressions.InlineData);\n if (inline) {\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, parameterType);\n }\n else if (item.targetType === undefined) {\n throw new Error(\"Could not determine target type\");\n }\n else if (item.targetType && new _type_utils_1.TypeUtils(scope).isAssignable(parameterType, item.targetType) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n }\n }\n checkChanging(node, scope, method, filename) {\n var _a;\n for (const item of this.parameterListT(node, scope, filename)) {\n let parameterType = undefined;\n if (method instanceof basic_1.VoidType) {\n parameterType = method;\n }\n else {\n const parameter = method.getParameters().getChanging().find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method changing parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n parameterType = parameter.getType();\n }\n if (item.targetType && new _type_utils_1.TypeUtils(scope).isAssignable(parameterType, item.targetType) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n (_a = this.requiredParameters) === null || _a === void 0 ? void 0 : _a.delete(item.name);\n }\n }\n checkExporting(node, scope, method, filename, errors = true) {\n const items = this.parameterListS(node, scope, filename, method);\n if (method instanceof basic_1.VoidType) {\n return;\n }\n const allImporting = method.getParameters().getImporting();\n if (this.requiredParameters === undefined) {\n this.requiredParameters = new Set(method.getParameters().getRequiredParameters().map(i => i.getName().toUpperCase()));\n }\n for (const item of items) {\n const parameter = allImporting.find(p => p.getName().toUpperCase() === item.name);\n if (parameter === undefined) {\n throw new Error(\"Method importing parameter \\\"\" + item.name + \"\\\" does not exist\");\n }\n else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(item.sourceType, parameter.getType()) === false) {\n throw new Error(\"Method parameter type not compatible, \" + item.name);\n }\n this.requiredParameters.delete(item.name);\n }\n if (errors === true) {\n this.reportErrors();\n }\n }\n reportErrors() {\n var _a;\n for (const r of ((_a = this.requiredParameters) === null || _a === void 0 ? void 0 : _a.values()) || []) {\n throw new Error(`method parameter \"${r}\" must be supplied`);\n }\n }\n parameterListS(node, scope, filename, method) {\n var _a;\n if (node === undefined) {\n return [];\n }\n else if (!(node.get() instanceof Expressions.ParameterListS)) {\n throw new Error(\"parameterListS, unexpected node\");\n }\n const ret = [];\n for (const c of node.getChildren()) {\n if (!(c.get() instanceof Expressions.ParameterS) || !(c instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"parameterListS, unexpected node, child\");\n }\n const name = (_a = c.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n if (name === undefined) {\n throw new Error(\"parameterListS, no name determined\");\n }\n const source = c.findDirectExpression(Expressions.Source);\n if (source === undefined) {\n throw new Error(\"parameterListS, no source found\");\n }\n let targetType = undefined;\n if (!(method instanceof basic_1.VoidType)) {\n for (const i of method.getParameters().getImporting()) {\n if (i.getName().toUpperCase() === name) {\n targetType = i.getType();\n }\n }\n }\n let sourceType = new source_1.Source().runSyntax(source, scope, filename, targetType);\n if (sourceType === undefined) {\n if (method instanceof basic_1.VoidType) {\n sourceType = method;\n }\n else {\n throw new Error(\"No source type determined for parameter \" + name + \" input\");\n }\n }\n ret.push({ name, source, sourceType });\n }\n return ret;\n }\n parameterListT(node, scope, filename) {\n var _a;\n if (node === undefined) {\n return [];\n }\n else if (!(node.get() instanceof Expressions.ParameterListT)) {\n throw new Error(\"parameterListT, unexpected node\");\n }\n const ret = [];\n for (const c of node.getChildren()) {\n if (!(c.get() instanceof Expressions.ParameterT) || !(c instanceof nodes_1.ExpressionNode)) {\n throw new Error(\"parameterListT, unexpected node, child\");\n }\n const name = (_a = c.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();\n if (name === undefined) {\n throw new Error(\"parameterListT, no name determined\");\n }\n const target = c.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n throw new Error(\"parameterListT, no target found\");\n }\n const targetType = new target_1.Target().runSyntax(target, scope, filename);\n ret.push({ name, target, targetType });\n }\n return ret;\n }\n}\nexports.MethodParameters = MethodParameters;\n//# sourceMappingURL=method_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js?");
7236
7236
 
7237
7237
  /***/ }),
7238
7238
 
@@ -9073,6 +9073,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
9073
9073
 
9074
9074
  /***/ }),
9075
9075
 
9076
+ /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js":
9077
+ /*!*********************************************************************************!*\
9078
+ !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js ***!
9079
+ \*********************************************************************************/
9080
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9081
+
9082
+ "use strict";
9083
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.CGenericType = void 0;\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\nclass CGenericType extends _abstract_type_1.AbstractType {\n toText() {\n return \"```c```\";\n }\n isGeneric() {\n return true;\n }\n toABAP() {\n throw new Error(\"c, generic\");\n }\n containsVoid() {\n return false;\n }\n toCDS() {\n return \"abap.TODO_CGENERIC\";\n }\n}\nexports.CGenericType = CGenericType;\n//# sourceMappingURL=cgeneric_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js?");
9084
+
9085
+ /***/ }),
9086
+
9076
9087
  /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js":
9077
9088
  /*!**********************************************************************************!*\
9078
9089
  !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js ***!
@@ -9223,7 +9234,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
9223
9234
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9224
9235
 
9225
9236
  "use strict";
9226
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./any_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/any_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./character_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./clike_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/clike_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./csequence_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/csequence_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./data_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/data_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./date_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/date_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat16_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat16_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat34_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat34_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./float_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/float_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./floating_point_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/floating_point_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./generic_object_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/generic_object_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./hex_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/hex_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./integer_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/integer_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./numeric_generic_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_generic_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./numeric_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/object_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./packed_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/packed_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/simple_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/string_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./structure_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/table_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./time_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/time_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./utc_long_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/utc_long_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./void_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xsequence_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xstring_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/xstring_type.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/index.js?");
9237
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./any_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/any_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cgeneric_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./character_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/character_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./clike_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/clike_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./csequence_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/csequence_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./data_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/data_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./date_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/date_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat16_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat16_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decfloat34_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat34_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./float_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/float_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./floating_point_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/floating_point_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./generic_object_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/generic_object_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./hex_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/hex_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./integer_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/integer_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./numeric_generic_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_generic_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./numeric_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object_reference_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/object_reference_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./packed_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/packed_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/simple_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/string_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./structure_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/table_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./time_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/time_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./utc_long_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/utc_long_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./void_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xsequence_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xstring_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/xstring_type.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/basic/index.js?");
9227
9238
 
9228
9239
  /***/ }),
9229
9240
 
@@ -11830,7 +11841,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
11830
11841
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11831
11842
 
11832
11843
  "use strict";
11833
- 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.97.7\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11844
+ 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.97.9\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11834
11845
 
11835
11846
  /***/ }),
11836
11847
 
@@ -13805,7 +13816,7 @@ eval("//TODO: handle comments\nfunction readDocType(xmlData, i){\n \n cons
13805
13816
  \**********************************************************************/
13806
13817
  /***/ ((__unused_webpack_module, exports) => {
13807
13818
 
13808
- eval("\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\nexports.buildOptions = buildOptions;\nexports.defaultOptions = defaultOptions;\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js?");
13819
+ eval("\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs){\n return tagName\n },\n // skipEmptyListItem: false\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\nexports.buildOptions = buildOptions;\nexports.defaultOptions = defaultOptions;\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js?");
13809
13820
 
13810
13821
  /***/ }),
13811
13822
 
@@ -13816,7 +13827,7 @@ eval("\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePr
13816
13827
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13817
13828
 
13818
13829
  "use strict";
13819
- eval("\n///@ts-check\n\nconst util = __webpack_require__(/*! ../util */ \"./node_modules/fast-xml-parser/src/util.js\");\nconst xmlNode = __webpack_require__(/*! ./xmlNode */ \"./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js\");\nconst readDocType = __webpack_require__(/*! ./DocTypeReader */ \"./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js\");\nconst toNumber = __webpack_require__(/*! strnum */ \"./node_modules/strnum/strnum.js\");\n\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath) {\n if (!this.options.ignoreAttributes && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n \n currentNode = this.tagsNodeStack.pop();//avoid recurssion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath);\n }\n currentNode.addChild(childNode);\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n // let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + \".\" + this.options.cdataPropName, true, false, true);\n // if(!val) val = \"\";\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);\n if(val == undefined) val = \"\";\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n }\n\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n i = result.closeIndex;\n }\n //boolean tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${tagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n currentNode.addChild(childNode);\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n currentNode.addChild(childNode);\n }\n //opening tag\n else{\n const childNode = new xmlNode( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath);\n }\n currentNode.addChild(childNode);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-dobule quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return toNumber(val, options);\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\nmodule.exports = OrderedObjParser;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js?");
13830
+ eval("\n///@ts-check\n\nconst util = __webpack_require__(/*! ../util */ \"./node_modules/fast-xml-parser/src/util.js\");\nconst xmlNode = __webpack_require__(/*! ./xmlNode */ \"./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js\");\nconst readDocType = __webpack_require__(/*! ./DocTypeReader */ \"./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js\");\nconst toNumber = __webpack_require__(/*! strnum */ \"./node_modules/strnum/strnum.js\");\n\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n \n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n // let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + \".\" + this.options.cdataPropName, true, false, true);\n // if(!val) val = \"\";\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);\n if(val == undefined) val = \"\";\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n }\n\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n i = result.closeIndex;\n }\n //boolean tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${tagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n this.addChild(currentNode, childNode, jPath)\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n this.addChild(currentNode, childNode, jPath)\n }\n //opening tag\n else{\n const childNode = new xmlNode( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, jPath){\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"])\n if(result === false){\n }else if(typeof result === \"string\"){\n childNode.tagname = result\n currentNode.addChild(childNode);\n }else{\n currentNode.addChild(childNode);\n }\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return toNumber(val, options);\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\nmodule.exports = OrderedObjParser;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js?");
13820
13831
 
13821
13832
  /***/ }),
13822
13833
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.97.7",
3
+ "version": "2.97.9",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.97.7",
40
+ "@abaplint/core": "^2.97.9",
41
41
  "@types/chai": "^4.3.4",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",