@abaplint/cli 2.85.19 → 2.85.20

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 +7 -7
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -687,7 +687,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
687
687
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
688
688
 
689
689
  "use strict";
690
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CondBody = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass CondBody extends combi_1.Expression {\r\n getRunnable() {\r\n const when = (0, combi_1.seq)(\"WHEN\", _1.Cond, \"THEN\", (0, combi_1.alt)(_1.Source, _1.Throw));\r\n const elsee = (0, combi_1.seq)(\"ELSE\", (0, combi_1.alt)(_1.Source, _1.Throw));\r\n return (0, combi_1.seq)((0, combi_1.opt)(_1.Let), (0, combi_1.plus)(when), (0, combi_1.opt)(elsee));\r\n }\r\n}\r\nexports.CondBody = CondBody;\r\n//# sourceMappingURL=cond_body.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js?");
690
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CondBody = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass CondBody extends combi_1.Expression {\r\n getRunnable() {\r\n const when = (0, combi_1.seq)(\"WHEN\", (0, combi_1.alt)(_1.Cond, _1.Source), \"THEN\", (0, combi_1.alt)(_1.Source, _1.Throw));\r\n const elsee = (0, combi_1.seq)(\"ELSE\", (0, combi_1.alt)(_1.Source, _1.Throw));\r\n return (0, combi_1.seq)((0, combi_1.opt)(_1.Let), (0, combi_1.plus)(when), (0, combi_1.opt)(elsee));\r\n }\r\n}\r\nexports.CondBody = CondBody;\r\n//# sourceMappingURL=cond_body.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js?");
691
691
 
692
692
  /***/ }),
693
693
 
@@ -1776,7 +1776,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
1776
1776
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1777
1777
 
1778
1778
  "use strict";
1779
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReduceNext = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass ReduceNext extends combi_1.Expression {\r\n getRunnable() {\r\n const fields = (0, combi_1.seq)(_1.Field, \"=\", _1.Source);\r\n return (0, combi_1.seq)(\"NEXT\", (0, combi_1.plus)(fields));\r\n }\r\n}\r\nexports.ReduceNext = ReduceNext;\r\n//# sourceMappingURL=reduce_next.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js?");
1779
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReduceNext = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nclass ReduceNext extends combi_1.Expression {\r\n getRunnable() {\r\n const fields = (0, combi_1.seq)(_1.Field, (0, combi_1.altPrio)(\"=\", (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WPlus), \"=\")), _1.Source);\r\n return (0, combi_1.seq)(\"NEXT\", (0, combi_1.plus)(fields));\r\n }\r\n}\r\nexports.ReduceNext = ReduceNext;\r\n//# sourceMappingURL=reduce_next.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js?");
1780
1780
 
1781
1781
  /***/ }),
1782
1782
 
@@ -1798,7 +1798,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
1798
1798
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1799
1799
 
1800
1800
  "use strict";
1801
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Select = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\");\r\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\");\r\nclass Select extends combi_1.Expression {\r\n getRunnable() {\r\n const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure);\r\n const where = (0, combi_1.seq)(\"WHERE\", _1.SQLCond);\r\n const up = (0, combi_1.seq)(\"UP TO\", _1.SQLSource, \"ROWS\");\r\n const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)(\"OFFSET\", _1.SQLSource));\r\n const client = (0, combi_1.str)(\"CLIENT SPECIFIED\");\r\n const bypass = (0, combi_1.str)(\"BYPASSING BUFFER\");\r\n const fields = (0, combi_1.seq)(\"FIELDS\", _1.SQLFieldList);\r\n const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, up, offset, client, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);\r\n const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));\r\n const ret = (0, combi_1.seq)(\"SELECT\", (0, combi_1.altPrio)(\"DISTINCT\", (0, combi_1.optPrio)((0, combi_1.seq)(\"SINGLE\", (0, combi_1.optPrio)(\"FOR UPDATE\")))), (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren)), perm);\r\n return ret;\r\n }\r\n}\r\nexports.Select = Select;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js?");
1801
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Select = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\");\r\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\");\r\nclass Select extends combi_1.Expression {\r\n getRunnable() {\r\n const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure);\r\n const where = (0, combi_1.seq)(\"WHERE\", _1.SQLCond);\r\n const up = (0, combi_1.seq)(\"UP TO\", _1.SQLSource, \"ROWS\");\r\n const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)(\"OFFSET\", _1.SQLSource));\r\n const client = (0, combi_1.str)(\"CLIENT SPECIFIED\");\r\n const bypass = (0, combi_1.str)(\"BYPASSING BUFFER\");\r\n const fields = (0, combi_1.seq)(\"FIELDS\", _1.SQLFieldList);\r\n const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, up, offset, client, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);\r\n const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));\r\n const ret = (0, combi_1.seq)(\"SELECT\", (0, combi_1.altPrio)(\"DISTINCT\", (0, combi_1.optPrio)((0, combi_1.seq)(\"SINGLE\", (0, combi_1.optPrio)(\"FOR UPDATE\")))), (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren)), perm, (0, combi_1.optPrio)(_1.SQLHints));\r\n return ret;\r\n }\r\n}\r\nexports.Select = Select;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js?");
1802
1802
 
1803
1803
  /***/ }),
1804
1804
 
@@ -2414,7 +2414,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
2414
2414
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2415
2415
 
2416
2416
  "use strict";
2417
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeTable = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\");\r\nconst type_table_key_1 = __webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\");\r\nclass TypeTable extends combi_1.Expression {\r\n getRunnable() {\r\n const header = \"WITH HEADER LINE\";\r\n const initial = (0, combi_1.seq)(\"INITIAL SIZE\", _1.Constant);\r\n const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)(\"STANDARD\", \"HASHED\", \"INDEX\", \"SORTED\", \"ANY\")), \"TABLE\", (0, combi_1.opt)(\"OF\"), (0, combi_1.opt)(\"REF TO\"), (0, combi_1.opt)(_1.TypeName));\r\n const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)(\"STANDARD\", \"HASHED\", \"INDEX\", \"SORTED\", \"ANY\")), \"TABLE OF\", (0, combi_1.optPrio)(\"REF TO\"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));\r\n const rangeType = (0, combi_1.seq)(\"RANGE OF\", _1.TypeName, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));\r\n const rangeLike = (0, combi_1.seq)(\"RANGE OF\", _1.SimpleFieldChain, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));\r\n const typetable = (0, combi_1.seq)(normal1, (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));\r\n const occurs = (0, combi_1.seq)(\"OCCURS\", _1.Integer);\r\n const oldType = (0, combi_1.seq)((0, combi_1.opt)(\"REF TO\"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));\r\n const oldLike = (0, combi_1.seq)((0, combi_1.opt)(\"REF TO\"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));\r\n const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)(\"LIKE\", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)(\"TYPE\", (0, combi_1.alt)(oldType, typetable, rangeType)));\r\n return ret;\r\n }\r\n}\r\nexports.TypeTable = TypeTable;\r\n//# sourceMappingURL=type_table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js?");
2417
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeTable = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\");\r\nconst type_table_key_1 = __webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\");\r\nclass TypeTable extends combi_1.Expression {\r\n getRunnable() {\r\n const header = \"WITH HEADER LINE\";\r\n const initial = (0, combi_1.seq)(\"INITIAL SIZE\", _1.Constant);\r\n const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)(\"STANDARD\", \"HASHED\", \"INDEX\", \"SORTED\", \"ANY\")), \"TABLE\", (0, combi_1.opt)(\"OF\"), (0, combi_1.opt)(\"REF TO\"), (0, combi_1.opt)(_1.TypeName));\r\n const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)(\"STANDARD\", \"HASHED\", \"INDEX\", \"SORTED\", \"ANY\")), \"TABLE OF\", (0, combi_1.optPrio)(\"REF TO\"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));\r\n const rangeType = (0, combi_1.seq)(\"RANGE OF\", _1.TypeName, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));\r\n const rangeLike = (0, combi_1.seq)(\"RANGE OF\", _1.SimpleFieldChain, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));\r\n const typetable = (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))));\r\n const occurs = (0, combi_1.seq)(\"OCCURS\", _1.Integer);\r\n const oldType = (0, combi_1.seq)((0, combi_1.opt)(\"REF TO\"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));\r\n const oldLike = (0, combi_1.seq)((0, combi_1.opt)(\"REF TO\"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));\r\n const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)(\"LIKE\", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)(\"TYPE\", (0, combi_1.alt)(oldType, typetable, rangeType)));\r\n return ret;\r\n }\r\n}\r\nexports.TypeTable = TypeTable;\r\n//# sourceMappingURL=type_table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js?");
2418
2418
 
2419
2419
  /***/ }),
2420
2420
 
@@ -4966,7 +4966,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
4966
4966
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4967
4967
 
4968
4968
  "use strict";
4969
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Select = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Select {\r\n getMatcher() {\r\n const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)(\"UNION\", (0, combi_1.optPrio)((0, combi_1.altPrio)(\"DISTINCT\", \"ALL\")), expressions_1.Select));\r\n return (0, combi_1.seq)(expressions_1.Select, (0, combi_1.starPrio)(union), (0, combi_1.optPrio)(expressions_1.SQLHints));\r\n }\r\n}\r\nexports.Select = Select;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select.js?");
4969
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Select = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Select {\r\n getMatcher() {\r\n const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)(\"UNION\", (0, combi_1.optPrio)((0, combi_1.altPrio)(\"DISTINCT\", \"ALL\")), expressions_1.Select));\r\n return (0, combi_1.seq)(expressions_1.Select, (0, combi_1.starPrio)(union));\r\n }\r\n}\r\nexports.Select = Select;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select.js?");
4970
4970
 
4971
4971
  /***/ }),
4972
4972
 
@@ -6385,7 +6385,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6385
6385
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6386
6386
 
6387
6387
  "use strict";
6388
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BuiltIn = void 0;\r\n/* eslint-disable max-len */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass BuiltInMethod extends _identifier_1.Identifier {\r\n constructor(token, filename, method, row) {\r\n super(token, filename);\r\n this.method = method;\r\n this.row = row;\r\n }\r\n getRequiredParameters() {\r\n return [];\r\n }\r\n getOptional() {\r\n throw new Error(\"BuiltInMethod->Method not implemented.\");\r\n }\r\n getAll() {\r\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\r\n }\r\n getImporting() {\r\n const ret = [];\r\n for (const i in this.method.mandatory) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\r\n }\r\n for (const i in this.method.optional) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\r\n }\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.method.mandatory === undefined) {\r\n return undefined;\r\n }\r\n const keys = Object.keys(this.method.mandatory);\r\n if (keys.length === 1) {\r\n return keys[0].toUpperCase();\r\n }\r\n return undefined;\r\n }\r\n getExporting() {\r\n return [];\r\n }\r\n getRaising() {\r\n return [];\r\n }\r\n getChanging() {\r\n return [];\r\n }\r\n getReturning() {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\r\n }\r\n getExceptions() {\r\n return [];\r\n }\r\n getVisibility() {\r\n return visibility_1.Visibility.Public;\r\n }\r\n isRedefinition() {\r\n return false;\r\n }\r\n isAbstract() {\r\n return false;\r\n }\r\n isStatic() {\r\n return false;\r\n }\r\n isEventHandler() {\r\n return false;\r\n }\r\n getParameters() {\r\n return this;\r\n }\r\n getParameterDefault(_parameter) {\r\n return undefined;\r\n }\r\n}\r\nclass BuiltIn {\r\n constructor() {\r\n this.row = 1;\r\n }\r\n buildDefinition(method, row) {\r\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\r\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\r\n }\r\n searchBuiltin(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return this.buildDefinition(BuiltIn.methods[index], index);\r\n }\r\n getTypes() {\r\n const ret = this.buildSY();\r\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, \"ABAP_BOOL\")));\r\n return ret;\r\n }\r\n get(extras) {\r\n const ret = this.buildSY();\r\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\r\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\r\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\r\n ret.push(this.buildConstant(\"%_CR_LF\"));\r\n ret.push(this.buildConstant(\"%_ENDIAN\"));\r\n ret.push(this.buildConstant(\"%_FORMFEED\"));\r\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\r\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\r\n ret.push(this.buildConstant(\"%_MINCHAR\"));\r\n ret.push(this.buildConstant(\"%_NEWLINE\"));\r\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\r\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'-'\"));\r\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\r\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\r\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\r\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\r\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\r\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\r\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\r\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1), \"' '\"));\r\n for (const e of extras) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */], \"'?'\"));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////\r\n buildSY() {\r\n const components = [];\r\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, \"sy-abcde\") });\r\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, \"sy-batch\") });\r\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, \"sy-binpt\") });\r\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, \"sy-calld\") });\r\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, \"sy-callr\") });\r\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, \"sy-cprog\") });\r\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, \"sy-datar\") });\r\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\r\n components.push({ name: \"datum\", type: new basic_1.DateType() });\r\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\r\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, \"sy-dbnam\") });\r\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, \"sy-dbsys\") });\r\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, \"sy-dyngr\") });\r\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, \"sy-dynnr\") });\r\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, \"sy-host\") });\r\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, \"sy-langu\") });\r\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, \"sy-ldbpg\") });\r\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, \"sy-pdest\") });\r\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, \"sy-lisel\") });\r\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, \"sy-mandt\") });\r\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, \"sy-msgid\") });\r\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, \"sy-msgli\") });\r\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\r\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, \"sy-msgty\") });\r\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, \"sy-msgv1\") });\r\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, \"sy-msgv2\") });\r\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, \"sy-msgv3\") });\r\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, \"sy-msgv4\") });\r\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, \"sy-opsys\") });\r\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, \"sy-pfkey\") });\r\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, \"sy-repid\") });\r\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, \"sy-saprl\") });\r\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, \"sy-slset\") });\r\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, \"sy-spono\") });\r\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, \"sy-sysid\") });\r\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, \"sy-tcode\") });\r\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\r\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, \"sy-title\") });\r\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, \"sy-tvar0\") });\r\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, \"sy-tvar1\") });\r\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, \"sy-tvar2\") });\r\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, \"sy-tvar3\") });\r\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, \"sy-tvar4\") });\r\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, \"sy-tvar5\") });\r\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, \"sy-tvar6\") });\r\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, \"sy-tvar7\") });\r\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, \"sy-tvar8\") });\r\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, \"sy-tvar9\") });\r\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, \"sy-ucomm\") });\r\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, \"sy-uline\") });\r\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, \"sy-uname\") });\r\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\r\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, \"sy-vline\") });\r\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, \"sy-wtitl\") });\r\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, \"sy-zonlo\") });\r\n const type = new basic_1.StructureType(components);\r\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\r\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */]);\r\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\r\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */]);\r\n return [sy, syst];\r\n }\r\n buildConstant(name, type, value) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n if (type === undefined) {\r\n type = new basic_1.VoidType(name);\r\n }\r\n if (value === undefined) {\r\n value = \"'?'\";\r\n }\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */], value);\r\n }\r\n buildVariable(name) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* BuiltIn */]);\r\n }\r\n}\r\nexports.BuiltIn = BuiltIn;\r\nBuiltIn.filename = \"_builtin.prog.abap\";\r\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\r\n// todo: \"pcre\", only possible from 755\r\nBuiltIn.methods = [\r\n {\r\n name: \"ABS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"ACOS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ASIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ATAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"BIT-SET\",\r\n mandatory: {\r\n \"val\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLC\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLX\",\r\n mandatory: {\r\n \"bool\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"bit\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CEIL\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CHAR_OFF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"add\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CHARLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONCAT_LINES_OF\",\r\n mandatory: {\r\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONDENSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"del\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COSH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COUNT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"DBMAXLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"DISTANCE\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ESCAPE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"format\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"EXP\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"FIND\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_END\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FLOOR\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FRAC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FROM_MIXED\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"INSERT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"sub\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"IPOW\",\r\n mandatory: {\r\n \"base\": new basic_1.FloatType(),\r\n \"exp\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_EXISTS\",\r\n mandatory: {\r\n \"val\": new basic_1.AnyType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_INDEX\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINES\",\r\n mandatory: {\r\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"LOG\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"LOG10\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"MATCH\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n }, optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"MATCHES\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NUMOFCHAR\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"REPEAT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REPLACE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"with\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"RESCALE\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REVERSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ROUND\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SEGMENT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"index\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n \"space\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_LEFT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_RIGHT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SIGN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SINH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SQRT\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"STRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SUBSTRING\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_AFTER\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_BEFORE\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_FROM\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_TO\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TANH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TO_LOWER\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_MIXED\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_UPPER\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRANSLATE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRUNC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"UTCLONG_ADD\",\r\n mandatory: {\r\n \"val\": new basic_1.UTCLongType(),\r\n },\r\n optional: {\r\n \"days\": new basic_1.IntegerType(),\r\n \"hour\": new basic_1.IntegerType(),\r\n \"minutes\": new basic_1.IntegerType(),\r\n \"seconds\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_CURRENT\",\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_DIFF\",\r\n mandatory: {\r\n \"high\": new basic_1.UTCLongType(),\r\n \"low\": new basic_1.UTCLongType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"XSDBOOL\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp08,\r\n },\r\n {\r\n name: \"XSTRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.XStringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n];\r\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6388
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BuiltIn = void 0;\r\n/* eslint-disable max-len */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass BuiltInMethod extends _identifier_1.Identifier {\r\n constructor(token, filename, method, row) {\r\n super(token, filename);\r\n this.method = method;\r\n this.row = row;\r\n }\r\n getRequiredParameters() {\r\n return [];\r\n }\r\n getOptional() {\r\n throw new Error(\"BuiltInMethod->Method not implemented.\");\r\n }\r\n getAll() {\r\n throw new Error(\"BuiltInMethod->getAll, Method not implemented.\");\r\n }\r\n getImporting() {\r\n const ret = [];\r\n for (const i in this.method.mandatory) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));\r\n }\r\n for (const i in this.method.optional) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i]));\r\n }\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.method.mandatory === undefined) {\r\n return undefined;\r\n }\r\n const keys = Object.keys(this.method.mandatory);\r\n if (keys.length === 1) {\r\n return keys[0].toUpperCase();\r\n }\r\n return undefined;\r\n }\r\n getExporting() {\r\n return [];\r\n }\r\n getRaising() {\r\n return [];\r\n }\r\n getChanging() {\r\n return [];\r\n }\r\n getReturning() {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), \"ret\");\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return);\r\n }\r\n getExceptions() {\r\n return [];\r\n }\r\n getVisibility() {\r\n return visibility_1.Visibility.Public;\r\n }\r\n isRedefinition() {\r\n return false;\r\n }\r\n isAbstract() {\r\n return false;\r\n }\r\n isStatic() {\r\n return false;\r\n }\r\n isEventHandler() {\r\n return false;\r\n }\r\n getParameters() {\r\n return this;\r\n }\r\n getParameterDefault(_parameter) {\r\n return undefined;\r\n }\r\n}\r\nclass BuiltIn {\r\n constructor() {\r\n this.row = 1;\r\n }\r\n buildDefinition(method, row) {\r\n const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);\r\n return new BuiltInMethod(token, BuiltIn.filename, method, row);\r\n }\r\n searchBuiltin(name) {\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n // todo, optimize, use hash map\r\n const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return this.buildDefinition(BuiltIn.methods[index], index);\r\n }\r\n getTypes() {\r\n const ret = this.buildSY();\r\n const id = new tokens_1.Identifier(new position_1.Position(1, 1), \"abap_bool\");\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, \"ABAP_BOOL\")));\r\n return ret;\r\n }\r\n get(extras) {\r\n const ret = this.buildSY();\r\n ret.push(this.buildVariable(\"screen\")); // todo, add structure, or alternatively make native Statements\r\n ret.push(this.buildConstant(\"%_BACKSPACE\"));\r\n ret.push(this.buildConstant(\"%_CHARSIZE\"));\r\n ret.push(this.buildConstant(\"%_CR_LF\"));\r\n ret.push(this.buildConstant(\"%_ENDIAN\"));\r\n ret.push(this.buildConstant(\"%_FORMFEED\"));\r\n ret.push(this.buildConstant(\"%_HORIZONTAL_TAB\"));\r\n ret.push(this.buildConstant(\"%_MAXCHAR\"));\r\n ret.push(this.buildConstant(\"%_MINCHAR\"));\r\n ret.push(this.buildConstant(\"%_NEWLINE\"));\r\n ret.push(this.buildConstant(\"%_VERTICAL_TAB\"));\r\n ret.push(this.buildConstant(\"abap_false\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_true\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"abap_undefined\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'-'\"));\r\n ret.push(this.buildConstant(\"abap_off\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"' '\"));\r\n ret.push(this.buildConstant(\"abap_on\", new basic_1.CharacterType(1, \"ABAP_BOOL\"), \"'X'\"));\r\n ret.push(this.buildConstant(\"col_background\", new basic_1.IntegerType(), \"0\"));\r\n ret.push(this.buildConstant(\"col_heading\", new basic_1.IntegerType(), \"1\"));\r\n ret.push(this.buildConstant(\"col_key\", new basic_1.IntegerType(), \"4\"));\r\n ret.push(this.buildConstant(\"col_negative\", new basic_1.IntegerType(), \"6\"));\r\n ret.push(this.buildConstant(\"col_normal\", new basic_1.IntegerType(), \"2\"));\r\n ret.push(this.buildConstant(\"col_positive\", new basic_1.IntegerType(), \"5\"));\r\n ret.push(this.buildConstant(\"col_total\", new basic_1.IntegerType(), \"3\"));\r\n ret.push(this.buildConstant(\"space\", new basic_1.CharacterType(1), \"' '\"));\r\n for (const e of extras) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);\r\n ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */], \"'?'\"));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////\r\n buildSY() {\r\n const components = [];\r\n components.push({ name: \"abcde\", type: new basic_1.CharacterType(26, \"sy-abcde\") });\r\n components.push({ name: \"batch\", type: new basic_1.CharacterType(1, \"sy-batch\") });\r\n components.push({ name: \"binpt\", type: new basic_1.CharacterType(1, \"sy-binpt\") });\r\n components.push({ name: \"calld\", type: new basic_1.CharacterType(1, \"sy-calld\") });\r\n components.push({ name: \"callr\", type: new basic_1.CharacterType(8, \"sy-callr\") });\r\n components.push({ name: \"colno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cpage\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"cprog\", type: new basic_1.CharacterType(40, \"sy-cprog\") });\r\n components.push({ name: \"cucol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"curow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"datar\", type: new basic_1.CharacterType(1, \"sy-datar\") });\r\n components.push({ name: \"datlo\", type: new basic_1.DateType() });\r\n components.push({ name: \"datum\", type: new basic_1.DateType() });\r\n components.push({ name: \"dayst\", type: new basic_1.CharacterType(1) });\r\n components.push({ name: \"dbcnt\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"dbnam\", type: new basic_1.CharacterType(20, \"sy-dbnam\") });\r\n components.push({ name: \"dbsys\", type: new basic_1.CharacterType(10, \"sy-dbsys\") });\r\n components.push({ name: \"dyngr\", type: new basic_1.CharacterType(4, \"sy-dyngr\") });\r\n components.push({ name: \"dynnr\", type: new basic_1.CharacterType(4, \"sy-dynnr\") });\r\n components.push({ name: \"fdayw\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fdpos\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"fleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"folen\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"host\", type: new basic_1.CharacterType(32, \"sy-host\") });\r\n components.push({ name: \"index\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"input\", type: new basic_1.CharacterType(1, \"sy-input\") });\r\n components.push({ name: \"langu\", type: new basic_1.CharacterType(1, \"sy-langu\") });\r\n components.push({ name: \"ldbpg\", type: new basic_1.CharacterType(40, \"sy-ldbpg\") });\r\n components.push({ name: \"lilli\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linct\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"linsz\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lisel\", type: new basic_1.CharacterType(255, \"sy-lisel\") });\r\n components.push({ name: \"listi\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"loopc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"lsind\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"macol\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"mandt\", type: new basic_1.CharacterType(3, \"sy-mandt\") });\r\n components.push({ name: \"marow\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"modno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"msgid\", type: new basic_1.CharacterType(20, \"sy-msgid\") });\r\n components.push({ name: \"msgli\", type: new basic_1.CharacterType(60, \"sy-msgli\") });\r\n components.push({ name: \"msgno\", type: new basic_1.NumericType(3, \"sy-msgno\") });\r\n components.push({ name: \"msgty\", type: new basic_1.CharacterType(1, \"sy-msgty\") });\r\n components.push({ name: \"msgv1\", type: new basic_1.CharacterType(50, \"sy-msgv1\") });\r\n components.push({ name: \"msgv2\", type: new basic_1.CharacterType(50, \"sy-msgv2\") });\r\n components.push({ name: \"msgv3\", type: new basic_1.CharacterType(50, \"sy-msgv3\") });\r\n components.push({ name: \"msgv4\", type: new basic_1.CharacterType(50, \"sy-msgv4\") });\r\n components.push({ name: \"opsys\", type: new basic_1.CharacterType(10, \"sy-opsys\") });\r\n components.push({ name: \"pagno\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"pdest\", type: new basic_1.CharacterType(4, \"sy-pdest\") });\r\n components.push({ name: \"pfkey\", type: new basic_1.CharacterType(20, \"sy-pfkey\") });\r\n components.push({ name: \"repid\", type: new basic_1.CharacterType(40, \"sy-repid\") });\r\n components.push({ name: \"saprl\", type: new basic_1.CharacterType(4, \"sy-saprl\") });\r\n components.push({ name: \"scols\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"slset\", type: new basic_1.CharacterType(14, \"sy-slset\") });\r\n components.push({ name: \"spono\", type: new basic_1.CharacterType(10, \"sy-spono\") });\r\n components.push({ name: \"srows\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staco\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"staro\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"stepl\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"subrc\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"sysid\", type: new basic_1.CharacterType(3, \"sy-sysid\") });\r\n components.push({ name: \"tabix\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tcode\", type: new basic_1.CharacterType(20, \"sy-tcode\") });\r\n components.push({ name: \"tfill\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"timlo\", type: new basic_1.TimeType() });\r\n components.push({ name: \"title\", type: new basic_1.CharacterType(70, \"sy-title\") });\r\n components.push({ name: \"tleng\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"tvar0\", type: new basic_1.CharacterType(20, \"sy-tvar0\") });\r\n components.push({ name: \"tvar1\", type: new basic_1.CharacterType(20, \"sy-tvar1\") });\r\n components.push({ name: \"tvar2\", type: new basic_1.CharacterType(20, \"sy-tvar2\") });\r\n components.push({ name: \"tvar3\", type: new basic_1.CharacterType(20, \"sy-tvar3\") });\r\n components.push({ name: \"tvar4\", type: new basic_1.CharacterType(20, \"sy-tvar4\") });\r\n components.push({ name: \"tvar5\", type: new basic_1.CharacterType(20, \"sy-tvar5\") });\r\n components.push({ name: \"tvar6\", type: new basic_1.CharacterType(20, \"sy-tvar6\") });\r\n components.push({ name: \"tvar7\", type: new basic_1.CharacterType(20, \"sy-tvar7\") });\r\n components.push({ name: \"tvar8\", type: new basic_1.CharacterType(20, \"sy-tvar8\") });\r\n components.push({ name: \"tvar9\", type: new basic_1.CharacterType(20, \"sy-tvar9\") });\r\n components.push({ name: \"tzone\", type: new basic_1.IntegerType() });\r\n components.push({ name: \"ucomm\", type: new basic_1.CharacterType(70, \"sy-ucomm\") });\r\n components.push({ name: \"uline\", type: new basic_1.CharacterType(255, \"sy-uline\") });\r\n components.push({ name: \"uname\", type: new basic_1.CharacterType(12, \"sy-uname\") });\r\n components.push({ name: \"uzeit\", type: new basic_1.TimeType() });\r\n components.push({ name: \"vline\", type: new basic_1.CharacterType(1, \"sy-vline\") });\r\n components.push({ name: \"wtitl\", type: new basic_1.CharacterType(1, \"sy-wtitl\") });\r\n components.push({ name: \"zonlo\", type: new basic_1.CharacterType(6, \"sy-zonlo\") });\r\n const type = new basic_1.StructureType(components);\r\n const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"sy\");\r\n const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */]);\r\n const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), \"syst\");\r\n const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */]);\r\n return [sy, syst];\r\n }\r\n buildConstant(name, type, value) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n if (type === undefined) {\r\n type = new basic_1.VoidType(name);\r\n }\r\n if (value === undefined) {\r\n value = \"'?'\";\r\n }\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, [\"read_only\" /* ReadOnly */, \"built-in\" /* BuiltIn */], value);\r\n }\r\n buildVariable(name) {\r\n const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);\r\n return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), [\"built-in\" /* BuiltIn */]);\r\n }\r\n}\r\nexports.BuiltIn = BuiltIn;\r\nBuiltIn.filename = \"_builtin.prog.abap\";\r\n// todo: \"pcre\" vs \"regex\", only one of these parameters are allowed\r\n// todo: \"pcre\", only possible from 755\r\nBuiltIn.methods = [\r\n {\r\n name: \"ABS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"ACOS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ASIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"ATAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"BIT-SET\",\r\n mandatory: {\r\n \"val\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLC\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"BOOLX\",\r\n mandatory: {\r\n \"bool\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"bit\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.XStringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CEIL\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CHAR_OFF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"add\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CHARLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"CMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONCAT_LINES_OF\",\r\n mandatory: {\r\n \"table\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONDENSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"del\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1), version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"CONTAINS_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"start\": new basic_1.StringType(),\r\n \"end\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COS\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COSH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"COUNT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"COUNT_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"DBMAXLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"DISTANCE\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ESCAPE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"format\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"EXP\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"FIND\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_NOT_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_ANY_OF\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FIND_END\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"FLOOR\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FRAC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"FROM_MIXED\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"INSERT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"sub\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"IPOW\",\r\n mandatory: {\r\n \"base\": new basic_1.FloatType(),\r\n \"exp\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_EXISTS\",\r\n mandatory: {\r\n \"val\": new basic_1.AnyType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINE_INDEX\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v740sp02,\r\n },\r\n {\r\n name: \"LINES\",\r\n mandatory: {\r\n \"val\": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false }),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"LOG\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"LOG10\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"MATCH\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n }, optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"MATCHES\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMAX\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NMIN\",\r\n mandatory: {\r\n \"val1\": new basic_1.StringType(),\r\n \"val2\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"val3\": new basic_1.StringType(),\r\n \"val4\": new basic_1.StringType(),\r\n \"val5\": new basic_1.StringType(),\r\n \"val6\": new basic_1.StringType(),\r\n \"val7\": new basic_1.StringType(),\r\n \"val8\": new basic_1.StringType(),\r\n \"val9\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"NUMOFCHAR\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"REPEAT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REPLACE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"with\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"RESCALE\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"REVERSE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"ROUND\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n optional: {\r\n \"dec\": new basic_1.IntegerType(),\r\n \"prec\": new basic_1.IntegerType(),\r\n \"mode\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SEGMENT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"index\": new basic_1.IntegerType(),\r\n },\r\n optional: {\r\n \"sep\": new basic_1.StringType(),\r\n \"space\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_LEFT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SHIFT_RIGHT\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"places\": new basic_1.IntegerType(),\r\n \"circular\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SIGN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SIN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SINH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"SQRT\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"STRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"SUBSTRING\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"off\": new basic_1.IntegerType(),\r\n \"len\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_AFTER\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_BEFORE\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_FROM\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"SUBSTRING_TO\",\r\n mandatory: {\r\n \"val\": new basic_1.CLikeType(),\r\n },\r\n optional: {\r\n \"sub\": new basic_1.StringType(),\r\n \"regex\": new basic_1.StringType(),\r\n \"pcre\": new basic_1.StringType(),\r\n \"case\": new basic_1.CharacterType(1),\r\n \"len\": new basic_1.IntegerType(),\r\n \"occ\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TAN\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TANH\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n },\r\n {\r\n name: \"TO_LOWER\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_MIXED\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n optional: {\r\n \"case\": new basic_1.CharacterType(1),\r\n \"sep\": new basic_1.IntegerType(),\r\n \"min\": new basic_1.IntegerType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TO_UPPER\",\r\n mandatory: { \"val\": new basic_1.StringType() },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRANSLATE\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n \"from\": new basic_1.StringType(),\r\n \"to\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.StringType(),\r\n version: version_1.Version.v702,\r\n },\r\n {\r\n name: \"TRUNC\",\r\n mandatory: {\r\n \"val\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n {\r\n name: \"UTCLONG_ADD\",\r\n mandatory: {\r\n \"val\": new basic_1.UTCLongType(),\r\n },\r\n optional: {\r\n \"days\": new basic_1.IntegerType(),\r\n \"hour\": new basic_1.IntegerType(),\r\n \"minutes\": new basic_1.IntegerType(),\r\n \"seconds\": new basic_1.FloatType(),\r\n },\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_CURRENT\",\r\n return: new basic_1.UTCLongType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"UTCLONG_DIFF\",\r\n mandatory: {\r\n \"high\": new basic_1.UTCLongType(),\r\n \"low\": new basic_1.UTCLongType(),\r\n },\r\n return: new basic_1.FloatType(),\r\n version: version_1.Version.v754,\r\n },\r\n {\r\n name: \"XSDBOOL\",\r\n mandatory: {\r\n \"val\": new basic_1.StringType(),\r\n },\r\n return: new basic_1.CharacterType(1),\r\n version: version_1.Version.v740sp08,\r\n },\r\n {\r\n name: \"XSTRLEN\",\r\n mandatory: {\r\n \"val\": new basic_1.XStringType(),\r\n },\r\n return: new basic_1.IntegerType(),\r\n },\r\n];\r\n//# sourceMappingURL=_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js?");
6389
6389
 
6390
6390
  /***/ }),
6391
6391
 
@@ -11181,7 +11181,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11181
11181
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11182
11182
 
11183
11183
  "use strict";
11184
- 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 artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.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 syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.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\");\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 /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\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.85.19\";\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 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) {\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 const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === 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 this.runRules(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 this.runRules(undefined, 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 this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\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 this.issues = [];\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 this.issues.push(...o.getParsingIssues());\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 runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\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?");
11184
+ 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 artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.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 syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.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\");\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 /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\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.85.20\";\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 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) {\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 const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === 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 this.runRules(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 this.runRules(undefined, 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 this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\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 this.issues = [];\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 this.issues.push(...o.getParsingIssues());\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 runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\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?");
11185
11185
 
11186
11186
  /***/ }),
11187
11187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.85.19",
3
+ "version": "2.85.20",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.85.19",
42
+ "@abaplint/core": "^2.85.20",
43
43
  "@types/chai": "^4.3.0",
44
44
  "@types/glob": "^7.2.0",
45
45
  "@types/minimist": "^1.2.2",
@@ -53,10 +53,10 @@
53
53
  "json5": "^2.2.0",
54
54
  "memfs": "^3.4.1",
55
55
  "minimist": "^1.2.5",
56
- "mocha": "^9.2.0",
56
+ "mocha": "^9.2.1",
57
57
  "progress": "^2.0.3",
58
58
  "typescript": "^4.5.5",
59
- "webpack": "^5.69.0",
59
+ "webpack": "^5.69.1",
60
60
  "webpack-cli": "^4.9.2",
61
61
  "xml-js": "^1.6.11"
62
62
  },