@abaplint/cli 2.94.2 → 2.94.4
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/cli.js +39 -6
- package/package.json +7 -7
package/build/cli.js
CHANGED
|
@@ -7375,7 +7375,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7375
7375
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7376
7376
|
|
|
7377
7377
|
"use strict";
|
|
7378
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FindGlobalDefinitions = void 0;\r\nconst interface_definition_1 = __webpack_require__(/*! ../../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ../_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst interface_1 = __webpack_require__(/*! ../../../objects/interface */ \"./node_modules/@abaplint/core/build/src/objects/interface.js\");\r\nconst class_1 = __webpack_require__(/*! ../../../objects/class */ \"./node_modules/@abaplint/core/build/src/objects/class.js\");\r\nconst BasicTypes = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\n// todo: rewrite all of this to use a graph based deterministic approach instead\r\n// this makes sure to cache global interface and class definitions in the corresponding object\r\nclass FindGlobalDefinitions {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n run(progress) {\r\n const MAX_PASSES = 10;\r\n let lastPass = Number.MAX_SAFE_INTEGER;\r\n // the setDirty method in the objects clears the definitions\r\n let candidates = [];\r\n for (const o of this.reg.getObjects()) {\r\n if ((o instanceof interface_1.Interface || o instanceof class_1.Class) && o.getDefinition() === undefined) {\r\n candidates.push(o);\r\n }\r\n else if (o instanceof objects_1.DataElement\r\n || o instanceof objects_1.View\r\n || o instanceof objects_1.TableType\r\n || o instanceof objects_1.Table) {\r\n o.parseType(this.reg); // make sure the references are set after parsing finishes\r\n }\r\n }\r\n // make sure the sequence is always the same, disregarding the sequence they were added to the registry\r\n // this will hopefully make it easier to debug\r\n candidates.sort((a, b) => { return a.getName().localeCompare(b.getName()); });\r\n for (let i = 1; i <= MAX_PASSES; i++) {\r\n progress === null || progress === void 0 ? void 0 : progress.set(candidates.length, \"Global OO types, pass \" + i);\r\n let thisPass = 0;\r\n const next = [];\r\n for (const o of candidates) {\r\n progress === null || progress === void 0 ? void 0 : progress.tickSync(\"Global OO types(pass \" + i + \"), next pass: \" + next.length);\r\n this.update(o);\r\n const untypedCount = this.countUntyped(o);\r\n if (untypedCount > 0) {\r\n next.push(o);\r\n }\r\n thisPass = thisPass + untypedCount;\r\n }\r\n candidates = next;\r\n if (lastPass === thisPass || thisPass === 0) {\r\n break;\r\n }\r\n lastPass = thisPass;\r\n }\r\n }\r\n /////////////////////////////\r\n countUntyped(obj) {\r\n const def = obj.getDefinition();\r\n if (def === undefined) {\r\n return 1;\r\n }\r\n let count = 0;\r\n for (const t of def.getTypeDefinitions().getAll()) {\r\n count = count + this.count(t.type.getType());\r\n }\r\n for (const a of def.getAttributes().getAll()) {\r\n count = count + this.count(a.getType());\r\n }\r\n for (const a of def.getAttributes().getConstants()) {\r\n count = count + this.count(a.getType());\r\n }\r\n for (const m of def.getMethodDefinitions().getAll()) {\r\n for (const p of m.getParameters().getAll()) {\r\n count = count + this.count(p.getType());\r\n }\r\n }\r\n for (const e of def.getEvents() || []) {\r\n for (const p of e.getParameters()) {\r\n count = count + this.count(p.getType());\r\n }\r\n }\r\n return count;\r\n }\r\n count(type) {\r\n if (type instanceof BasicTypes.UnknownType || type instanceof BasicTypes.VoidType) {\r\n return 1;\r\n }\r\n else if (type instanceof BasicTypes.TableType) {\r\n return this.count(type.getRowType());\r\n }\r\n else if (type instanceof BasicTypes.DataReference) {\r\n return this.count(type.getType());\r\n }\r\n else if (type instanceof BasicTypes.StructureType) {\r\n let count = 0;\r\n for (const c of type.getComponents()) {\r\n count = count + this.count(c.type);\r\n }\r\n return count;\r\n }\r\n return 0;\r\n }\r\n update(obj) {\r\n const file = obj.getMainABAPFile();\r\n const struc = file === null || file === void 0 ? void 0 : file.getStructure();\r\n if (obj instanceof interface_1.Interface) {\r\n const found = struc === null || struc === void 0 ? void 0 : struc.findFirstStructure(Structures.Interface);\r\n if (struc && file && found) {\r\n try {\r\n const def = new interface_definition_1.InterfaceDefinition(found, file.getFilename(), _current_scope_1.CurrentScope.buildDefault(this.reg, obj));\r\n obj.setDefinition(def);\r\n }\r\n catch (_a) {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n const found = struc === null || struc === void 0 ? void 0 : struc.findFirstStructure(Structures.ClassDefinition);\r\n if (struc && file && found) {\r\n try {\r\n const def = new class_definition_1.ClassDefinition(found, file.getFilename(), _current_scope_1.CurrentScope.buildDefault(this.reg, obj));\r\n obj.setDefinition(def);\r\n }\r\n catch (_b) {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n }\r\n}\r\nexports.FindGlobalDefinitions = FindGlobalDefinitions;\r\n//# sourceMappingURL=find_global_definitions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js?");
|
|
7378
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FindGlobalDefinitions = void 0;\r\nconst interface_definition_1 = __webpack_require__(/*! ../../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ../_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst interface_1 = __webpack_require__(/*! ../../../objects/interface */ \"./node_modules/@abaplint/core/build/src/objects/interface.js\");\r\nconst class_1 = __webpack_require__(/*! ../../../objects/class */ \"./node_modules/@abaplint/core/build/src/objects/class.js\");\r\nconst BasicTypes = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\n// todo: rewrite all of this to use a graph based deterministic approach instead\r\n// this makes sure to cache global interface and class definitions in the corresponding object\r\nclass FindGlobalDefinitions {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n run(progress) {\r\n const MAX_PASSES = 10;\r\n let lastPass = Number.MAX_SAFE_INTEGER;\r\n // the setDirty method in the objects clears the definitions\r\n let candidates = [];\r\n for (const o of this.reg.getObjects()) {\r\n if ((o instanceof interface_1.Interface || o instanceof class_1.Class) && o.getDefinition() === undefined) {\r\n candidates.push(o);\r\n }\r\n else if (o instanceof objects_1.DataElement\r\n || o instanceof objects_1.View\r\n || o instanceof objects_1.TableType\r\n || o instanceof objects_1.LockObject\r\n || o instanceof objects_1.Table) {\r\n o.parseType(this.reg); // make sure the references are set after parsing finishes\r\n }\r\n }\r\n // make sure the sequence is always the same, disregarding the sequence they were added to the registry\r\n // this will hopefully make it easier to debug\r\n candidates.sort((a, b) => { return a.getName().localeCompare(b.getName()); });\r\n for (let i = 1; i <= MAX_PASSES; i++) {\r\n progress === null || progress === void 0 ? void 0 : progress.set(candidates.length, \"Global OO types, pass \" + i);\r\n let thisPass = 0;\r\n const next = [];\r\n for (const o of candidates) {\r\n progress === null || progress === void 0 ? void 0 : progress.tickSync(\"Global OO types(pass \" + i + \"), next pass: \" + next.length);\r\n this.update(o);\r\n const untypedCount = this.countUntyped(o);\r\n if (untypedCount > 0) {\r\n next.push(o);\r\n }\r\n thisPass = thisPass + untypedCount;\r\n }\r\n candidates = next;\r\n if (lastPass === thisPass || thisPass === 0) {\r\n break;\r\n }\r\n lastPass = thisPass;\r\n }\r\n }\r\n /////////////////////////////\r\n countUntyped(obj) {\r\n const def = obj.getDefinition();\r\n if (def === undefined) {\r\n return 1;\r\n }\r\n let count = 0;\r\n for (const t of def.getTypeDefinitions().getAll()) {\r\n count = count + this.count(t.type.getType());\r\n }\r\n for (const a of def.getAttributes().getAll()) {\r\n count = count + this.count(a.getType());\r\n }\r\n for (const a of def.getAttributes().getConstants()) {\r\n count = count + this.count(a.getType());\r\n }\r\n for (const m of def.getMethodDefinitions().getAll()) {\r\n for (const p of m.getParameters().getAll()) {\r\n count = count + this.count(p.getType());\r\n }\r\n }\r\n for (const e of def.getEvents() || []) {\r\n for (const p of e.getParameters()) {\r\n count = count + this.count(p.getType());\r\n }\r\n }\r\n return count;\r\n }\r\n count(type) {\r\n if (type instanceof BasicTypes.UnknownType || type instanceof BasicTypes.VoidType) {\r\n return 1;\r\n }\r\n else if (type instanceof BasicTypes.TableType) {\r\n return this.count(type.getRowType());\r\n }\r\n else if (type instanceof BasicTypes.DataReference) {\r\n return this.count(type.getType());\r\n }\r\n else if (type instanceof BasicTypes.StructureType) {\r\n let count = 0;\r\n for (const c of type.getComponents()) {\r\n count = count + this.count(c.type);\r\n }\r\n return count;\r\n }\r\n return 0;\r\n }\r\n update(obj) {\r\n const file = obj.getMainABAPFile();\r\n const struc = file === null || file === void 0 ? void 0 : file.getStructure();\r\n if (obj instanceof interface_1.Interface) {\r\n const found = struc === null || struc === void 0 ? void 0 : struc.findFirstStructure(Structures.Interface);\r\n if (struc && file && found) {\r\n try {\r\n const def = new interface_definition_1.InterfaceDefinition(found, file.getFilename(), _current_scope_1.CurrentScope.buildDefault(this.reg, obj));\r\n obj.setDefinition(def);\r\n }\r\n catch (_a) {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n const found = struc === null || struc === void 0 ? void 0 : struc.findFirstStructure(Structures.ClassDefinition);\r\n if (struc && file && found) {\r\n try {\r\n const def = new class_definition_1.ClassDefinition(found, file.getFilename(), _current_scope_1.CurrentScope.buildDefault(this.reg, obj));\r\n obj.setDefinition(def);\r\n }\r\n catch (_b) {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n else {\r\n obj.setDefinition(undefined);\r\n }\r\n }\r\n }\r\n}\r\nexports.FindGlobalDefinitions = FindGlobalDefinitions;\r\n//# sourceMappingURL=find_global_definitions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js?");
|
|
7379
7379
|
|
|
7380
7380
|
/***/ }),
|
|
7381
7381
|
|
|
@@ -8149,6 +8149,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8149
8149
|
|
|
8150
8150
|
/***/ }),
|
|
8151
8151
|
|
|
8152
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_internal.js":
|
|
8153
|
+
/*!*******************************************************************************************!*\
|
|
8154
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_internal.js ***!
|
|
8155
|
+
\*******************************************************************************************/
|
|
8156
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8157
|
+
|
|
8158
|
+
"use strict";
|
|
8159
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ModifyInternal = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js\");\r\nconst component_cond_1 = __webpack_require__(/*! ../expressions/component_cond */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_cond.js\");\r\nclass ModifyInternal {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Target)) {\r\n new target_1.Target().runSyntax(t, scope, filename);\r\n }\r\n const target = node.findDirectExpression(Expressions.FSTarget);\r\n if (target) {\r\n new fstarget_1.FSTarget().runSyntax(target, scope, filename, undefined);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {\r\n new component_cond_1.ComponentCond().runSyntax(t, scope, filename);\r\n }\r\n }\r\n}\r\nexports.ModifyInternal = ModifyInternal;\r\n//# sourceMappingURL=modify_internal.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_internal.js?");
|
|
8160
|
+
|
|
8161
|
+
/***/ }),
|
|
8162
|
+
|
|
8152
8163
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js":
|
|
8153
8164
|
/*!*****************************************************************************************!*\
|
|
8154
8165
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js ***!
|
|
@@ -8336,6 +8347,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8336
8347
|
|
|
8337
8348
|
/***/ }),
|
|
8338
8349
|
|
|
8350
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/search.js":
|
|
8351
|
+
/*!**********************************************************************************!*\
|
|
8352
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/search.js ***!
|
|
8353
|
+
\**********************************************************************************/
|
|
8354
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8355
|
+
|
|
8356
|
+
"use strict";
|
|
8357
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Search = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nclass Search {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Search = Search;\r\n//# sourceMappingURL=search.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/search.js?");
|
|
8358
|
+
|
|
8359
|
+
/***/ }),
|
|
8360
|
+
|
|
8339
8361
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js":
|
|
8340
8362
|
/*!**********************************************************************************!*\
|
|
8341
8363
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js ***!
|
|
@@ -8567,6 +8589,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8567
8589
|
|
|
8568
8590
|
/***/ }),
|
|
8569
8591
|
|
|
8592
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/translate.js":
|
|
8593
|
+
/*!*************************************************************************************!*\
|
|
8594
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/translate.js ***!
|
|
8595
|
+
\*************************************************************************************/
|
|
8596
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8597
|
+
|
|
8598
|
+
"use strict";
|
|
8599
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Translate = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nclass Translate {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Target)) {\r\n new target_1.Target().runSyntax(t, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Translate = Translate;\r\n//# sourceMappingURL=translate.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/translate.js?");
|
|
8600
|
+
|
|
8601
|
+
/***/ }),
|
|
8602
|
+
|
|
8570
8603
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js":
|
|
8571
8604
|
/*!********************************************************************************************!*\
|
|
8572
8605
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js ***!
|
|
@@ -8772,7 +8805,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8772
8805
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8773
8806
|
|
|
8774
8807
|
"use strict";
|
|
8775
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyntaxLogic = void 0;\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ./_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _procedural_1 = __webpack_require__(/*! ./_procedural */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_procedural.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst data_1 = __webpack_require__(/*! ./structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ./structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst types_1 = __webpack_require__(/*! ./structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst statics_1 = __webpack_require__(/*! ./structures/statics */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/statics.js\");\r\nconst constants_1 = __webpack_require__(/*! ./structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst perform_1 = __webpack_require__(/*! ./statements/perform */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js\");\r\nconst type_1 = __webpack_require__(/*! ./statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nconst constant_1 = __webpack_require__(/*! ./statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst static_1 = __webpack_require__(/*! ./statements/static */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/static.js\");\r\nconst data_2 = __webpack_require__(/*! ./statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst parameter_1 = __webpack_require__(/*! ./statements/parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/parameter.js\");\r\nconst fieldsymbol_1 = __webpack_require__(/*! ./statements/fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js\");\r\nconst tables_1 = __webpack_require__(/*! ./statements/tables */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/tables.js\");\r\nconst selectoption_1 = __webpack_require__(/*! ./statements/selectoption */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selectoption.js\");\r\nconst interface_deferred_1 = __webpack_require__(/*! ./statements/interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/interface_deferred.js\");\r\nconst class_deferred_1 = __webpack_require__(/*! ./statements/class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_deferred.js\");\r\nconst call_1 = __webpack_require__(/*! ./statements/call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call.js\");\r\nconst class_implementation_1 = __webpack_require__(/*! ./statements/class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_implementation.js\");\r\nconst method_implementation_1 = __webpack_require__(/*! ./statements/method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/method_implementation.js\");\r\nconst move_1 = __webpack_require__(/*! ./statements/move */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move.js\");\r\nconst move_corresponding_1 = __webpack_require__(/*! ./statements/move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move_corresponding.js\");\r\nconst catch_1 = __webpack_require__(/*! ./statements/catch */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js\");\r\nconst loop_1 = __webpack_require__(/*! ./statements/loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js\");\r\nconst read_table_1 = __webpack_require__(/*! ./statements/read_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_table.js\");\r\nconst select_1 = __webpack_require__(/*! ./statements/select */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js\");\r\nconst insert_internal_1 = __webpack_require__(/*! ./statements/insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_internal.js\");\r\nconst split_1 = __webpack_require__(/*! ./statements/split */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js\");\r\nconst assign_1 = __webpack_require__(/*! ./statements/assign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assign.js\");\r\nconst convert_1 = __webpack_require__(/*! ./statements/convert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/convert.js\");\r\nconst describe_1 = __webpack_require__(/*! ./statements/describe */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/describe.js\");\r\nconst find_1 = __webpack_require__(/*! ./statements/find */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/find.js\");\r\nconst message_1 = __webpack_require__(/*! ./statements/message */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js\");\r\nconst get_time_1 = __webpack_require__(/*! ./statements/get_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_time.js\");\r\nconst get_parameter_1 = __webpack_require__(/*! ./statements/get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_parameter.js\");\r\nconst when_type_1 = __webpack_require__(/*! ./statements/when_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when_type.js\");\r\nconst if_1 = __webpack_require__(/*! ./statements/if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/if.js\");\r\nconst else_if_1 = __webpack_require__(/*! ./statements/else_if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js\");\r\nconst append_1 = __webpack_require__(/*! ./statements/append */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/append.js\");\r\nconst selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selection_screen.js\");\r\nconst ranges_1 = __webpack_require__(/*! ./statements/ranges */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/ranges.js\");\r\nconst write_1 = __webpack_require__(/*! ./statements/write */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/write.js\");\r\nconst case_1 = __webpack_require__(/*! ./statements/case */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case.js\");\r\nconst create_object_1 = __webpack_require__(/*! ./statements/create_object */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js\");\r\nconst do_1 = __webpack_require__(/*! ./statements/do */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/do.js\");\r\nconst concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js\");\r\nconst call_function_1 = __webpack_require__(/*! ./statements/call_function */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js\");\r\nconst clear_1 = __webpack_require__(/*! ./statements/clear */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js\");\r\nconst replace_1 = __webpack_require__(/*! ./statements/replace */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js\");\r\nconst get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js\");\r\nconst raise_1 = __webpack_require__(/*! ./statements/raise */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js\");\r\nconst delete_internal_1 = __webpack_require__(/*! ./statements/delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_internal.js\");\r\nconst receive_1 = __webpack_require__(/*! ./statements/receive */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/receive.js\");\r\nconst when_1 = __webpack_require__(/*! ./statements/when */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when.js\");\r\nconst create_data_1 = __webpack_require__(/*! ./statements/create_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_data.js\");\r\nconst call_transformation_1 = __webpack_require__(/*! ./statements/call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transformation.js\");\r\nconst get_locale_1 = __webpack_require__(/*! ./statements/get_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_locale.js\");\r\nconst set_locale_1 = __webpack_require__(/*! ./statements/set_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_locale.js\");\r\nconst sort_1 = __webpack_require__(/*! ./statements/sort */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/sort.js\");\r\nconst read_report_1 = __webpack_require__(/*! ./statements/read_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_report.js\");\r\nconst authority_check_1 = __webpack_require__(/*! ./statements/authority_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/authority_check.js\");\r\nconst insert_report_1 = __webpack_require__(/*! ./statements/insert_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_report.js\");\r\nconst get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js\");\r\nconst insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js\");\r\nconst delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js\");\r\nconst import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js\");\r\nconst syntax_check_1 = __webpack_require__(/*! ./statements/syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/syntax_check.js\");\r\nconst import_1 = __webpack_require__(/*! ./statements/import */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import.js\");\r\nconst export_1 = __webpack_require__(/*! ./statements/export */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/export.js\");\r\nconst scan_1 = __webpack_require__(/*! ./statements/scan */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/scan.js\");\r\nconst submit_1 = __webpack_require__(/*! ./statements/submit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/submit.js\");\r\nconst open_dataset_1 = __webpack_require__(/*! ./statements/open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js\");\r\nconst close_dataset_1 = __webpack_require__(/*! ./statements/close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js\");\r\nconst get_run_time_1 = __webpack_require__(/*! ./statements/get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_run_time.js\");\r\nconst update_database_1 = __webpack_require__(/*! ./statements/update_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/update_database.js\");\r\nconst add_1 = __webpack_require__(/*! ./statements/add */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add.js\");\r\nconst subtract_1 = __webpack_require__(/*! ./statements/subtract */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract.js\");\r\nconst add_corresponding_1 = __webpack_require__(/*! ./statements/add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add_corresponding.js\");\r\nconst subtract_corresponding_1 = __webpack_require__(/*! ./statements/subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract_corresponding.js\");\r\nconst multiply_1 = __webpack_require__(/*! ./statements/multiply */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/multiply.js\");\r\nconst divide_1 = __webpack_require__(/*! ./statements/divide */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/divide.js\");\r\nconst condense_1 = __webpack_require__(/*! ./statements/condense */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/condense.js\");\r\nconst controls_1 = __webpack_require__(/*! ./statements/controls */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/controls.js\");\r\nconst while_1 = __webpack_require__(/*! ./statements/while */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/while.js\");\r\nconst select_loop_1 = __webpack_require__(/*! ./statements/select_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select_loop.js\");\r\nconst check_1 = __webpack_require__(/*! ./statements/check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/check.js\");\r\nconst log_point_1 = __webpack_require__(/*! ./statements/log_point */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/log_point.js\");\r\nconst severity_1 = __webpack_require__(/*! ../../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nconst raise_event_1 = __webpack_require__(/*! ./statements/raise_event */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise_event.js\");\r\nconst form_1 = __webpack_require__(/*! ./statements/form */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/form.js\");\r\nconst assert_1 = __webpack_require__(/*! ./statements/assert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assert.js\");\r\nconst set_parameter_1 = __webpack_require__(/*! ./statements/set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_parameter.js\");\r\nconst class_local_friends_1 = __webpack_require__(/*! ./statements/class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_local_friends.js\");\r\nconst get_badi_1 = __webpack_require__(/*! ./statements/get_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js\");\r\nconst with_1 = __webpack_require__(/*! ./statements/with */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with.js\");\r\nconst with_loop_1 = __webpack_require__(/*! ./statements/with_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with_loop.js\");\r\nconst system_call_1 = __webpack_require__(/*! ./statements/system_call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/system_call.js\");\r\nconst collect_1 = __webpack_require__(/*! ./statements/collect */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/collect.js\");\r\nconst transfer_1 = __webpack_require__(/*! ./statements/transfer */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/transfer.js\");\r\nconst modify_database_1 = __webpack_require__(/*! ./statements/modify_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_database.js\");\r\nconst truncate_dataset_1 = __webpack_require__(/*! ./statements/truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js\");\r\nconst call_badi_1 = __webpack_require__(/*! ./statements/call_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_badi.js\");\r\nconst call_kernel_1 = __webpack_require__(/*! ./statements/call_kernel */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_kernel.js\");\r\nconst pack_1 = __webpack_require__(/*! ./statements/pack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/pack.js\");\r\nconst unpack_1 = __webpack_require__(/*! ./statements/unpack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unpack.js\");\r\nconst format_1 = __webpack_require__(/*! ./statements/format */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/format.js\");\r\nconst set_pf_status_1 = __webpack_require__(/*! ./statements/set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_pf_status.js\");\r\nconst set_titlebar_1 = __webpack_require__(/*! ./statements/set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_titlebar.js\");\r\nconst call_transaction_1 = __webpack_require__(/*! ./statements/call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transaction.js\");\r\nconst set_handler_1 = __webpack_require__(/*! ./statements/set_handler */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_handler.js\");\r\nconst wait_1 = __webpack_require__(/*! ./statements/wait */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/wait.js\");\r\nconst delete_report_1 = __webpack_require__(/*! ./statements/delete_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js\");\r\nconst shift_1 = __webpack_require__(/*! ./statements/shift */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/shift.js\");\r\nconst set_bit_1 = __webpack_require__(/*! ./statements/set_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_bit.js\");\r\nconst modify_screen_1 = __webpack_require__(/*! ./statements/modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js\");\r\nconst delete_cluster_1 = __webpack_require__(/*! ./statements/delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_cluster.js\");\r\nconst unassign_1 = __webpack_require__(/*! ./statements/unassign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unassign.js\");\r\nconst insert_textpool_1 = __webpack_require__(/*! ./statements/insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_textpool.js\");\r\nconst get_cursor_1 = __webpack_require__(/*! ./statements/get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_cursor.js\");\r\nconst loop_at_screen_1 = __webpack_require__(/*! ./statements/loop_at_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js\");\r\nconst insert_field_group_1 = __webpack_require__(/*! ./statements/insert_field_group */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_field_group.js\");\r\nconst read_entities_1 = __webpack_require__(/*! ./statements/read_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_entities.js\");\r\nconst modify_entities_1 = __webpack_require__(/*! ./statements/modify_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_entities.js\");\r\nconst commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/commit_entities.js\");\r\n// -----------------------------------\r\nconst map = {};\r\nfunction addToMap(handler) {\r\n if (map[handler.constructor.name] !== undefined) {\r\n throw new Error(\"syntax.ts duplicate statement syntax handler\");\r\n }\r\n map[handler.constructor.name] = handler;\r\n}\r\nif (Object.keys(map).length === 0) {\r\n addToMap(new interface_deferred_1.InterfaceDeferred());\r\n addToMap(new perform_1.Perform());\r\n addToMap(new class_deferred_1.ClassDeferred());\r\n addToMap(new call_1.Call());\r\n addToMap(new set_handler_1.SetHandler());\r\n addToMap(new class_implementation_1.ClassImplementation());\r\n addToMap(new method_implementation_1.MethodImplementation());\r\n addToMap(new move_1.Move());\r\n addToMap(new get_badi_1.GetBadi());\r\n addToMap(new call_badi_1.CallBadi());\r\n addToMap(new get_cursor_1.GetCursor());\r\n addToMap(new replace_1.Replace());\r\n addToMap(new truncate_dataset_1.TruncateDataset());\r\n addToMap(new assert_1.Assert());\r\n addToMap(new catch_1.Catch());\r\n addToMap(new loop_1.Loop());\r\n addToMap(new loop_at_screen_1.LoopAtScreen());\r\n addToMap(new set_pf_status_1.SetPFStatus());\r\n addToMap(new set_titlebar_1.SetTitlebar());\r\n addToMap(new submit_1.Submit());\r\n addToMap(new insert_textpool_1.InsertTextpool());\r\n addToMap(new read_table_1.ReadTable());\r\n addToMap(new syntax_check_1.SyntaxCheck());\r\n addToMap(new delete_report_1.DeleteReport());\r\n addToMap(new import_1.Import());\r\n addToMap(new collect_1.Collect());\r\n addToMap(new export_1.Export());\r\n addToMap(new scan_1.Scan());\r\n addToMap(new transfer_1.Transfer());\r\n addToMap(new split_1.Split());\r\n addToMap(new call_function_1.CallFunction());\r\n addToMap(new delete_internal_1.DeleteInternal());\r\n addToMap(new delete_cluster_1.DeleteCluster());\r\n addToMap(new clear_1.Clear());\r\n addToMap(new receive_1.Receive());\r\n addToMap(new get_bit_1.GetBit());\r\n addToMap(new class_local_friends_1.ClassLocalFriends());\r\n addToMap(new select_1.Select());\r\n addToMap(new modify_screen_1.ModifyScreen());\r\n addToMap(new insert_internal_1.InsertInternal());\r\n addToMap(new pack_1.Pack());\r\n addToMap(new unpack_1.Unpack());\r\n addToMap(new assign_1.Assign());\r\n addToMap(new set_locale_1.SetLocale());\r\n addToMap(new set_parameter_1.SetParameter());\r\n addToMap(new convert_1.Convert());\r\n addToMap(new controls_1.Controls());\r\n addToMap(new when_1.When());\r\n addToMap(new insert_database_1.InsertDatabase());\r\n addToMap(new delete_database_1.DeleteDatabase());\r\n addToMap(new update_database_1.UpdateDatabase());\r\n addToMap(new sort_1.Sort());\r\n addToMap(new wait_1.Wait());\r\n addToMap(new condense_1.Condense());\r\n addToMap(new set_bit_1.SetBit());\r\n addToMap(new open_dataset_1.OpenDataset());\r\n addToMap(new close_dataset_1.CloseDataset());\r\n addToMap(new read_report_1.ReadReport());\r\n addToMap(new do_1.Do());\r\n addToMap(new describe_1.Describe());\r\n addToMap(new find_1.Find());\r\n addToMap(new message_1.Message());\r\n addToMap(new system_call_1.SystemCall());\r\n addToMap(new insert_field_group_1.InsertFieldGroup());\r\n addToMap(new get_time_1.GetTime());\r\n addToMap(new unassign_1.Unassign());\r\n addToMap(new get_parameter_1.GetParameter());\r\n addToMap(new format_1.Format());\r\n addToMap(new when_type_1.WhenType());\r\n addToMap(new if_1.If());\r\n addToMap(new log_point_1.LogPoint());\r\n addToMap(new while_1.While());\r\n addToMap(new with_1.With());\r\n addToMap(new with_loop_1.WithLoop());\r\n addToMap(new call_transformation_1.CallTransformation());\r\n addToMap(new call_transaction_1.CallTransaction());\r\n addToMap(new get_locale_1.GetLocale());\r\n addToMap(new get_reference_1.GetReference());\r\n addToMap(new else_if_1.ElseIf());\r\n addToMap(new get_run_time_1.GetRunTime());\r\n addToMap(new create_object_1.CreateObject());\r\n addToMap(new import_dynpro_1.ImportDynpro());\r\n addToMap(new create_data_1.CreateData());\r\n addToMap(new case_1.Case());\r\n addToMap(new shift_1.Shift());\r\n addToMap(new raise_1.Raise());\r\n addToMap(new concatenate_1.Concatenate());\r\n addToMap(new append_1.Append());\r\n addToMap(new select_loop_1.SelectLoop());\r\n addToMap(new write_1.Write());\r\n addToMap(new move_corresponding_1.MoveCorresponding());\r\n addToMap(new authority_check_1.AuthorityCheck());\r\n addToMap(new insert_report_1.InsertReport());\r\n addToMap(new selection_screen_1.SelectionScreen());\r\n addToMap(new ranges_1.Ranges());\r\n addToMap(new add_1.Add());\r\n addToMap(new raise_event_1.RaiseEvent());\r\n addToMap(new subtract_1.Subtract());\r\n addToMap(new add_corresponding_1.AddCorresponding());\r\n addToMap(new subtract_corresponding_1.SubtractCorresponding());\r\n addToMap(new multiply_1.Multiply());\r\n addToMap(new divide_1.Divide());\r\n addToMap(new check_1.Check());\r\n addToMap(new modify_database_1.ModifyDatabase());\r\n addToMap(new form_1.Form());\r\n addToMap(new selectoption_1.SelectOption());\r\n addToMap(new tables_1.Tables());\r\n addToMap(new parameter_1.Parameter());\r\n addToMap(new fieldsymbol_1.FieldSymbol());\r\n addToMap(new read_entities_1.ReadEntities());\r\n addToMap(new modify_entities_1.ModifyEntities());\r\n addToMap(new commit_entities_1.CommitEntities());\r\n addToMap(new call_kernel_1.CallKernel());\r\n}\r\n// -----------------------------------\r\nclass SyntaxLogic {\r\n constructor(reg, object) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.object = object;\r\n this.scope = _current_scope_1.CurrentScope.buildDefault(this.reg, object);\r\n this.helpers = {\r\n oooc: new _object_oriented_1.ObjectOriented(this.scope),\r\n proc: new _procedural_1.Procedural(this.reg, this.scope),\r\n };\r\n }\r\n run() {\r\n if (this.object.syntaxResult !== undefined) {\r\n return this.object.syntaxResult;\r\n }\r\n this.issues = [];\r\n this.reg.getDDICReferences().clear(this.object);\r\n if (this.object instanceof objects_1.Program && this.object.isInclude()) {\r\n // todo, show some kind of error?\r\n return { issues: [], spaghetti: this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)) };\r\n }\r\n this.traverseObject();\r\n for (;;) {\r\n const spaghetti = this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)); // pop built-in scopes\r\n if (spaghetti.getTop().getIdentifier().stype === _scope_type_1.ScopeType.BuiltIn) {\r\n const result = { issues: this.issues, spaghetti };\r\n this.object.syntaxResult = result;\r\n return result;\r\n }\r\n }\r\n }\r\n /////////////////////////////\r\n traverseObject() {\r\n const traversal = this.object.getSequencedFiles();\r\n if (this.object instanceof objects_1.Program\r\n || this.object instanceof objects_1.FunctionGroup) {\r\n for (const f of this.object.getSequencedFiles()) {\r\n // add FORM defintions to the _global object scope\r\n this.helpers.proc.addAllFormDefinitions(f, this.object);\r\n }\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n let stype = _scope_type_1.ScopeType.Program;\r\n if (this.object instanceof objects_1.FunctionGroup) {\r\n stype = _scope_type_1.ScopeType.FunctionGroup;\r\n }\r\n this.scope.push(stype, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n else if (this.object instanceof objects_1.TypePool) {\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n this.scope.push(_scope_type_1.ScopeType.TypePool, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n for (const file of traversal) {\r\n this.currentFile = file;\r\n const structure = this.currentFile.getStructure();\r\n if (structure === undefined) {\r\n return this.scope;\r\n }\r\n else {\r\n this.traverse(structure);\r\n }\r\n }\r\n return this.scope;\r\n }\r\n newIssue(token, message) {\r\n const issue = issue_1.Issue.atToken(this.currentFile, token, message, \"check_syntax\", severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n traverse(node) {\r\n for (const child of node.getChildren()) {\r\n const isStructure = child instanceof nodes_1.StructureNode;\r\n const isStatement = child instanceof nodes_1.StatementNode;\r\n try {\r\n if (isStructure) {\r\n const gotoNext = this.updateScopeStructure(child);\r\n if (gotoNext === true) {\r\n continue;\r\n }\r\n }\r\n else if (isStatement) {\r\n this.updateScopeStatement(child);\r\n }\r\n }\r\n catch (e) {\r\n this.newIssue(child.getFirstToken(), e.message);\r\n break;\r\n }\r\n // walk into INCLUDEs\r\n if (isStatement && child.get() instanceof Statements.Include) {\r\n const file = this.helpers.proc.findInclude(child, this.object);\r\n if (file !== undefined && file.getStructure() !== undefined) {\r\n const old = this.currentFile;\r\n this.currentFile = file;\r\n this.traverse(file.getStructure());\r\n this.currentFile = old;\r\n }\r\n }\r\n if (isStructure || isStatement) {\r\n this.traverse(child);\r\n }\r\n }\r\n }\r\n // if this returns true, then the traversal should continue with next child\r\n updateScopeStructure(node) {\r\n const filename = this.currentFile.getFilename();\r\n const stru = node.get();\r\n if (stru instanceof Structures.ClassDefinition) {\r\n new class_definition_1.ClassDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Interface) {\r\n new interface_definition_1.InterfaceDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Types) {\r\n this.scope.addType(new types_1.Types().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Constants) {\r\n this.scope.addIdentifier(new constants_1.Constants().runSyntax(node, this.scope, filename).type);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Data) {\r\n this.scope.addIdentifier(new data_1.Data().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Statics) {\r\n this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.TypeEnum) {\r\n const values = new type_enum_1.TypeEnum().runSyntax(node, this.scope, filename).values;\r\n this.scope.addList(values);\r\n return true;\r\n }\r\n return false;\r\n }\r\n updateScopeStatement(node) {\r\n const filename = this.currentFile.getFilename();\r\n const s = node.get();\r\n // todo, refactor\r\n if (s instanceof Statements.Type) {\r\n this.scope.addType(new type_1.Type().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Constant) {\r\n this.scope.addIdentifier(new constant_1.Constant().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Static) {\r\n this.scope.addIdentifier(new static_1.Static().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Data) {\r\n this.scope.addIdentifier(new data_2.Data().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n const name = s.constructor.name;\r\n if (map[name]) {\r\n map[name].runSyntax(node, this.scope, filename);\r\n return;\r\n }\r\n if (s instanceof Statements.FunctionModule) {\r\n this.helpers.proc.findFunctionScope(this.object, node, filename);\r\n }\r\n else if (s instanceof Statements.EndForm\r\n || s instanceof Statements.EndFunction\r\n || s instanceof Statements.EndClass\r\n || s instanceof Statements.EndInterface) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n else if (s instanceof Statements.EndMethod) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n if (this.scope.getType() === _scope_type_1.ScopeType.MethodInstance) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n }\r\n }\r\n}\r\nexports.SyntaxLogic = SyntaxLogic;\r\n//# sourceMappingURL=syntax.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js?");
|
|
8808
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyntaxLogic = void 0;\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ./_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _procedural_1 = __webpack_require__(/*! ./_procedural */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_procedural.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst data_1 = __webpack_require__(/*! ./structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ./structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst types_1 = __webpack_require__(/*! ./structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst statics_1 = __webpack_require__(/*! ./structures/statics */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/statics.js\");\r\nconst constants_1 = __webpack_require__(/*! ./structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst perform_1 = __webpack_require__(/*! ./statements/perform */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js\");\r\nconst type_1 = __webpack_require__(/*! ./statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nconst constant_1 = __webpack_require__(/*! ./statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst static_1 = __webpack_require__(/*! ./statements/static */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/static.js\");\r\nconst search_1 = __webpack_require__(/*! ./statements/search */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/search.js\");\r\nconst translate_1 = __webpack_require__(/*! ./statements/translate */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/translate.js\");\r\nconst modify_internal_1 = __webpack_require__(/*! ./statements/modify_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_internal.js\");\r\nconst data_2 = __webpack_require__(/*! ./statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst parameter_1 = __webpack_require__(/*! ./statements/parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/parameter.js\");\r\nconst fieldsymbol_1 = __webpack_require__(/*! ./statements/fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js\");\r\nconst tables_1 = __webpack_require__(/*! ./statements/tables */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/tables.js\");\r\nconst selectoption_1 = __webpack_require__(/*! ./statements/selectoption */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selectoption.js\");\r\nconst interface_deferred_1 = __webpack_require__(/*! ./statements/interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/interface_deferred.js\");\r\nconst class_deferred_1 = __webpack_require__(/*! ./statements/class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_deferred.js\");\r\nconst call_1 = __webpack_require__(/*! ./statements/call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call.js\");\r\nconst class_implementation_1 = __webpack_require__(/*! ./statements/class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_implementation.js\");\r\nconst method_implementation_1 = __webpack_require__(/*! ./statements/method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/method_implementation.js\");\r\nconst move_1 = __webpack_require__(/*! ./statements/move */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move.js\");\r\nconst move_corresponding_1 = __webpack_require__(/*! ./statements/move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move_corresponding.js\");\r\nconst catch_1 = __webpack_require__(/*! ./statements/catch */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js\");\r\nconst loop_1 = __webpack_require__(/*! ./statements/loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js\");\r\nconst read_table_1 = __webpack_require__(/*! ./statements/read_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_table.js\");\r\nconst select_1 = __webpack_require__(/*! ./statements/select */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js\");\r\nconst insert_internal_1 = __webpack_require__(/*! ./statements/insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_internal.js\");\r\nconst split_1 = __webpack_require__(/*! ./statements/split */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js\");\r\nconst assign_1 = __webpack_require__(/*! ./statements/assign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assign.js\");\r\nconst convert_1 = __webpack_require__(/*! ./statements/convert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/convert.js\");\r\nconst describe_1 = __webpack_require__(/*! ./statements/describe */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/describe.js\");\r\nconst find_1 = __webpack_require__(/*! ./statements/find */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/find.js\");\r\nconst message_1 = __webpack_require__(/*! ./statements/message */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js\");\r\nconst get_time_1 = __webpack_require__(/*! ./statements/get_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_time.js\");\r\nconst get_parameter_1 = __webpack_require__(/*! ./statements/get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_parameter.js\");\r\nconst when_type_1 = __webpack_require__(/*! ./statements/when_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when_type.js\");\r\nconst if_1 = __webpack_require__(/*! ./statements/if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/if.js\");\r\nconst else_if_1 = __webpack_require__(/*! ./statements/else_if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js\");\r\nconst append_1 = __webpack_require__(/*! ./statements/append */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/append.js\");\r\nconst selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selection_screen.js\");\r\nconst ranges_1 = __webpack_require__(/*! ./statements/ranges */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/ranges.js\");\r\nconst write_1 = __webpack_require__(/*! ./statements/write */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/write.js\");\r\nconst case_1 = __webpack_require__(/*! ./statements/case */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case.js\");\r\nconst create_object_1 = __webpack_require__(/*! ./statements/create_object */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js\");\r\nconst do_1 = __webpack_require__(/*! ./statements/do */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/do.js\");\r\nconst concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js\");\r\nconst call_function_1 = __webpack_require__(/*! ./statements/call_function */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js\");\r\nconst clear_1 = __webpack_require__(/*! ./statements/clear */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js\");\r\nconst replace_1 = __webpack_require__(/*! ./statements/replace */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js\");\r\nconst get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js\");\r\nconst raise_1 = __webpack_require__(/*! ./statements/raise */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js\");\r\nconst delete_internal_1 = __webpack_require__(/*! ./statements/delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_internal.js\");\r\nconst receive_1 = __webpack_require__(/*! ./statements/receive */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/receive.js\");\r\nconst when_1 = __webpack_require__(/*! ./statements/when */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when.js\");\r\nconst create_data_1 = __webpack_require__(/*! ./statements/create_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_data.js\");\r\nconst call_transformation_1 = __webpack_require__(/*! ./statements/call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transformation.js\");\r\nconst get_locale_1 = __webpack_require__(/*! ./statements/get_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_locale.js\");\r\nconst set_locale_1 = __webpack_require__(/*! ./statements/set_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_locale.js\");\r\nconst sort_1 = __webpack_require__(/*! ./statements/sort */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/sort.js\");\r\nconst read_report_1 = __webpack_require__(/*! ./statements/read_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_report.js\");\r\nconst authority_check_1 = __webpack_require__(/*! ./statements/authority_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/authority_check.js\");\r\nconst insert_report_1 = __webpack_require__(/*! ./statements/insert_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_report.js\");\r\nconst get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js\");\r\nconst insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js\");\r\nconst delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js\");\r\nconst import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js\");\r\nconst syntax_check_1 = __webpack_require__(/*! ./statements/syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/syntax_check.js\");\r\nconst import_1 = __webpack_require__(/*! ./statements/import */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import.js\");\r\nconst export_1 = __webpack_require__(/*! ./statements/export */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/export.js\");\r\nconst scan_1 = __webpack_require__(/*! ./statements/scan */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/scan.js\");\r\nconst submit_1 = __webpack_require__(/*! ./statements/submit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/submit.js\");\r\nconst open_dataset_1 = __webpack_require__(/*! ./statements/open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js\");\r\nconst close_dataset_1 = __webpack_require__(/*! ./statements/close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js\");\r\nconst get_run_time_1 = __webpack_require__(/*! ./statements/get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_run_time.js\");\r\nconst update_database_1 = __webpack_require__(/*! ./statements/update_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/update_database.js\");\r\nconst add_1 = __webpack_require__(/*! ./statements/add */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add.js\");\r\nconst subtract_1 = __webpack_require__(/*! ./statements/subtract */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract.js\");\r\nconst add_corresponding_1 = __webpack_require__(/*! ./statements/add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add_corresponding.js\");\r\nconst subtract_corresponding_1 = __webpack_require__(/*! ./statements/subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract_corresponding.js\");\r\nconst multiply_1 = __webpack_require__(/*! ./statements/multiply */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/multiply.js\");\r\nconst divide_1 = __webpack_require__(/*! ./statements/divide */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/divide.js\");\r\nconst condense_1 = __webpack_require__(/*! ./statements/condense */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/condense.js\");\r\nconst controls_1 = __webpack_require__(/*! ./statements/controls */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/controls.js\");\r\nconst while_1 = __webpack_require__(/*! ./statements/while */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/while.js\");\r\nconst select_loop_1 = __webpack_require__(/*! ./statements/select_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select_loop.js\");\r\nconst check_1 = __webpack_require__(/*! ./statements/check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/check.js\");\r\nconst log_point_1 = __webpack_require__(/*! ./statements/log_point */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/log_point.js\");\r\nconst severity_1 = __webpack_require__(/*! ../../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nconst raise_event_1 = __webpack_require__(/*! ./statements/raise_event */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise_event.js\");\r\nconst form_1 = __webpack_require__(/*! ./statements/form */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/form.js\");\r\nconst assert_1 = __webpack_require__(/*! ./statements/assert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assert.js\");\r\nconst set_parameter_1 = __webpack_require__(/*! ./statements/set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_parameter.js\");\r\nconst class_local_friends_1 = __webpack_require__(/*! ./statements/class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_local_friends.js\");\r\nconst get_badi_1 = __webpack_require__(/*! ./statements/get_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js\");\r\nconst with_1 = __webpack_require__(/*! ./statements/with */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with.js\");\r\nconst with_loop_1 = __webpack_require__(/*! ./statements/with_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with_loop.js\");\r\nconst system_call_1 = __webpack_require__(/*! ./statements/system_call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/system_call.js\");\r\nconst collect_1 = __webpack_require__(/*! ./statements/collect */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/collect.js\");\r\nconst transfer_1 = __webpack_require__(/*! ./statements/transfer */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/transfer.js\");\r\nconst modify_database_1 = __webpack_require__(/*! ./statements/modify_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_database.js\");\r\nconst truncate_dataset_1 = __webpack_require__(/*! ./statements/truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js\");\r\nconst call_badi_1 = __webpack_require__(/*! ./statements/call_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_badi.js\");\r\nconst call_kernel_1 = __webpack_require__(/*! ./statements/call_kernel */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_kernel.js\");\r\nconst pack_1 = __webpack_require__(/*! ./statements/pack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/pack.js\");\r\nconst unpack_1 = __webpack_require__(/*! ./statements/unpack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unpack.js\");\r\nconst format_1 = __webpack_require__(/*! ./statements/format */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/format.js\");\r\nconst set_pf_status_1 = __webpack_require__(/*! ./statements/set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_pf_status.js\");\r\nconst set_titlebar_1 = __webpack_require__(/*! ./statements/set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_titlebar.js\");\r\nconst call_transaction_1 = __webpack_require__(/*! ./statements/call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transaction.js\");\r\nconst set_handler_1 = __webpack_require__(/*! ./statements/set_handler */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_handler.js\");\r\nconst wait_1 = __webpack_require__(/*! ./statements/wait */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/wait.js\");\r\nconst delete_report_1 = __webpack_require__(/*! ./statements/delete_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js\");\r\nconst shift_1 = __webpack_require__(/*! ./statements/shift */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/shift.js\");\r\nconst set_bit_1 = __webpack_require__(/*! ./statements/set_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_bit.js\");\r\nconst modify_screen_1 = __webpack_require__(/*! ./statements/modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js\");\r\nconst delete_cluster_1 = __webpack_require__(/*! ./statements/delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_cluster.js\");\r\nconst unassign_1 = __webpack_require__(/*! ./statements/unassign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unassign.js\");\r\nconst insert_textpool_1 = __webpack_require__(/*! ./statements/insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_textpool.js\");\r\nconst get_cursor_1 = __webpack_require__(/*! ./statements/get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_cursor.js\");\r\nconst loop_at_screen_1 = __webpack_require__(/*! ./statements/loop_at_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js\");\r\nconst insert_field_group_1 = __webpack_require__(/*! ./statements/insert_field_group */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_field_group.js\");\r\nconst read_entities_1 = __webpack_require__(/*! ./statements/read_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_entities.js\");\r\nconst modify_entities_1 = __webpack_require__(/*! ./statements/modify_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_entities.js\");\r\nconst commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/commit_entities.js\");\r\n// -----------------------------------\r\nconst map = {};\r\nfunction addToMap(handler) {\r\n if (map[handler.constructor.name] !== undefined) {\r\n throw new Error(\"syntax.ts duplicate statement syntax handler\");\r\n }\r\n map[handler.constructor.name] = handler;\r\n}\r\nif (Object.keys(map).length === 0) {\r\n addToMap(new interface_deferred_1.InterfaceDeferred());\r\n addToMap(new perform_1.Perform());\r\n addToMap(new class_deferred_1.ClassDeferred());\r\n addToMap(new call_1.Call());\r\n addToMap(new set_handler_1.SetHandler());\r\n addToMap(new class_implementation_1.ClassImplementation());\r\n addToMap(new method_implementation_1.MethodImplementation());\r\n addToMap(new move_1.Move());\r\n addToMap(new get_badi_1.GetBadi());\r\n addToMap(new call_badi_1.CallBadi());\r\n addToMap(new get_cursor_1.GetCursor());\r\n addToMap(new replace_1.Replace());\r\n addToMap(new truncate_dataset_1.TruncateDataset());\r\n addToMap(new assert_1.Assert());\r\n addToMap(new catch_1.Catch());\r\n addToMap(new loop_1.Loop());\r\n addToMap(new loop_at_screen_1.LoopAtScreen());\r\n addToMap(new set_pf_status_1.SetPFStatus());\r\n addToMap(new set_titlebar_1.SetTitlebar());\r\n addToMap(new submit_1.Submit());\r\n addToMap(new insert_textpool_1.InsertTextpool());\r\n addToMap(new read_table_1.ReadTable());\r\n addToMap(new syntax_check_1.SyntaxCheck());\r\n addToMap(new delete_report_1.DeleteReport());\r\n addToMap(new import_1.Import());\r\n addToMap(new collect_1.Collect());\r\n addToMap(new export_1.Export());\r\n addToMap(new scan_1.Scan());\r\n addToMap(new transfer_1.Transfer());\r\n addToMap(new split_1.Split());\r\n addToMap(new call_function_1.CallFunction());\r\n addToMap(new delete_internal_1.DeleteInternal());\r\n addToMap(new delete_cluster_1.DeleteCluster());\r\n addToMap(new clear_1.Clear());\r\n addToMap(new receive_1.Receive());\r\n addToMap(new get_bit_1.GetBit());\r\n addToMap(new class_local_friends_1.ClassLocalFriends());\r\n addToMap(new select_1.Select());\r\n addToMap(new modify_screen_1.ModifyScreen());\r\n addToMap(new insert_internal_1.InsertInternal());\r\n addToMap(new pack_1.Pack());\r\n addToMap(new unpack_1.Unpack());\r\n addToMap(new assign_1.Assign());\r\n addToMap(new set_locale_1.SetLocale());\r\n addToMap(new set_parameter_1.SetParameter());\r\n addToMap(new convert_1.Convert());\r\n addToMap(new controls_1.Controls());\r\n addToMap(new when_1.When());\r\n addToMap(new insert_database_1.InsertDatabase());\r\n addToMap(new delete_database_1.DeleteDatabase());\r\n addToMap(new update_database_1.UpdateDatabase());\r\n addToMap(new sort_1.Sort());\r\n addToMap(new wait_1.Wait());\r\n addToMap(new condense_1.Condense());\r\n addToMap(new set_bit_1.SetBit());\r\n addToMap(new open_dataset_1.OpenDataset());\r\n addToMap(new close_dataset_1.CloseDataset());\r\n addToMap(new read_report_1.ReadReport());\r\n addToMap(new do_1.Do());\r\n addToMap(new describe_1.Describe());\r\n addToMap(new find_1.Find());\r\n addToMap(new message_1.Message());\r\n addToMap(new system_call_1.SystemCall());\r\n addToMap(new insert_field_group_1.InsertFieldGroup());\r\n addToMap(new get_time_1.GetTime());\r\n addToMap(new unassign_1.Unassign());\r\n addToMap(new get_parameter_1.GetParameter());\r\n addToMap(new format_1.Format());\r\n addToMap(new when_type_1.WhenType());\r\n addToMap(new if_1.If());\r\n addToMap(new log_point_1.LogPoint());\r\n addToMap(new while_1.While());\r\n addToMap(new with_1.With());\r\n addToMap(new with_loop_1.WithLoop());\r\n addToMap(new call_transformation_1.CallTransformation());\r\n addToMap(new call_transaction_1.CallTransaction());\r\n addToMap(new get_locale_1.GetLocale());\r\n addToMap(new get_reference_1.GetReference());\r\n addToMap(new else_if_1.ElseIf());\r\n addToMap(new get_run_time_1.GetRunTime());\r\n addToMap(new create_object_1.CreateObject());\r\n addToMap(new import_dynpro_1.ImportDynpro());\r\n addToMap(new create_data_1.CreateData());\r\n addToMap(new case_1.Case());\r\n addToMap(new shift_1.Shift());\r\n addToMap(new raise_1.Raise());\r\n addToMap(new concatenate_1.Concatenate());\r\n addToMap(new append_1.Append());\r\n addToMap(new select_loop_1.SelectLoop());\r\n addToMap(new write_1.Write());\r\n addToMap(new move_corresponding_1.MoveCorresponding());\r\n addToMap(new authority_check_1.AuthorityCheck());\r\n addToMap(new insert_report_1.InsertReport());\r\n addToMap(new selection_screen_1.SelectionScreen());\r\n addToMap(new ranges_1.Ranges());\r\n addToMap(new add_1.Add());\r\n addToMap(new raise_event_1.RaiseEvent());\r\n addToMap(new subtract_1.Subtract());\r\n addToMap(new add_corresponding_1.AddCorresponding());\r\n addToMap(new subtract_corresponding_1.SubtractCorresponding());\r\n addToMap(new multiply_1.Multiply());\r\n addToMap(new divide_1.Divide());\r\n addToMap(new check_1.Check());\r\n addToMap(new modify_database_1.ModifyDatabase());\r\n addToMap(new form_1.Form());\r\n addToMap(new selectoption_1.SelectOption());\r\n addToMap(new tables_1.Tables());\r\n addToMap(new parameter_1.Parameter());\r\n addToMap(new fieldsymbol_1.FieldSymbol());\r\n addToMap(new read_entities_1.ReadEntities());\r\n addToMap(new modify_entities_1.ModifyEntities());\r\n addToMap(new commit_entities_1.CommitEntities());\r\n addToMap(new call_kernel_1.CallKernel());\r\n addToMap(new search_1.Search());\r\n addToMap(new translate_1.Translate());\r\n addToMap(new modify_internal_1.ModifyInternal());\r\n}\r\n// -----------------------------------\r\nclass SyntaxLogic {\r\n constructor(reg, object) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.object = object;\r\n this.scope = _current_scope_1.CurrentScope.buildDefault(this.reg, object);\r\n this.helpers = {\r\n oooc: new _object_oriented_1.ObjectOriented(this.scope),\r\n proc: new _procedural_1.Procedural(this.reg, this.scope),\r\n };\r\n }\r\n run() {\r\n if (this.object.syntaxResult !== undefined) {\r\n return this.object.syntaxResult;\r\n }\r\n this.issues = [];\r\n this.reg.getDDICReferences().clear(this.object);\r\n if (this.object instanceof objects_1.Program && this.object.isInclude()) {\r\n // todo, show some kind of error?\r\n return { issues: [], spaghetti: this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)) };\r\n }\r\n this.traverseObject();\r\n for (;;) {\r\n const spaghetti = this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)); // pop built-in scopes\r\n if (spaghetti.getTop().getIdentifier().stype === _scope_type_1.ScopeType.BuiltIn) {\r\n const result = { issues: this.issues, spaghetti };\r\n this.object.syntaxResult = result;\r\n return result;\r\n }\r\n }\r\n }\r\n /////////////////////////////\r\n traverseObject() {\r\n const traversal = this.object.getSequencedFiles();\r\n if (this.object instanceof objects_1.Program\r\n || this.object instanceof objects_1.FunctionGroup) {\r\n for (const f of this.object.getSequencedFiles()) {\r\n // add FORM defintions to the _global object scope\r\n this.helpers.proc.addAllFormDefinitions(f, this.object);\r\n }\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n let stype = _scope_type_1.ScopeType.Program;\r\n if (this.object instanceof objects_1.FunctionGroup) {\r\n stype = _scope_type_1.ScopeType.FunctionGroup;\r\n }\r\n this.scope.push(stype, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n else if (this.object instanceof objects_1.TypePool) {\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n this.scope.push(_scope_type_1.ScopeType.TypePool, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n for (const file of traversal) {\r\n this.currentFile = file;\r\n const structure = this.currentFile.getStructure();\r\n if (structure === undefined) {\r\n return this.scope;\r\n }\r\n else {\r\n this.traverse(structure);\r\n }\r\n }\r\n return this.scope;\r\n }\r\n newIssue(token, message) {\r\n const issue = issue_1.Issue.atToken(this.currentFile, token, message, \"check_syntax\", severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n traverse(node) {\r\n for (const child of node.getChildren()) {\r\n const isStructure = child instanceof nodes_1.StructureNode;\r\n const isStatement = child instanceof nodes_1.StatementNode;\r\n try {\r\n if (isStructure) {\r\n const gotoNext = this.updateScopeStructure(child);\r\n if (gotoNext === true) {\r\n continue;\r\n }\r\n }\r\n else if (isStatement) {\r\n this.updateScopeStatement(child);\r\n }\r\n }\r\n catch (e) {\r\n this.newIssue(child.getFirstToken(), e.message);\r\n break;\r\n }\r\n // walk into INCLUDEs\r\n if (isStatement && child.get() instanceof Statements.Include) {\r\n const file = this.helpers.proc.findInclude(child, this.object);\r\n if (file !== undefined && file.getStructure() !== undefined) {\r\n const old = this.currentFile;\r\n this.currentFile = file;\r\n this.traverse(file.getStructure());\r\n this.currentFile = old;\r\n }\r\n }\r\n if (isStructure || isStatement) {\r\n this.traverse(child);\r\n }\r\n }\r\n }\r\n // if this returns true, then the traversal should continue with next child\r\n updateScopeStructure(node) {\r\n const filename = this.currentFile.getFilename();\r\n const stru = node.get();\r\n if (stru instanceof Structures.ClassDefinition) {\r\n new class_definition_1.ClassDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Interface) {\r\n new interface_definition_1.InterfaceDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Types) {\r\n this.scope.addType(new types_1.Types().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Constants) {\r\n this.scope.addIdentifier(new constants_1.Constants().runSyntax(node, this.scope, filename).type);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Data) {\r\n this.scope.addIdentifier(new data_1.Data().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Statics) {\r\n this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.TypeEnum) {\r\n const values = new type_enum_1.TypeEnum().runSyntax(node, this.scope, filename).values;\r\n this.scope.addList(values);\r\n return true;\r\n }\r\n return false;\r\n }\r\n updateScopeStatement(node) {\r\n const filename = this.currentFile.getFilename();\r\n const s = node.get();\r\n // todo, refactor\r\n if (s instanceof Statements.Type) {\r\n this.scope.addType(new type_1.Type().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Constant) {\r\n this.scope.addIdentifier(new constant_1.Constant().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Static) {\r\n this.scope.addIdentifier(new static_1.Static().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Data) {\r\n this.scope.addIdentifier(new data_2.Data().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n const name = s.constructor.name;\r\n if (map[name]) {\r\n map[name].runSyntax(node, this.scope, filename);\r\n return;\r\n }\r\n if (s instanceof Statements.FunctionModule) {\r\n this.helpers.proc.findFunctionScope(this.object, node, filename);\r\n }\r\n else if (s instanceof Statements.EndForm\r\n || s instanceof Statements.EndFunction\r\n || s instanceof Statements.EndClass\r\n || s instanceof Statements.EndInterface) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n else if (s instanceof Statements.EndMethod) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n if (this.scope.getType() === _scope_type_1.ScopeType.MethodInstance) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n }\r\n }\r\n}\r\nexports.SyntaxLogic = SyntaxLogic;\r\n//# sourceMappingURL=syntax.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js?");
|
|
8776
8809
|
|
|
8777
8810
|
/***/ }),
|
|
8778
8811
|
|
|
@@ -11071,7 +11104,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11071
11104
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11072
11105
|
|
|
11073
11106
|
"use strict";
|
|
11074
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LockObject = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass LockObject extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"ENQU\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 16,\r\n allowNamespace: true,\r\n };\r\n }\r\n
|
|
11107
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LockObject = void 0;\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass LockObject extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"ENQU\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 16,\r\n allowNamespace: true,\r\n };\r\n }\r\n getPrimaryTable() {\r\n var _a;\r\n this.parse();\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable;\r\n }\r\n parseType(reg) {\r\n var _a, _b;\r\n this.parse();\r\n const references = [];\r\n const ddic = new ddic_1.DDIC(reg);\r\n if ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable) {\r\n const found = ddic.lookupTableOrView2((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.primaryTable);\r\n if (found) {\r\n references.push({ object: found });\r\n }\r\n }\r\n reg.getDDICReferences().setUsing(this, references);\r\n }\r\n parse() {\r\n var _a, _b;\r\n if (this.parsedXML) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n const start = Date.now();\r\n this.parsedXML = {};\r\n const parsed = super.parseRaw2();\r\n if (parsed === undefined\r\n || parsed.abapGit === undefined\r\n || parsed.abapGit[\"asx:abap\"][\"asx:values\"] === undefined) {\r\n return { updated: false, runtime: 0 };\r\n }\r\n this.parsedXML.primaryTable = (_a = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DD25V) === null || _a === void 0 ? void 0 : _a.ROOTTAB;\r\n this.parsedXML.description = (_b = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DD25V) === null || _b === void 0 ? void 0 : _b.DDTEXT;\r\n const end = Date.now();\r\n return { updated: true, runtime: end - start };\r\n }\r\n getDescription() {\r\n var _a;\r\n this.parse();\r\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;\r\n }\r\n}\r\nexports.LockObject = LockObject;\r\n//# sourceMappingURL=lock_object.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/lock_object.js?");
|
|
11075
11108
|
|
|
11076
11109
|
/***/ }),
|
|
11077
11110
|
|
|
@@ -11676,7 +11709,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11676
11709
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11677
11710
|
|
|
11678
11711
|
"use strict";
|
|
11679
|
-
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.94.2\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
|
|
11712
|
+
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.94.4\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
|
|
11680
11713
|
|
|
11681
11714
|
/***/ }),
|
|
11682
11715
|
|
|
@@ -12853,7 +12886,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12853
12886
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12854
12887
|
|
|
12855
12888
|
"use strict";
|
|
12856
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PragmaStyle = exports.PragmaStyleConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst keyword_case_1 = __webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\");\r\nclass PragmaStyleConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.style = keyword_case_1.KeywordCaseStyle.Upper;\r\n }\r\n}\r\nexports.PragmaStyleConf = PragmaStyleConf;\r\nclass PragmaStyle extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PragmaStyleConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"pragma_style\",\r\n title: \"Pragma Style\",\r\n shortDescription: `Check pragmas
|
|
12889
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PragmaStyle = exports.PragmaStyleConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst keyword_case_1 = __webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\");\r\nclass PragmaStyleConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.style = keyword_case_1.KeywordCaseStyle.Upper;\r\n }\r\n}\r\nexports.PragmaStyleConf = PragmaStyleConf;\r\nclass PragmaStyle extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PragmaStyleConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"pragma_style\",\r\n title: \"Pragma Style\",\r\n shortDescription: `Check pragmas placement and case`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenpragma.htm`,\r\n badExample: `DATA field ##NO_TEXT TYPE i.`,\r\n goodExample: `DATA field TYPE i ##NO_TEXT.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.style === undefined) {\r\n this.conf.style = keyword_case_1.KeywordCaseStyle.Upper;\r\n }\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n if (s.getPragmas().length === 0) {\r\n continue;\r\n }\r\n for (const p of s.getPragmas()) {\r\n const children = s.getChildren();\r\n if (children.length === 1) {\r\n break; // empty statement with pragma\r\n }\r\n if (children[children.length - 2].getLastToken().getStart().isAfter(p.getStart())) {\r\n const message = \"Place pragma at end of statement\";\r\n const issue = issue_1.Issue.atToken(file, p, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue; // max one finding per statement\r\n }\r\n if (this.conf.style === keyword_case_1.KeywordCaseStyle.Upper && p.getStr() !== p.getStr().toUpperCase()) {\r\n const message = \"Upper case pragmas\";\r\n const issue = issue_1.Issue.atToken(file, p, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else if (this.conf.style === keyword_case_1.KeywordCaseStyle.Lower && p.getStr() !== p.getStr().toLowerCase()) {\r\n const message = \"Lower case pragmas\";\r\n const issue = issue_1.Issue.atToken(file, p, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.PragmaStyle = PragmaStyle;\r\n//# sourceMappingURL=pragma_style.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/pragma_style.js?");
|
|
12857
12890
|
|
|
12858
12891
|
/***/ }),
|
|
12859
12892
|
|
|
@@ -14100,7 +14133,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
14100
14133
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
14101
14134
|
|
|
14102
14135
|
"use strict";
|
|
14103
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createSupportsColor\": () => (/* binding */ createSupportsColor),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ \"node:process\");\n/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:os */ \"node:os\");\n/* harmony import */ var node_tty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node:tty */ \"node:tty\");\n\n\n\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\nfunction hasFlag(flag, argv = node_process__WEBPACK_IMPORTED_MODULE_0__.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = node_process__WEBPACK_IMPORTED_MODULE_0__;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (node_process__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = node_os__WEBPACK_IMPORTED_MODULE_1__.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', '
|
|
14136
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createSupportsColor\": () => (/* binding */ createSupportsColor),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ \"node:process\");\n/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:os */ \"node:os\");\n/* harmony import */ var node_tty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node:tty */ \"node:tty\");\n\n\n\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process__WEBPACK_IMPORTED_MODULE_0__.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = node_process__WEBPACK_IMPORTED_MODULE_0__;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (node_process__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = node_os__WEBPACK_IMPORTED_MODULE_1__.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif ('GITHUB_ACTIONS' in env) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(2)}),\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (supportsColor);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/vendor/supports-color/index.js?");
|
|
14104
14137
|
|
|
14105
14138
|
/***/ }),
|
|
14106
14139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.94.
|
|
3
|
+
"version": "2.94.4",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abaplint": "./abaplint"
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://abaplint.org",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@abaplint/core": "^2.94.
|
|
40
|
+
"@abaplint/core": "^2.94.4",
|
|
41
41
|
"@types/chai": "^4.3.4",
|
|
42
42
|
"@types/glob": "^7.2.0",
|
|
43
43
|
"@types/minimist": "^1.2.2",
|
|
44
44
|
"@types/mocha": "^10.0.1",
|
|
45
|
-
"@types/node": "^18.11.
|
|
45
|
+
"@types/node": "^18.11.14",
|
|
46
46
|
"@types/progress": "^2.0.5",
|
|
47
47
|
"chai": "^4.3.7",
|
|
48
|
-
"chalk": "^5.
|
|
49
|
-
"eslint": "^8.
|
|
48
|
+
"chalk": "^5.2.0",
|
|
49
|
+
"eslint": "^8.29.0",
|
|
50
50
|
"glob": "^7.2.3",
|
|
51
51
|
"json5": "^2.2.1",
|
|
52
52
|
"memfs": "^3.4.12",
|
|
53
53
|
"minimist": "^1.2.7",
|
|
54
54
|
"mocha": "^10.1.0",
|
|
55
55
|
"progress": "^2.0.3",
|
|
56
|
-
"typescript": "^4.9.
|
|
56
|
+
"typescript": "^4.9.4",
|
|
57
57
|
"webpack": "^5.75.0",
|
|
58
|
-
"webpack-cli": "^5.0.
|
|
58
|
+
"webpack-cli": "^5.0.1",
|
|
59
59
|
"xml-js": "^1.6.11"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {}
|