@abaplint/transpiler-cli 2.3.50 → 2.3.51
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.
- package/build/bundle.js +25 -14
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -6748,7 +6748,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6748
6748
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6749
6749
|
|
|
6750
6750
|
"use strict";
|
|
6751
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataDefinition = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\r\nconst type_table_1 = __webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/type_table.js\");\r\nclass DataDefinition {\r\n runSyntax(node, scope, filename) {\r\n const tt = node.findFirstExpression(Expressions.TypeTable);\r\n if (tt) {\r\n return new type_table_1.TypeTable().runSyntax(node, scope, filename);\r\n }\r\n const bfound = new basic_types_1.BasicTypes(filename, scope).simpleType(node);\r\n if (bfound) {\r\n return bfound;\r\n }\r\n const name = node.findFirstExpression(Expressions.DefinitionName);\r\n if (name) {\r\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(\"DataDefinition, fallback\"));\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.DataDefinition = DataDefinition;\r\n//# sourceMappingURL=data_definition.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js?");
|
|
6751
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataDefinition = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\r\nconst type_table_1 = __webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/type_table.js\");\r\nclass DataDefinition {\r\n runSyntax(node, scope, filename) {\r\n const tt = node.findFirstExpression(Expressions.TypeTable);\r\n if (tt) {\r\n return new type_table_1.TypeTable().runSyntax(node, scope, filename);\r\n }\r\n const valueNode = node.findFirstExpression(Expressions.Value);\r\n let value = undefined;\r\n if (valueNode) {\r\n value = new basic_types_1.BasicTypes(filename, scope).findValue(node);\r\n }\r\n const bfound = new basic_types_1.BasicTypes(filename, scope).simpleType(node);\r\n if (bfound) {\r\n if (value) {\r\n return new _typed_identifier_1.TypedIdentifier(bfound.getToken(), filename, bfound.getType(), bfound.getMeta(), value);\r\n }\r\n else {\r\n return bfound;\r\n }\r\n }\r\n const name = node.findFirstExpression(Expressions.DefinitionName);\r\n if (name) {\r\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.UnknownType(\"DataDefinition, fallback\"));\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.DataDefinition = DataDefinition;\r\n//# sourceMappingURL=data_definition.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js?");
|
|
6752
6752
|
|
|
6753
6753
|
/***/ }),
|
|
6754
6754
|
|
|
@@ -7419,7 +7419,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7419
7419
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7420
7420
|
|
|
7421
7421
|
"use strict";
|
|
7422
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassData = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst data_definition_1 = __webpack_require__(/*! ../expressions/data_definition */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nclass ClassData {\r\n runSyntax(node, scope, filename) {\r\n const dd = node.findFirstExpression(Expressions.DataDefinition);\r\n if (dd) {\r\n const found = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const meta = found.getMeta()
|
|
7422
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassData = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst data_definition_1 = __webpack_require__(/*! ../expressions/data_definition */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nclass ClassData {\r\n runSyntax(node, scope, filename) {\r\n const dd = node.findFirstExpression(Expressions.DataDefinition);\r\n if (dd) {\r\n const found = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const meta = [...found.getMeta(), \"static\" /* IdentifierMeta.Static */];\r\n return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta, found.getValue());\r\n }\r\n const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (fallback) {\r\n return new _typed_identifier_1.TypedIdentifier(fallback.getFirstToken(), filename, new unknown_type_1.UnknownType(\"class data, fallback\"));\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ClassData = ClassData;\r\n//# sourceMappingURL=class_data.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_data.js?");
|
|
7423
7423
|
|
|
7424
7424
|
/***/ }),
|
|
7425
7425
|
|
|
@@ -7584,7 +7584,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7584
7584
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7585
7585
|
|
|
7586
7586
|
"use strict";
|
|
7587
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Data = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst data_definition_1 = __webpack_require__(/*! ../expressions/data_definition */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\
|
|
7587
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Data = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst data_definition_1 = __webpack_require__(/*! ../expressions/data_definition */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/data_definition.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nclass Data {\r\n runSyntax(node, scope, filename) {\r\n const dd = node.findFirstExpression(Expressions.DataDefinition);\r\n if (dd) {\r\n return new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);\r\n }\r\n const name = node.findFirstExpression(Expressions.DefinitionName);\r\n if (name) {\r\n return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new unknown_type_1.UnknownType(\"data, fallback\"));\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.Data = Data;\r\n//# sourceMappingURL=data.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js?");
|
|
7588
7588
|
|
|
7589
7589
|
/***/ }),
|
|
7590
7590
|
|
|
@@ -9102,7 +9102,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9102
9102
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9103
9103
|
|
|
9104
9104
|
"use strict";
|
|
9105
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VoidType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass VoidType extends _abstract_type_1.AbstractType {\r\n constructor(voided, name) {\r\n super(name);\r\n this.voided = voided;\r\n }\r\n getVoided() {\r\n return this.voided;\r\n }\r\n toABAP() {\r\n
|
|
9105
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VoidType = void 0;\r\nconst _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nclass VoidType extends _abstract_type_1.AbstractType {\r\n constructor(voided, name) {\r\n super(name);\r\n this.voided = voided;\r\n }\r\n getVoided() {\r\n return this.voided;\r\n }\r\n toABAP() {\r\n return this.voided || \"VOIDEDtoABAP\";\r\n }\r\n toText() {\r\n return \"Void(\" + this.voided + \")\";\r\n }\r\n isGeneric() {\r\n return false;\r\n }\r\n containsVoid() {\r\n return true;\r\n }\r\n toCDS() {\r\n return \"abap.TODO_VOID\";\r\n }\r\n}\r\nexports.VoidType = VoidType;\r\n//# sourceMappingURL=void_type.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js?");
|
|
9106
9106
|
|
|
9107
9107
|
/***/ }),
|
|
9108
9108
|
|
|
@@ -9135,7 +9135,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9135
9135
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9136
9136
|
|
|
9137
9137
|
"use strict";
|
|
9138
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassAttribute = void 0;\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nclass ClassAttribute extends _typed_identifier_1.TypedIdentifier {\r\n constructor(id, visibility, meta) {\r\n super(id.getToken(), id.getFilename(), id.getType(), meta);\r\n this.visibility = visibility;\r\n }\r\n getVisibility() {\r\n return this.visibility;\r\n }\r\n}\r\nexports.ClassAttribute = ClassAttribute;\r\n//# sourceMappingURL=class_attribute.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/class_attribute.js?");
|
|
9138
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassAttribute = void 0;\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nclass ClassAttribute extends _typed_identifier_1.TypedIdentifier {\r\n constructor(id, visibility, meta, value) {\r\n super(id.getToken(), id.getFilename(), id.getType(), meta, value);\r\n this.visibility = visibility;\r\n }\r\n getVisibility() {\r\n return this.visibility;\r\n }\r\n}\r\nexports.ClassAttribute = ClassAttribute;\r\n//# sourceMappingURL=class_attribute.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/class_attribute.js?");
|
|
9139
9139
|
|
|
9140
9140
|
/***/ }),
|
|
9141
9141
|
|
|
@@ -9146,7 +9146,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9146
9146
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9147
9147
|
|
|
9148
9148
|
"use strict";
|
|
9149
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Attributes = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst class_attribute_1 = __webpack_require__(/*! ./class_attribute */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attribute.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ./class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.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 class_data_1 = __webpack_require__(/*! ../5_syntax/statements/class_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_data.js\");\r\nconst class_data_2 = __webpack_require__(/*! ../5_syntax/structures/class_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/class_data.js\");\r\nconst data_1 = __webpack_require__(/*! ../5_syntax/statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst constant_1 = __webpack_require__(/*! ../5_syntax/statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst data_2 = __webpack_require__(/*! ../5_syntax/structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ../5_syntax/structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst constants_1 = __webpack_require__(/*! ../5_syntax/structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst type_definitions_1 = __webpack_require__(/*! ./type_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/type_definitions.js\");\r\nconst types_1 = __webpack_require__(/*! ../5_syntax/structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst type_1 = __webpack_require__(/*! ../5_syntax/statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nclass Attributes {\r\n constructor(node, filename, scope) {\r\n this.static = [];\r\n this.instance = [];\r\n this.constants = [];\r\n this.filename = filename;\r\n this.tlist = [];\r\n this.parse(node, scope);\r\n this.types = new type_definitions_1.TypeDefinitions(this.tlist);\r\n }\r\n getTypes() {\r\n return this.types;\r\n }\r\n getStatic() {\r\n return this.static;\r\n }\r\n getAll() {\r\n let res = [];\r\n res = res.concat(this.static);\r\n res = res.concat(this.instance);\r\n return res;\r\n }\r\n getStaticsByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.static) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n getInstance() {\r\n return this.instance;\r\n }\r\n getInstancesByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.instance) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n getConstants() {\r\n return this.constants;\r\n }\r\n getConstantsByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.constants) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n // todo, optimize\r\n findByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const a of this.getStatic()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of this.getInstance()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of this.getConstants()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n return undefined;\r\n }\r\n /////////////////////////////\r\n parse(node, scope) {\r\n const cdef = node.findDirectStructure(Structures.ClassDefinition);\r\n if (cdef) {\r\n this.parseSection(cdef.findDirectStructure(Structures.PublicSection), visibility_1.Visibility.Public, scope);\r\n this.parseSection(cdef.findDirectStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected, scope);\r\n this.parseSection(cdef.findDirectStructure(Structures.PrivateSection), visibility_1.Visibility.Private, scope);\r\n return;\r\n }\r\n const idef = node.findDirectStructure(Structures.Interface);\r\n if (idef) {\r\n this.parseSection(idef.findDirectStructure(Structures.SectionContents), visibility_1.Visibility.Public, scope);\r\n return;\r\n }\r\n throw new Error(\"MethodDefinition, expected ClassDefinition or InterfaceDefinition\");\r\n }\r\n parseSection(node, visibility, scope) {\r\n if (node === undefined) {\r\n return;\r\n }\r\n for (const c of node.getChildren()) {\r\n const ctyp = c.get();\r\n if (c instanceof nodes_1.StructureNode) {\r\n if (ctyp instanceof Structures.Data) {\r\n const found = new data_2.Data().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());\r\n this.instance.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.ClassData) {\r\n const found = new class_data_2.ClassData().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());\r\n this.static.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.Constants) {\r\n const { type: found, values } = new constants_1.Constants().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_constant_1.ClassConstant(found, visibility, values);\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.TypeEnum) {\r\n const { values, types } = new type_enum_1.TypeEnum().runSyntax(c, scope, this.filename);\r\n for (const v of values) {\r\n // for now add ENUM values as constants\r\n const attr = new class_constant_1.ClassConstant(v, visibility, \"novalueClassAttributeEnum\");\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n for (const t of types) {\r\n this.tlist.push({ type: t, visibility });\r\n // scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.Types) {\r\n const res = new types_1.Types().runSyntax(c, scope, this.filename);\r\n if (res) {\r\n scope.addType(res);\r\n this.tlist.push({ type: res, visibility });\r\n }\r\n }\r\n else {\r\n // begin recursion\r\n this.parseSection(c, visibility, scope);\r\n }\r\n }\r\n else if (c instanceof nodes_1.StatementNode) {\r\n if (ctyp instanceof Statements.Data) {\r\n this.instance.push(this.parseAttribute(c, visibility, scope));\r\n }\r\n else if (ctyp instanceof Statements.ClassData) {\r\n this.static.push(this.parseAttribute(c, visibility, scope));\r\n }\r\n else if (ctyp instanceof Statements.Constant) {\r\n const found = new constant_1.Constant().runSyntax(c, scope, this.filename);\r\n if (found) {\r\n const attr = new class_constant_1.ClassConstant(found, visibility, found.getValue());\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Statements.Type) {\r\n const res = new type_1.Type().runSyntax(c, scope, this.filename);\r\n if (res) {\r\n scope.addType(res);\r\n this.tlist.push({ type: res, visibility });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n parseAttribute(node, visibility, scope) {\r\n let found = undefined;\r\n const s = node.get();\r\n if (s instanceof Statements.Data) {\r\n found = new data_1.Data().runSyntax(node, scope, this.filename);\r\n }\r\n else if (s instanceof Statements.ClassData) {\r\n found = new class_data_1.ClassData().runSyntax(node, scope, this.filename);\r\n }\r\n else {\r\n throw new Error(\"ClassAttribute, unexpected node, 1, \" + this.filename);\r\n }\r\n if (found === undefined) {\r\n throw new Error(\"ClassAttribute, unexpected node, \" + this.filename);\r\n }\r\n scope.addIdentifier(found);\r\n return new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());\r\n }\r\n}\r\nexports.Attributes = Attributes;\r\n//# sourceMappingURL=class_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js?");
|
|
9149
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Attributes = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst class_attribute_1 = __webpack_require__(/*! ./class_attribute */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attribute.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ./class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.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 class_data_1 = __webpack_require__(/*! ../5_syntax/statements/class_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_data.js\");\r\nconst class_data_2 = __webpack_require__(/*! ../5_syntax/structures/class_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/class_data.js\");\r\nconst data_1 = __webpack_require__(/*! ../5_syntax/statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst constant_1 = __webpack_require__(/*! ../5_syntax/statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst data_2 = __webpack_require__(/*! ../5_syntax/structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ../5_syntax/structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst constants_1 = __webpack_require__(/*! ../5_syntax/structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst type_definitions_1 = __webpack_require__(/*! ./type_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/type_definitions.js\");\r\nconst types_1 = __webpack_require__(/*! ../5_syntax/structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst type_1 = __webpack_require__(/*! ../5_syntax/statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nclass Attributes {\r\n constructor(node, filename, scope) {\r\n this.static = [];\r\n this.instance = [];\r\n this.constants = [];\r\n this.filename = filename;\r\n this.tlist = [];\r\n this.parse(node, scope);\r\n this.types = new type_definitions_1.TypeDefinitions(this.tlist);\r\n }\r\n getTypes() {\r\n return this.types;\r\n }\r\n getStatic() {\r\n return this.static;\r\n }\r\n getAll() {\r\n let res = [];\r\n res = res.concat(this.static);\r\n res = res.concat(this.instance);\r\n return res;\r\n }\r\n getStaticsByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.static) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n getInstance() {\r\n return this.instance;\r\n }\r\n getInstancesByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.instance) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n getConstants() {\r\n return this.constants;\r\n }\r\n getConstantsByVisibility(visibility) {\r\n const attributes = [];\r\n for (const attr of this.constants) {\r\n if (attr.getVisibility() === visibility) {\r\n attributes.push(attr);\r\n }\r\n }\r\n return attributes;\r\n }\r\n // todo, optimize\r\n findByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const a of this.getStatic()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of this.getInstance()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of this.getConstants()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n return undefined;\r\n }\r\n /////////////////////////////\r\n parse(node, scope) {\r\n const cdef = node.findDirectStructure(Structures.ClassDefinition);\r\n if (cdef) {\r\n this.parseSection(cdef.findDirectStructure(Structures.PublicSection), visibility_1.Visibility.Public, scope);\r\n this.parseSection(cdef.findDirectStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected, scope);\r\n this.parseSection(cdef.findDirectStructure(Structures.PrivateSection), visibility_1.Visibility.Private, scope);\r\n return;\r\n }\r\n const idef = node.findDirectStructure(Structures.Interface);\r\n if (idef) {\r\n this.parseSection(idef.findDirectStructure(Structures.SectionContents), visibility_1.Visibility.Public, scope);\r\n return;\r\n }\r\n throw new Error(\"MethodDefinition, expected ClassDefinition or InterfaceDefinition\");\r\n }\r\n parseSection(node, visibility, scope) {\r\n if (node === undefined) {\r\n return;\r\n }\r\n for (const c of node.getChildren()) {\r\n const ctyp = c.get();\r\n if (c instanceof nodes_1.StructureNode) {\r\n if (ctyp instanceof Structures.Data) {\r\n const found = new data_2.Data().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());\r\n this.instance.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.ClassData) {\r\n const found = new class_data_2.ClassData().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());\r\n this.static.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.Constants) {\r\n const { type: found, values } = new constants_1.Constants().runSyntax(c, scope, this.filename);\r\n if (found !== undefined) {\r\n const attr = new class_constant_1.ClassConstant(found, visibility, values);\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.TypeEnum) {\r\n const { values, types } = new type_enum_1.TypeEnum().runSyntax(c, scope, this.filename);\r\n for (const v of values) {\r\n // for now add ENUM values as constants\r\n const attr = new class_constant_1.ClassConstant(v, visibility, \"novalueClassAttributeEnum\");\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n for (const t of types) {\r\n this.tlist.push({ type: t, visibility });\r\n // scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Structures.Types) {\r\n const res = new types_1.Types().runSyntax(c, scope, this.filename);\r\n if (res) {\r\n scope.addType(res);\r\n this.tlist.push({ type: res, visibility });\r\n }\r\n }\r\n else {\r\n // begin recursion\r\n this.parseSection(c, visibility, scope);\r\n }\r\n }\r\n else if (c instanceof nodes_1.StatementNode) {\r\n if (ctyp instanceof Statements.Data) {\r\n this.instance.push(this.parseAttribute(c, visibility, scope));\r\n }\r\n else if (ctyp instanceof Statements.ClassData) {\r\n this.static.push(this.parseAttribute(c, visibility, scope));\r\n }\r\n else if (ctyp instanceof Statements.Constant) {\r\n const found = new constant_1.Constant().runSyntax(c, scope, this.filename);\r\n if (found) {\r\n const attr = new class_constant_1.ClassConstant(found, visibility, found.getValue());\r\n this.constants.push(attr);\r\n scope.addIdentifier(attr);\r\n }\r\n }\r\n else if (ctyp instanceof Statements.Type) {\r\n const res = new type_1.Type().runSyntax(c, scope, this.filename);\r\n if (res) {\r\n scope.addType(res);\r\n this.tlist.push({ type: res, visibility });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n parseAttribute(node, visibility, scope) {\r\n let found = undefined;\r\n const s = node.get();\r\n if (s instanceof Statements.Data) {\r\n found = new data_1.Data().runSyntax(node, scope, this.filename);\r\n }\r\n else if (s instanceof Statements.ClassData) {\r\n found = new class_data_1.ClassData().runSyntax(node, scope, this.filename);\r\n }\r\n else {\r\n throw new Error(\"ClassAttribute, unexpected node, 1, \" + this.filename);\r\n }\r\n if (found === undefined) {\r\n throw new Error(\"ClassAttribute, unexpected node, \" + this.filename);\r\n }\r\n scope.addIdentifier(found);\r\n return new class_attribute_1.ClassAttribute(found, visibility, found.getMeta(), found.getValue());\r\n }\r\n}\r\nexports.Attributes = Attributes;\r\n//# sourceMappingURL=class_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js?");
|
|
9150
9150
|
|
|
9151
9151
|
/***/ }),
|
|
9152
9152
|
|
|
@@ -9432,7 +9432,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9432
9432
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9433
9433
|
|
|
9434
9434
|
"use strict";
|
|
9435
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSArithmetics = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSArithmetics extends combi_1.Expression {\r\n getRunnable() {\r\n const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(\".\", _1.CDSName)));\r\n const val = (0, combi_1.alt)(
|
|
9435
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSArithmetics = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_integer_1 = __webpack_require__(/*! ./cds_integer */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js\");\r\nclass CDSArithmetics extends combi_1.Expression {\r\n getRunnable() {\r\n const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(\".\", _1.CDSName)));\r\n const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);\r\n const operator = (0, combi_1.altPrio)(\"+\", \"-\", \"*\", \"/\");\r\n return (0, combi_1.seq)(val, operator, val);\r\n }\r\n}\r\nexports.CDSArithmetics = CDSArithmetics;\r\n//# sourceMappingURL=cds_arithmetics.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_arithmetics.js?");
|
|
9436
9436
|
|
|
9437
9437
|
/***/ }),
|
|
9438
9438
|
|
|
@@ -9509,7 +9509,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9509
9509
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9510
9510
|
|
|
9511
9511
|
"use strict";
|
|
9512
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSCondition = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSCondition extends combi_1.Expression {\r\n getRunnable() {\r\n const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(\".\", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));\r\n const
|
|
9512
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSCondition = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_integer_1 = __webpack_require__(/*! ./cds_integer */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js\");\r\nclass CDSCondition extends combi_1.Expression {\r\n getRunnable() {\r\n const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(\".\", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));\r\n const left = (0, combi_1.alt)(name, _1.CDSFunction);\r\n const compare = (0, combi_1.seq)(left, (0, combi_1.alt)(\"=\", (0, combi_1.seq)(\"!\", \"=\"), (0, combi_1.seq)(\"<\", \">\"), \"<\", \">\", (0, combi_1.seq)(\">\", \"=\"), (0, combi_1.seq)(\"<\", \"=\"), \"LIKE\", \"NOT LIKE\"), (0, combi_1.alt)(left, cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSString));\r\n const is = (0, combi_1.seq)(left, \"IS\", (0, combi_1.optPrio)(\"NOT\"), (0, combi_1.altPrio)(\"INITIAL\", \"NULL\"));\r\n const condition = (0, combi_1.alt)(compare, is);\r\n const paren = (0, combi_1.seq)(\"(\", CDSCondition, \")\");\r\n return (0, combi_1.seq)((0, combi_1.alt)(condition, paren), (0, combi_1.star)((0, combi_1.seq)((0, combi_1.alt)(\"AND\", \"OR\"), (0, combi_1.alt)(condition, paren))));\r\n }\r\n}\r\nexports.CDSCondition = CDSCondition;\r\n//# sourceMappingURL=cds_condition.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js?");
|
|
9513
9513
|
|
|
9514
9514
|
/***/ }),
|
|
9515
9515
|
|
|
@@ -9564,7 +9564,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9564
9564
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9565
9565
|
|
|
9566
9566
|
"use strict";
|
|
9567
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSElement = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_as_1 = __webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\");\r\nconst cds_cast_1 = __webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\");\r\nclass CDSElement extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)(\"KEY\"), (0, combi_1.altPrio)(
|
|
9567
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSElement = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_as_1 = __webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\");\r\nconst cds_cast_1 = __webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\");\r\nclass CDSElement extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)(\"KEY\"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(\".\", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), (0, combi_1.regex)(/^\\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));\r\n }\r\n}\r\nexports.CDSElement = CDSElement;\r\n//# sourceMappingURL=cds_element.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js?");
|
|
9568
9568
|
|
|
9569
9569
|
/***/ }),
|
|
9570
9570
|
|
|
@@ -9590,6 +9590,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9590
9590
|
|
|
9591
9591
|
/***/ }),
|
|
9592
9592
|
|
|
9593
|
+
/***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js":
|
|
9594
|
+
/*!******************************************************************************!*\
|
|
9595
|
+
!*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js ***!
|
|
9596
|
+
\******************************************************************************/
|
|
9597
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9598
|
+
|
|
9599
|
+
"use strict";
|
|
9600
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSInteger = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSInteger extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.regex)(/^\\d+$/);\r\n }\r\n}\r\nexports.CDSInteger = CDSInteger;\r\n//# sourceMappingURL=cds_integer.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js?");
|
|
9601
|
+
|
|
9602
|
+
/***/ }),
|
|
9603
|
+
|
|
9593
9604
|
/***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js":
|
|
9594
9605
|
/*!***************************************************************************!*\
|
|
9595
9606
|
!*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js ***!
|
|
@@ -9718,7 +9729,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9718
9729
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
9719
9730
|
|
|
9720
9731
|
"use strict";
|
|
9721
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./cds_aggregate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_aggregate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_array */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_array.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_object */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_simple */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_arithmetics */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cardinality */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cardinality.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_case */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_composition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_composition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_condition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_abstract */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_custom */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_projection */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_view */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_element */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_function */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_group_by */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_name */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_relation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_source */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_string */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_type */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_where */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_where.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_with_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_with_parameters.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/index.js?");
|
|
9732
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./cds_aggregate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_aggregate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_array */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_array.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_object */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_simple */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_arithmetics */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cardinality */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cardinality.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_case */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_composition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_composition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_condition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_abstract */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_custom */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_projection */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_view */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_element */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_function */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_group_by */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_integer */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_name */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_relation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_source */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_string */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_type */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_where */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_where.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_with_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_with_parameters.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/cds/expressions/index.js?");
|
|
9722
9733
|
|
|
9723
9734
|
/***/ }),
|
|
9724
9735
|
|
|
@@ -11522,7 +11533,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11522
11533
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11523
11534
|
|
|
11524
11535
|
"use strict";
|
|
11525
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.87\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
|
|
11536
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.92\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
|
|
11526
11537
|
|
|
11527
11538
|
/***/ }),
|
|
11528
11539
|
|
|
@@ -15449,7 +15460,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
15449
15460
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15450
15461
|
|
|
15451
15462
|
"use strict";
|
|
15452
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassImplementationTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst
|
|
15463
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassImplementationTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass ClassImplementationTranspiler {\r\n transpile(node, traversal) {\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n ret.appendChunk(traversal.traverse(c));\r\n if (c instanceof abaplint.Nodes.StatementNode\r\n && c.get() instanceof abaplint.Statements.ClassImplementation\r\n && this.hasConstructor(node) === false) {\r\n ret.appendString(this.buildConstructor(c, traversal));\r\n }\r\n }\r\n ret.appendString(this.buildStatic(node.findFirstExpression(abaplint.Expressions.ClassName), traversal));\r\n ret.appendString(this.buildTypes(node.findFirstExpression(abaplint.Expressions.ClassName), traversal));\r\n return ret;\r\n }\r\n ///////////////////////////////\r\n hasConstructor(node) {\r\n var _a;\r\n for (const m of node.findAllStatements(abaplint.Statements.MethodImplementation)) {\r\n const name = (_a = m.findFirstExpression(abaplint.Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n if ((name === null || name === void 0 ? void 0 : name.toUpperCase()) === \"CONSTRUCTOR\") {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n /** Finds static attributes + constants including those from interfaces (from superclass is ingored) */\r\n findStaticAttributes(cdef, scope) {\r\n const ret = [];\r\n ret.push(...cdef.getAttributes().getStatic().map(a => { return { identifier: a, prefix: \"\" }; }));\r\n ret.push(...cdef.getAttributes().getConstants().map(a => { return { identifier: a, prefix: \"\" }; }));\r\n const implementing = [...cdef.getImplementing()];\r\n while (implementing.length > 0) {\r\n const i = implementing.shift();\r\n if (i === undefined) {\r\n break;\r\n }\r\n const intf = scope.findInterfaceDefinition(i.name);\r\n if (intf === undefined) {\r\n continue;\r\n }\r\n // todo, constants from interface?\r\n implementing.push(...intf.getImplementing());\r\n ret.push(...intf.getAttributes().getStatic().map(a => { return { identifier: a, prefix: intf.getName().toLowerCase() + \"$\" }; }));\r\n ret.push(...intf.getAttributes().getConstants().map(a => { return { identifier: a, prefix: intf.getName().toLowerCase() + \"$\" }; }));\r\n }\r\n return ret;\r\n }\r\n buildTypes(node, traversal) {\r\n if (node === undefined) {\r\n return \"\";\r\n }\r\n const cdef = traversal.getClassDefinition(node.getFirstToken());\r\n if (cdef === undefined) {\r\n return \"ERROR_CDEF_NOT_FOUND\";\r\n }\r\n const prefix = traversal_1.Traversal.escapeClassName(cdef.getName().toLowerCase()) + \".\";\r\n let ret = \"\";\r\n for (const ty of cdef.getTypeDefinitions().getAll()) {\r\n ret += new transpile_types_1.TranspileTypes().declareStaticSkipVoid(prefix, ty.type);\r\n }\r\n return ret;\r\n }\r\n /** this builds the part after the class, containing the static variables/constants */\r\n buildStatic(node, traversal) {\r\n if (node === undefined) {\r\n return \"\";\r\n }\r\n const cdef = traversal.getClassDefinition(node.getFirstToken());\r\n if (cdef === undefined) {\r\n return \"ERROR_CDEF_NOT_FOUND\";\r\n }\r\n const scope = traversal.findCurrentScopeByToken(node.getFirstToken());\r\n if (scope === undefined) {\r\n return \"ERROR_SCOPE_NOT_FOUND\";\r\n }\r\n let ret = \"\";\r\n const clasName = node.getFirstToken().getStr().toLowerCase();\r\n const staticAttributes = this.findStaticAttributes(cdef, scope);\r\n for (const attr of staticAttributes) {\r\n const name = traversal_1.Traversal.escapeClassName(clasName) + \".\" + attr.prefix + attr.identifier.getName().toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(attr.identifier.getType()) + \";\\n\";\r\n ret += traversal.setValues(attr.identifier, name);\r\n }\r\n for (const alias of cdef.getAliases().getAll()) {\r\n const isStatic = staticAttributes.some(s => s.prefix.replace(\"$\", \"~\") + s.identifier.getName() === alias.getComponent());\r\n if (isStatic === false) {\r\n continue;\r\n }\r\n ret += clasName + \".\" + alias.getName().toLowerCase() + \" = \" + clasName + \".\" + alias.getComponent().replace(\"~\", \"$\") + \";\\n\";\r\n }\r\n // this is not correct, ABAP does not invocate the class constructor at require time,\r\n // but this will probably work\r\n if (cdef.getMethodDefinitions().getByName(\"class_constructor\")) {\r\n ret += \"await \" + traversal_1.Traversal.escapeClassName(node.getFirstToken().getStr().toLowerCase()) + \".class_constructor();\\n\";\r\n }\r\n return ret;\r\n }\r\n buildConstructor(node, traversal) {\r\n var _a;\r\n const scope = traversal.findCurrentScopeByToken(node.getFirstToken());\r\n const token = (_a = node.findFirstExpression(abaplint.Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (token === undefined) {\r\n throw \"buildConstructorTokenNotFound\";\r\n }\r\n const cdef = traversal.getClassDefinition(token);\r\n if (cdef === undefined) {\r\n throw \"buildConstructorCDEFNotFound\";\r\n }\r\n const ret = traversal.buildConstructorContents(scope, cdef);\r\n if (ret === \"\") {\r\n return ret;\r\n }\r\n return \"async constructor_(INPUT) {\\n\" + ret + \"return this;\\n}\\n\";\r\n }\r\n}\r\nexports.ClassImplementationTranspiler = ClassImplementationTranspiler;\r\n//# sourceMappingURL=class_implementation.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/structures/class_implementation.js?");
|
|
15453
15464
|
|
|
15454
15465
|
/***/ }),
|
|
15455
15466
|
|
|
@@ -15526,7 +15537,7 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
|
|
|
15526
15537
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15527
15538
|
|
|
15528
15539
|
"use strict";
|
|
15529
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InterfaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass InterfaceTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n let ret = \"\";\r\n let name;\r\n const def = traversal.getInterfaceDefinition(node.getFirstToken());\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.Interface) {\r\n name = (_a = c.findDirectExpression(abaplint.Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toLowerCase();\r\n name = traversal_1.Traversal.escapeClassName(name);\r\n ret += `class ${name} {\\n`;\r\n ret += `static INTERNAL_TYPE = 'INTF';\\n`;\r\n ret += `static IMPLEMENTED_INTERFACES = [${def === null || def === void 0 ? void 0 : def.getImplementing().map(e => `\"` + e.name.toUpperCase() + `\"`).join(\",\")}];\\n`;\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.EndInterface) {\r\n ret += \"}\\n\";\r\n ret += traversal.registerClassOrInterface(def);\r\n }\r\n }\r\n ret += this.buildConstants(node.findFirstExpression(abaplint.Expressions.InterfaceName), traversal);\r\n ret += this.buildTypes(def);\r\n return new chunk_1.Chunk(ret);\r\n }\r\n buildTypes(idef) {\r\n if (idef === undefined) {\r\n return \"\";\r\n }\r\n const prefix = traversal_1.Traversal.escapeClassName(idef.getName().toLowerCase()) + \".\";\r\n let ret = \"\";\r\n for (const ty of idef.getTypeDefinitions().getAll()) {\r\n ret += new transpile_types_1.TranspileTypes().declareStaticSkipVoid(prefix, ty.type);\r\n }\r\n return ret;\r\n }\r\n buildConstants(node, traversal) {\r\n if (node === undefined) {\r\n return \"\";\r\n }\r\n const scope = traversal.findCurrentScopeByToken(node.getFirstToken());\r\n const vars = scope === null || scope === void 0 ? void 0 : scope.getData().vars;\r\n if (vars === undefined || Object.keys(vars).length === 0) {\r\n return \"\";\r\n }\r\n let ret = \"\\n\";\r\n for (const n in vars) {\r\n const identifier = vars[n];\r\n if (identifier.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === false\r\n || identifier.getMeta().includes(\"read_only\" /* abaplint.IdentifierMeta.ReadOnly */) === false) {\r\n continue;\r\n }\r\n const interfaceName = traversal_1.Traversal.escapeClassName(node.getFirstToken().getStr().toLowerCase());\r\n const name = interfaceName + \".\" + interfaceName + \"$\" + n.toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(identifier.getType()) + \";\\n\";\r\n const constantStatement = traversal.findStatementInFile(identifier.getStart());\r\n const valExpression = constantStatement === null || constantStatement === void 0 ? void 0 : constantStatement.findFirstExpression(abaplint.Expressions.Value);\r\n if ((valExpression === null || valExpression === void 0 ? void 0 : valExpression.getChildren()[1].get()) instanceof abaplint.Expressions.SimpleFieldChain) {\r\n const s = new expressions_1.FieldChainTranspiler().transpile(valExpression.getChildren()[1], traversal, false).getCode();\r\n const e = new expressions_1.ConstantTranspiler().escape(s);\r\n ret += name + \".set(\" + e + \");\\n\";\r\n continue;\r\n }\r\n
|
|
15540
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InterfaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass InterfaceTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n let ret = \"\";\r\n let name;\r\n const def = traversal.getInterfaceDefinition(node.getFirstToken());\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.Interface) {\r\n name = (_a = c.findDirectExpression(abaplint.Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toLowerCase();\r\n name = traversal_1.Traversal.escapeClassName(name);\r\n ret += `class ${name} {\\n`;\r\n ret += `static INTERNAL_TYPE = 'INTF';\\n`;\r\n ret += `static IMPLEMENTED_INTERFACES = [${def === null || def === void 0 ? void 0 : def.getImplementing().map(e => `\"` + e.name.toUpperCase() + `\"`).join(\",\")}];\\n`;\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.EndInterface) {\r\n ret += \"}\\n\";\r\n ret += traversal.registerClassOrInterface(def);\r\n }\r\n }\r\n ret += this.buildConstants(node.findFirstExpression(abaplint.Expressions.InterfaceName), traversal);\r\n ret += this.buildTypes(def);\r\n return new chunk_1.Chunk(ret);\r\n }\r\n buildTypes(idef) {\r\n if (idef === undefined) {\r\n return \"\";\r\n }\r\n const prefix = traversal_1.Traversal.escapeClassName(idef.getName().toLowerCase()) + \".\";\r\n let ret = \"\";\r\n for (const ty of idef.getTypeDefinitions().getAll()) {\r\n ret += new transpile_types_1.TranspileTypes().declareStaticSkipVoid(prefix, ty.type);\r\n }\r\n return ret;\r\n }\r\n buildConstants(node, traversal) {\r\n if (node === undefined) {\r\n return \"\";\r\n }\r\n const scope = traversal.findCurrentScopeByToken(node.getFirstToken());\r\n const vars = scope === null || scope === void 0 ? void 0 : scope.getData().vars;\r\n if (vars === undefined || Object.keys(vars).length === 0) {\r\n return \"\";\r\n }\r\n let ret = \"\\n\";\r\n for (const n in vars) {\r\n const identifier = vars[n];\r\n if (identifier.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === false\r\n || identifier.getMeta().includes(\"read_only\" /* abaplint.IdentifierMeta.ReadOnly */) === false) {\r\n continue;\r\n }\r\n const interfaceName = traversal_1.Traversal.escapeClassName(node.getFirstToken().getStr().toLowerCase());\r\n const name = interfaceName + \".\" + interfaceName + \"$\" + n.toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(identifier.getType()) + \";\\n\";\r\n const constantStatement = traversal.findStatementInFile(identifier.getStart());\r\n const valExpression = constantStatement === null || constantStatement === void 0 ? void 0 : constantStatement.findFirstExpression(abaplint.Expressions.Value);\r\n if ((valExpression === null || valExpression === void 0 ? void 0 : valExpression.getChildren()[1].get()) instanceof abaplint.Expressions.SimpleFieldChain) {\r\n const s = new expressions_1.FieldChainTranspiler().transpile(valExpression.getChildren()[1], traversal, false).getCode();\r\n const e = new expressions_1.ConstantTranspiler().escape(s);\r\n ret += name + \".set(\" + e + \");\\n\";\r\n continue;\r\n }\r\n ret += traversal.setValues(identifier, name);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.InterfaceTranspiler = InterfaceTranspiler;\r\n//# sourceMappingURL=interface.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/structures/interface.js?");
|
|
15530
15541
|
|
|
15531
15542
|
/***/ }),
|
|
15532
15543
|
|
|
@@ -15603,7 +15614,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
15603
15614
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15604
15615
|
|
|
15605
15616
|
"use strict";
|
|
15606
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Traversal = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst StatementTranspilers = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/transpiler/build/src/statements/index.js\");\r\nconst ExpressionTranspilers = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst StructureTranspilers = __webpack_require__(/*! ./structures */ \"./node_modules/@abaplint/transpiler/build/src/structures/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ./transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst chunk_1 = __webpack_require__(/*! ./chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass Traversal {\r\n constructor(spaghetti, file, obj, reg, runtimeTypeError = false) {\r\n this.scopeCache = undefined;\r\n this.spaghetti = spaghetti;\r\n this.file = file;\r\n this.obj = obj;\r\n this.reg = reg;\r\n this.runtimeTypeError = runtimeTypeError;\r\n }\r\n static escapeClassName(name) {\r\n return name === null || name === void 0 ? void 0 : name.replace(/\\//g, \"$\");\r\n }\r\n getCurrentObject() {\r\n return this.obj;\r\n }\r\n traverse(node) {\r\n if (node instanceof abaplint.Nodes.StructureNode) {\r\n return this.traverseStructure(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.StatementNode) {\r\n return this.traverseStatement(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.ExpressionNode) {\r\n return this.traverseExpression(node);\r\n }\r\n else if (node === undefined) {\r\n throw new Error(\"Traverse, node undefined\");\r\n }\r\n else {\r\n throw new Error(\"Traverse, unexpected node type\");\r\n }\r\n }\r\n getFilename() {\r\n return this.file.getFilename();\r\n }\r\n getFile() {\r\n return this.file;\r\n }\r\n getSpaghetti() {\r\n return this.spaghetti;\r\n }\r\n /** finds a statement in the _current_ file given a position */\r\n findStatementInFile(pos) {\r\n for (const s of this.file.getStatements()) {\r\n if (pos.isBetween(s.getStart(), s.getEnd())) {\r\n return s;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findCurrentScopeByToken(token) {\r\n const filename = this.file.getFilename();\r\n if (this.scopeCache\r\n && this.scopeCache.filename === filename\r\n && token.getEnd().isBetween(this.scopeCache.cov.start, this.scopeCache.cov.end)) {\r\n return this.scopeCache.node;\r\n }\r\n const node = this.spaghetti.lookupPosition(token.getStart(), filename);\r\n // note: cache only works for leafs, as parent nodes cover multiple leaves\r\n if (node && node.getChildren().length === 0) {\r\n this.scopeCache = {\r\n cov: node.calcCoverage(),\r\n filename: filename,\r\n node: node,\r\n };\r\n }\r\n else {\r\n this.scopeCache = undefined;\r\n }\r\n return node;\r\n }\r\n getInterfaceDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.Interface) {\r\n return scope.findInterfaceDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n getClassDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.ClassImplementation\r\n || scope.getIdentifier().stype === abaplint.ScopeType.ClassDefinition) {\r\n return scope.findClassDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n isClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isClassAttribute, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n if (name.toLowerCase() === \"me\") {\r\n return true;\r\n }\r\n const found = scope.findScopeForVariable(name);\r\n if (found && (found.stype === abaplint.ScopeType.MethodInstance\r\n || found.stype === abaplint.ScopeType.ClassImplementation)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n prefixAndName(t, filename) {\r\n let name = t.getStr().toLowerCase();\r\n if (filename && this.getCurrentObject().getABAPFileByName(filename) === undefined) {\r\n // the prefix is from a different object\r\n const file = this.reg.getFileByName(filename);\r\n if (file) {\r\n const found = this.reg.findObjectForFile(file);\r\n if (found) {\r\n if (found instanceof abaplint.Objects.Interface) {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + found.getName().toLowerCase() + \"$\" + name;\r\n }\r\n else {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + name;\r\n }\r\n }\r\n }\r\n }\r\n const className = this.isStaticClassAttribute(t);\r\n if (className) {\r\n name = Traversal.escapeClassName(className) + \".\" + name;\r\n }\r\n else if (name === \"super\") {\r\n return name;\r\n }\r\n else if (this.isClassAttribute(t)) {\r\n name = \"this.\" + Traversal.escapeClassName(name);\r\n }\r\n else if (this.isBuiltinVariable(t)) {\r\n name = \"abap.builtin.\" + name;\r\n }\r\n return name;\r\n }\r\n isStaticClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(`isStaticClassAttribute, unable to lookup position, ${token.getStr()},${token.getRow()},${token.getCol()},` +\r\n this.file.getFilename());\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n const id = scope.findVariable(name);\r\n if (found && id\r\n && id.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */)\r\n && found.stype === abaplint.ScopeType.ClassImplementation) {\r\n // console.dir(found.sname);\r\n return found.sname.toLowerCase();\r\n }\r\n return undefined;\r\n }\r\n isBuiltinMethod(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return false;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n findMethodReference(token, scope) {\r\n var _a, _b;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodReference\r\n && r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n let name = r.resolved.getName();\r\n if (((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooType) === \"INTF\") {\r\n name = r.extra.ooName + \"$\" + name;\r\n }\r\n return { def: r.resolved, name };\r\n }\r\n else if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n const def = r.resolved;\r\n const name = def.getName();\r\n return { def, name };\r\n }\r\n }\r\n return undefined;\r\n }\r\n isBuiltinVariable(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isBuiltin, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n if (found && found.stype === abaplint.ScopeType.BuiltIn) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // returns the interface name if interfaced\r\n isInterfaceAttribute(token) {\r\n const ref = this.findReadOrWriteReference(token);\r\n if (ref === undefined) {\r\n return undefined;\r\n }\r\n // local classes\r\n if (ref.getFilename() === this.getFilename()) {\r\n const scope = this.findCurrentScopeByToken(ref.getToken());\r\n if ((scope === null || scope === void 0 ? void 0 : scope.getIdentifier().stype) === abaplint.ScopeType.Interface) {\r\n return scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname;\r\n }\r\n }\r\n // global classes\r\n const file = this.reg.getFileByName(ref.getFilename());\r\n if (file) {\r\n const obj = this.reg.findObjectForFile(file);\r\n if ((obj === null || obj === void 0 ? void 0 : obj.getType()) === \"INTF\") {\r\n return obj.getName().toLowerCase();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findReadOrWriteReference(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if ((r.referenceType === abaplint.ReferenceType.DataReadReference\r\n || r.referenceType === abaplint.ReferenceType.DataWriteReference)\r\n && r.position.getStart().equals(token.getStart())) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildConstructorContents(scope, def) {\r\n let ret = \"\";\r\n if (def.getSuperClass() !== undefined\r\n && def.getMethodDefinitions().getByName(\"CONSTRUCTOR\") === undefined) {\r\n ret += `await super.constructor_(INPUT);\\n`;\r\n }\r\n const cName = Traversal.escapeClassName(def.getName().toLowerCase());\r\n ret += \"this.me = new abap.types.ABAPObject();\\n\";\r\n ret += \"this.me.set(this);\\n\";\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const name = a.getName().toLowerCase();\r\n ret += \"this.\" + name + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n }\r\n // attributes from directly implemented interfaces(not interfaces implemented in super classes)\r\n for (const i of def.getImplementing()) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n // handle aliases after initialization of carrier variables\r\n for (const a of def.getAliases().getAll()) {\r\n ret += \"this.\" + a.getName().toLowerCase() + \" = this.\" + Traversal.escapeClassName(a.getComponent().replace(\"~\", \"$\").toLowerCase()) + \";\\n\";\r\n }\r\n // constants can be accessed both statically and via reference\r\n for (const c of def.getAttributes().getConstants()) {\r\n ret += \"this.\" + c.getName().toLowerCase() + \" = \" + cName + \".\" + c.getName().toLowerCase() + \";\\n\";\r\n }\r\n return ret;\r\n }\r\n findInterfaceDefinition(name, scope) {\r\n let intf = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n if (intf === undefined) {\r\n const iglobal = this.reg.getObject(\"INTF\", name);\r\n intf = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return intf;\r\n }\r\n findTable(name) {\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n return tabl;\r\n }\r\n findClassDefinition(name, scope) {\r\n let clas = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (clas === undefined) {\r\n const iglobal = this.reg.getObject(\"CLAS\", name);\r\n clas = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return clas;\r\n }\r\n dataFromInterfaces(name, scope) {\r\n let ret = \"\";\r\n const intf = this.findInterfaceDefinition(name, scope);\r\n for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getAll()) || []) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const n = Traversal.escapeClassName(name.toLowerCase()) + \"$\" + a.getName().toLowerCase();\r\n ret += \"this.\" + n + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n }\r\n for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n return ret;\r\n }\r\n determineType(node, scope) {\r\n var _a, _b, _c;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n const found = node.findDirectExpression(abaplint.Expressions.Target);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n let context = undefined;\r\n for (const c of found.getChildren()) {\r\n if (context === undefined) {\r\n context = (_a = scope.findVariable(c.getFirstToken().getStr())) === null || _a === void 0 ? void 0 : _a.getType();\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.ComponentName\r\n && context instanceof abaplint.BasicTypes.StructureType) {\r\n context = context.getComponentByName(c.getFirstToken().getStr());\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.AttributeName\r\n && context instanceof abaplint.BasicTypes.ObjectReferenceType) {\r\n const id = context.getIdentifier();\r\n if (id instanceof abaplint.Types.ClassDefinition || id instanceof abaplint.Types.InterfaceDefinition) {\r\n const concat = c.concatTokens();\r\n if (concat.includes(\"~\")) {\r\n const [iname, aname] = concat.split(\"~\");\r\n const intf = this.findInterfaceDefinition(iname, scope);\r\n context = (_b = intf === null || intf === void 0 ? void 0 : intf.getAttributes().findByName(aname)) === null || _b === void 0 ? void 0 : _b.getType();\r\n }\r\n else {\r\n context = (_c = id.getAttributes().findByName(concat)) === null || _c === void 0 ? void 0 : _c.getType();\r\n }\r\n }\r\n }\r\n }\r\n return context;\r\n }\r\n isInsideLoop(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.Loop\r\n || get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.SelectLoop\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndLoop\r\n || get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndSelect\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n isInsideDoOrWhile(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n registerClassOrInterface(def) {\r\n if (def === undefined) {\r\n return \"\";\r\n }\r\n const name = def.getName();\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n else {\r\n return `abap.Classes['${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n }\r\n lookupClassOrInterface(name, token, directGlobal = false) {\r\n var _a, _b;\r\n if (name === undefined || token === undefined) {\r\n return \"abap.Classes['undefined']\";\r\n }\r\n if (directGlobal === true) {\r\n return \"abap.Classes[\" + name + \"]\";\r\n }\r\n const scope = this.findCurrentScopeByToken(token);\r\n // todo, add explicit type,\r\n let def = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (def === undefined) {\r\n def = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n }\r\n if (def) {\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}']`;\r\n }\r\n else {\r\n return `abap.Classes['${(_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()}']`;\r\n }\r\n }\r\n else {\r\n // assume global\r\n return \"abap.Classes['\" + name.toUpperCase() + \"']\";\r\n }\r\n }\r\n buildPrefix(def) {\r\n const file = this.reg.getFileByName(def.getFilename());\r\n if (file === undefined) {\r\n return \"NOT_FOUND\";\r\n }\r\n const obj = this.reg.findObjectForFile(file);\r\n return (obj === null || obj === void 0 ? void 0 : obj.getType()) + \"-\" + (obj === null || obj === void 0 ? void 0 : obj.getName());\r\n }\r\n ////////////////////////////\r\n traverseStructure(node) {\r\n const list = StructureTranspilers;\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StructureNode) {\r\n const search = c.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n ret.appendChunk(transpiler.transpile(c, this));\r\n continue;\r\n }\r\n ret.appendChunk(this.traverseStructure(c));\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode) {\r\n ret.appendChunk(this.traverseStatement(c));\r\n }\r\n else {\r\n throw new Error(\"traverseStructure, unexpected child node type\");\r\n }\r\n }\r\n return ret;\r\n }\r\n traverseStatement(node) {\r\n const list = StatementTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n const chunk = transpiler.transpile(node, this);\r\n chunk.appendString(\"\\n\");\r\n return chunk;\r\n }\r\n throw new Error(`Statement ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n traverseExpression(node) {\r\n const list = ExpressionTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n return transpiler.transpile(node, this);\r\n }\r\n throw new Error(`Expression ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n}\r\nexports.Traversal = Traversal;\r\n//# sourceMappingURL=traversal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?");
|
|
15617
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Traversal = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst StatementTranspilers = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/transpiler/build/src/statements/index.js\");\r\nconst ExpressionTranspilers = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst StructureTranspilers = __webpack_require__(/*! ./structures */ \"./node_modules/@abaplint/transpiler/build/src/structures/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ./transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst chunk_1 = __webpack_require__(/*! ./chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nclass Traversal {\r\n constructor(spaghetti, file, obj, reg, runtimeTypeError = false) {\r\n this.scopeCache = undefined;\r\n this.spaghetti = spaghetti;\r\n this.file = file;\r\n this.obj = obj;\r\n this.reg = reg;\r\n this.runtimeTypeError = runtimeTypeError;\r\n }\r\n static escapeClassName(name) {\r\n return name === null || name === void 0 ? void 0 : name.replace(/\\//g, \"$\");\r\n }\r\n getCurrentObject() {\r\n return this.obj;\r\n }\r\n traverse(node) {\r\n if (node instanceof abaplint.Nodes.StructureNode) {\r\n return this.traverseStructure(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.StatementNode) {\r\n return this.traverseStatement(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.ExpressionNode) {\r\n return this.traverseExpression(node);\r\n }\r\n else if (node === undefined) {\r\n throw new Error(\"Traverse, node undefined\");\r\n }\r\n else {\r\n throw new Error(\"Traverse, unexpected node type\");\r\n }\r\n }\r\n getFilename() {\r\n return this.file.getFilename();\r\n }\r\n getFile() {\r\n return this.file;\r\n }\r\n getSpaghetti() {\r\n return this.spaghetti;\r\n }\r\n /** finds a statement in the _current_ file given a position */\r\n findStatementInFile(pos) {\r\n for (const s of this.file.getStatements()) {\r\n if (pos.isBetween(s.getStart(), s.getEnd())) {\r\n return s;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findCurrentScopeByToken(token) {\r\n const filename = this.file.getFilename();\r\n if (this.scopeCache\r\n && this.scopeCache.filename === filename\r\n && token.getEnd().isBetween(this.scopeCache.cov.start, this.scopeCache.cov.end)) {\r\n return this.scopeCache.node;\r\n }\r\n const node = this.spaghetti.lookupPosition(token.getStart(), filename);\r\n // note: cache only works for leafs, as parent nodes cover multiple leaves\r\n if (node && node.getChildren().length === 0) {\r\n this.scopeCache = {\r\n cov: node.calcCoverage(),\r\n filename: filename,\r\n node: node,\r\n };\r\n }\r\n else {\r\n this.scopeCache = undefined;\r\n }\r\n return node;\r\n }\r\n getInterfaceDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.Interface) {\r\n return scope.findInterfaceDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n getClassDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.ClassImplementation\r\n || scope.getIdentifier().stype === abaplint.ScopeType.ClassDefinition) {\r\n return scope.findClassDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n isClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isClassAttribute, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n if (name.toLowerCase() === \"me\") {\r\n return true;\r\n }\r\n const found = scope.findScopeForVariable(name);\r\n if (found && (found.stype === abaplint.ScopeType.MethodInstance\r\n || found.stype === abaplint.ScopeType.ClassImplementation)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n prefixAndName(t, filename) {\r\n let name = t.getStr().toLowerCase();\r\n if (filename && this.getCurrentObject().getABAPFileByName(filename) === undefined) {\r\n // the prefix is from a different object\r\n const file = this.reg.getFileByName(filename);\r\n if (file) {\r\n const found = this.reg.findObjectForFile(file);\r\n if (found) {\r\n if (found instanceof abaplint.Objects.Interface) {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + found.getName().toLowerCase() + \"$\" + name;\r\n }\r\n else {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + name;\r\n }\r\n }\r\n }\r\n }\r\n const className = this.isStaticClassAttribute(t);\r\n if (className) {\r\n name = Traversal.escapeClassName(className) + \".\" + name;\r\n }\r\n else if (name === \"super\") {\r\n return name;\r\n }\r\n else if (this.isClassAttribute(t)) {\r\n name = \"this.\" + Traversal.escapeClassName(name);\r\n }\r\n else if (this.isBuiltinVariable(t)) {\r\n name = \"abap.builtin.\" + name;\r\n }\r\n return name;\r\n }\r\n isStaticClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(`isStaticClassAttribute, unable to lookup position, ${token.getStr()},${token.getRow()},${token.getCol()},` +\r\n this.file.getFilename());\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n const id = scope.findVariable(name);\r\n if (found && id\r\n && id.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */)\r\n && found.stype === abaplint.ScopeType.ClassImplementation) {\r\n // console.dir(found.sname);\r\n return found.sname.toLowerCase();\r\n }\r\n return undefined;\r\n }\r\n isBuiltinMethod(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return false;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n findMethodReference(token, scope) {\r\n var _a, _b;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodReference\r\n && r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n let name = r.resolved.getName();\r\n if (((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooType) === \"INTF\") {\r\n name = r.extra.ooName + \"$\" + name;\r\n }\r\n return { def: r.resolved, name };\r\n }\r\n else if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n const def = r.resolved;\r\n const name = def.getName();\r\n return { def, name };\r\n }\r\n }\r\n return undefined;\r\n }\r\n isBuiltinVariable(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isBuiltin, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n if (found && found.stype === abaplint.ScopeType.BuiltIn) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // returns the interface name if interfaced\r\n isInterfaceAttribute(token) {\r\n const ref = this.findReadOrWriteReference(token);\r\n if (ref === undefined) {\r\n return undefined;\r\n }\r\n // local classes\r\n if (ref.getFilename() === this.getFilename()) {\r\n const scope = this.findCurrentScopeByToken(ref.getToken());\r\n if ((scope === null || scope === void 0 ? void 0 : scope.getIdentifier().stype) === abaplint.ScopeType.Interface) {\r\n return scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname;\r\n }\r\n }\r\n // global classes\r\n const file = this.reg.getFileByName(ref.getFilename());\r\n if (file) {\r\n const obj = this.reg.findObjectForFile(file);\r\n if ((obj === null || obj === void 0 ? void 0 : obj.getType()) === \"INTF\") {\r\n return obj.getName().toLowerCase();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findReadOrWriteReference(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if ((r.referenceType === abaplint.ReferenceType.DataReadReference\r\n || r.referenceType === abaplint.ReferenceType.DataWriteReference)\r\n && r.position.getStart().equals(token.getStart())) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildConstructorContents(scope, def) {\r\n let ret = \"\";\r\n if (def.getSuperClass() !== undefined\r\n && def.getMethodDefinitions().getByName(\"CONSTRUCTOR\") === undefined) {\r\n ret += `await super.constructor_(INPUT);\\n`;\r\n }\r\n const cName = Traversal.escapeClassName(def.getName().toLowerCase());\r\n ret += \"this.me = new abap.types.ABAPObject();\\n\";\r\n ret += \"this.me.set(this);\\n\";\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const name = \"this.\" + a.getName().toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n ret += this.setValues(a, name);\r\n }\r\n // attributes from directly implemented interfaces(not interfaces implemented in super classes)\r\n for (const i of def.getImplementing()) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n // handle aliases after initialization of carrier variables\r\n for (const a of def.getAliases().getAll()) {\r\n ret += \"this.\" + a.getName().toLowerCase() + \" = this.\" + Traversal.escapeClassName(a.getComponent().replace(\"~\", \"$\").toLowerCase()) + \";\\n\";\r\n }\r\n // constants can be accessed both statically and via reference\r\n for (const c of def.getAttributes().getConstants()) {\r\n ret += \"this.\" + c.getName().toLowerCase() + \" = \" + cName + \".\" + c.getName().toLowerCase() + \";\\n\";\r\n }\r\n return ret;\r\n }\r\n findInterfaceDefinition(name, scope) {\r\n let intf = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n if (intf === undefined) {\r\n const iglobal = this.reg.getObject(\"INTF\", name);\r\n intf = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return intf;\r\n }\r\n findTable(name) {\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n return tabl;\r\n }\r\n findClassDefinition(name, scope) {\r\n let clas = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (clas === undefined) {\r\n const iglobal = this.reg.getObject(\"CLAS\", name);\r\n clas = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return clas;\r\n }\r\n dataFromInterfaces(name, scope) {\r\n let ret = \"\";\r\n const intf = this.findInterfaceDefinition(name, scope);\r\n for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getAll()) || []) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const n = Traversal.escapeClassName(name.toLowerCase()) + \"$\" + a.getName().toLowerCase();\r\n ret += \"this.\" + n + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n }\r\n for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n return ret;\r\n }\r\n determineType(node, scope) {\r\n var _a, _b, _c;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n const found = node.findDirectExpression(abaplint.Expressions.Target);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n let context = undefined;\r\n for (const c of found.getChildren()) {\r\n if (context === undefined) {\r\n context = (_a = scope.findVariable(c.getFirstToken().getStr())) === null || _a === void 0 ? void 0 : _a.getType();\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.ComponentName\r\n && context instanceof abaplint.BasicTypes.StructureType) {\r\n context = context.getComponentByName(c.getFirstToken().getStr());\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.AttributeName\r\n && context instanceof abaplint.BasicTypes.ObjectReferenceType) {\r\n const id = context.getIdentifier();\r\n if (id instanceof abaplint.Types.ClassDefinition || id instanceof abaplint.Types.InterfaceDefinition) {\r\n const concat = c.concatTokens();\r\n if (concat.includes(\"~\")) {\r\n const [iname, aname] = concat.split(\"~\");\r\n const intf = this.findInterfaceDefinition(iname, scope);\r\n context = (_b = intf === null || intf === void 0 ? void 0 : intf.getAttributes().findByName(aname)) === null || _b === void 0 ? void 0 : _b.getType();\r\n }\r\n else {\r\n context = (_c = id.getAttributes().findByName(concat)) === null || _c === void 0 ? void 0 : _c.getType();\r\n }\r\n }\r\n }\r\n }\r\n return context;\r\n }\r\n isInsideLoop(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.Loop\r\n || get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.SelectLoop\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndLoop\r\n || get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndSelect\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n isInsideDoOrWhile(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n registerClassOrInterface(def) {\r\n if (def === undefined) {\r\n return \"\";\r\n }\r\n const name = def.getName();\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n else {\r\n return `abap.Classes['${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n }\r\n setValues(identifier, name) {\r\n const val = identifier.getValue();\r\n let ret = \"\";\r\n if (typeof val === \"string\") {\r\n const e = new expressions_1.ConstantTranspiler().escape(val);\r\n ret += name + \".set(\" + e + \");\\n\";\r\n }\r\n else if (typeof val === \"object\") {\r\n const a = val;\r\n for (const v of Object.keys(val)) {\r\n const s = a[v];\r\n if (s === undefined) {\r\n continue;\r\n }\r\n ret += name + \".get().\" + v + \".set(\" + s + \");\\n\";\r\n }\r\n }\r\n return ret;\r\n }\r\n lookupClassOrInterface(name, token, directGlobal = false) {\r\n var _a, _b;\r\n if (name === undefined || token === undefined) {\r\n return \"abap.Classes['undefined']\";\r\n }\r\n if (directGlobal === true) {\r\n return \"abap.Classes[\" + name + \"]\";\r\n }\r\n const scope = this.findCurrentScopeByToken(token);\r\n // todo, add explicit type,\r\n let def = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (def === undefined) {\r\n def = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n }\r\n if (def) {\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}']`;\r\n }\r\n else {\r\n return `abap.Classes['${(_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()}']`;\r\n }\r\n }\r\n else {\r\n // assume global\r\n return \"abap.Classes['\" + name.toUpperCase() + \"']\";\r\n }\r\n }\r\n buildPrefix(def) {\r\n const file = this.reg.getFileByName(def.getFilename());\r\n if (file === undefined) {\r\n return \"NOT_FOUND\";\r\n }\r\n const obj = this.reg.findObjectForFile(file);\r\n return (obj === null || obj === void 0 ? void 0 : obj.getType()) + \"-\" + (obj === null || obj === void 0 ? void 0 : obj.getName());\r\n }\r\n ////////////////////////////\r\n traverseStructure(node) {\r\n const list = StructureTranspilers;\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StructureNode) {\r\n const search = c.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n ret.appendChunk(transpiler.transpile(c, this));\r\n continue;\r\n }\r\n ret.appendChunk(this.traverseStructure(c));\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode) {\r\n ret.appendChunk(this.traverseStatement(c));\r\n }\r\n else {\r\n throw new Error(\"traverseStructure, unexpected child node type\");\r\n }\r\n }\r\n return ret;\r\n }\r\n traverseStatement(node) {\r\n const list = StatementTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n const chunk = transpiler.transpile(node, this);\r\n chunk.appendString(\"\\n\");\r\n return chunk;\r\n }\r\n throw new Error(`Statement ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n traverseExpression(node) {\r\n const list = ExpressionTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n return transpiler.transpile(node, this);\r\n }\r\n throw new Error(`Expression ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n}\r\nexports.Traversal = Traversal;\r\n//# sourceMappingURL=traversal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?");
|
|
15607
15618
|
|
|
15608
15619
|
/***/ }),
|
|
15609
15620
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.51",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.3.
|
|
28
|
+
"@abaplint/transpiler": "^2.3.51",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
|
-
"@abaplint/core": "^2.93.
|
|
32
|
+
"@abaplint/core": "^2.93.92",
|
|
33
33
|
"progress": "^2.0.3",
|
|
34
34
|
"webpack": "^5.75.0",
|
|
35
35
|
"webpack-cli": "^5.0.0",
|