@abaplint/cli 2.98.2 → 2.99.0
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 +30 -8
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -1248,7 +1248,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
1248
1248
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1249
1249
|
|
|
1250
1250
|
"use strict";
|
|
1251
|
-
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./abstract_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./abstract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract.js\"), exports);\n__exportStar(__webpack_require__(/*! ./and_return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/and_return.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arith_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arrow_or_dash */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow_or_dash.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arrow */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow.js\"), exports);\n__exportStar(__webpack_require__(/*! ./assign_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/assign_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./association_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./block_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cast */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cast.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_final */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_final.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_friends.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_global.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./color */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/color.js\"), exports);\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare_single */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_single.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./concatenated_constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/concatenated_constant.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_field_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_string.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js\"), exports);\n__exportStar(__webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/conv_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./data_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./database_connection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_connection.js\"), exports);\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decimals */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/decimals.js\"), exports);\n__exportStar(__webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/default.js\"), exports);\n__exportStar(__webpack_require__(/*! ./definition_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/definition_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dereference.js\"), exports);\n__exportStar(__webpack_require__(/*! ./destination */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/destination.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dynamic */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./entity_association */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/entity_association.js\"), exports);\n__exportStar(__webpack_require__(/*! ./entity_association */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/entity_association.js\"), exports);\n__exportStar(__webpack_require__(/*! ./event_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_handler.js\"), exports);\n__exportStar(__webpack_require__(/*! ./event_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exception_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/exception_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_all */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_all.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_assignment */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_assignment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_offset.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/filter_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./final_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/final_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./find_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/find_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./for */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/for.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_raising.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_using.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fstarget */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/fstarget.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_exporting_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting_parameter.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./include_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/include_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_field_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_loop_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_loop_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inlinedata */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinedata.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inlinefs */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinefs.js\"), exports);\n__exportStar(__webpack_require__(/*! ./integer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/integer.js\"), exports);\n__exportStar(__webpack_require__(/*! ./interface_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/interface_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./kernel_id */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/kernel_id.js\"), exports);\n__exportStar(__webpack_require__(/*! ./language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/language.js\"), exports);\n__exportStar(__webpack_require__(/*! ./length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./let */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/let.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by_component */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_component.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./macro_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/macro_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_class */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_type_and_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_type_and_number.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_importing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_importing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_raising.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_returning.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param_optional */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_optional.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/modif.js\"), exports);\n__exportStar(__webpack_require__(/*! ./namespace_simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/namespace_simple_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./new_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/new_object.js\"), exports);\n__exportStar(__webpack_require__(/*! ./ole_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/ole_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./or */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/or.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_exception */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_exception.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_s.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_t.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_s.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_t.js\"), exports);\n__exportStar(__webpack_require__(/*! ./pass_by_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/pass_by_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_using.js\"), exports);\n__exportStar(__webpack_require__(/*! ./radio_group_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./raise_with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/raise_with.js\"), exports);\n__exportStar(__webpack_require__(/*! ./read_table_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/read_table_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./receive_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/receive_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./redefinition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/redefinition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_next */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js\"), exports);\n__exportStar(__webpack_require__(/*! ./report_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/report_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_field_chain2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain2.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source1.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source4.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_aggregation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_alias_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_arithmetics */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_as_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_client */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_and_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_and_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_list_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_for_all_entries */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_from_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_from */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_hints */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_in */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_in.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_into_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_path */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_up_to */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template_formatting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template.js\"), exports);\n__exportStar(__webpack_require__(/*! ./super_class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/super_class_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/switch_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_expression */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_expression.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./test_seam_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/test_seam_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_string.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element.js\"), exports);\n__exportStar(__webpack_require__(/*! ./throw */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/throw.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_name_or_infer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name_or_infer.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body_lines */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_lines.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./with_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/with_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./write_offset_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/write_offset_length.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js?");
|
|
1251
|
+
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./abstract_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./abstract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract.js\"), exports);\n__exportStar(__webpack_require__(/*! ./and_return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/and_return.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arith_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arrow_or_dash */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow_or_dash.js\"), exports);\n__exportStar(__webpack_require__(/*! ./arrow */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow.js\"), exports);\n__exportStar(__webpack_require__(/*! ./assign_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/assign_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./association_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./block_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cast */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cast.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_final */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_final.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_friends.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_global.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./color */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/color.js\"), exports);\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare_single */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_single.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./component_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_fields */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields.js\"), exports);\n__exportStar(__webpack_require__(/*! ./concatenated_constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/concatenated_constant.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_field_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_string.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js\"), exports);\n__exportStar(__webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/conv_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./data_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./database_connection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_connection.js\"), exports);\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./decimals */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/decimals.js\"), exports);\n__exportStar(__webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/default.js\"), exports);\n__exportStar(__webpack_require__(/*! ./definition_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/definition_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dereference.js\"), exports);\n__exportStar(__webpack_require__(/*! ./destination */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/destination.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dynamic */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./entity_association */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/entity_association.js\"), exports);\n__exportStar(__webpack_require__(/*! ./entity_association */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/entity_association.js\"), exports);\n__exportStar(__webpack_require__(/*! ./event_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_handler.js\"), exports);\n__exportStar(__webpack_require__(/*! ./event_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exception_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/exception_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_all */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_all.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_assignment */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_assignment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_offset.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_sub.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/filter_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./final_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/final_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./find_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/find_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./for */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/for.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_raising.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_using.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fstarget */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/fstarget.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_exporting_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting_parameter.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./include_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/include_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_field_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_loop_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_loop_definition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inlinedata */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinedata.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inlinefs */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinefs.js\"), exports);\n__exportStar(__webpack_require__(/*! ./integer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/integer.js\"), exports);\n__exportStar(__webpack_require__(/*! ./interface_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/interface_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./kernel_id */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/kernel_id.js\"), exports);\n__exportStar(__webpack_require__(/*! ./language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/language.js\"), exports);\n__exportStar(__webpack_require__(/*! ./length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./let */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/let.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by_component */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_component.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./loop_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./macro_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/macro_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_class */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_type_and_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_type_and_number.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_importing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_importing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_raising.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_returning.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param_optional */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_optional.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/modif.js\"), exports);\n__exportStar(__webpack_require__(/*! ./namespace_simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/namespace_simple_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./new_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/new_object.js\"), exports);\n__exportStar(__webpack_require__(/*! ./ole_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/ole_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./or */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/or.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_exception */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_exception.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_s.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_t.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_s.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_t.js\"), exports);\n__exportStar(__webpack_require__(/*! ./pass_by_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/pass_by_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_changing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./perform_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_using.js\"), exports);\n__exportStar(__webpack_require__(/*! ./radio_group_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./raise_with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/raise_with.js\"), exports);\n__exportStar(__webpack_require__(/*! ./read_table_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/read_table_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./receive_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/receive_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./redefinition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/redefinition.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_next */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js\"), exports);\n__exportStar(__webpack_require__(/*! ./report_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/report_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_field_chain2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain2.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source1.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source4.js\"), exports);\n__exportStar(__webpack_require__(/*! ./simple_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_aggregation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_alias_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_arithmetics */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_as_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_client */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_and_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_and_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_list_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_for_all_entries */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_from_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_from */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_hints */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_in */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_in.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_into_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_path */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_up_to */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template_formatting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_source.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template.js\"), exports);\n__exportStar(__webpack_require__(/*! ./super_class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/super_class_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/switch_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./table_expression */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_expression.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field_symbol.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field.js\"), exports);\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target.js\"), exports);\n__exportStar(__webpack_require__(/*! ./test_seam_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/test_seam_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_string.js\"), exports);\n__exportStar(__webpack_require__(/*! ./text_element */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element.js\"), exports);\n__exportStar(__webpack_require__(/*! ./throw */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/throw.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_name_or_infer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name_or_infer.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_param.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body_lines */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_lines.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body.js\"), exports);\n__exportStar(__webpack_require__(/*! ./value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./with_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/with_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./write_offset_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/write_offset_length.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js?");
|
|
1252
1252
|
|
|
1253
1253
|
/***/ }),
|
|
1254
1254
|
|
|
@@ -1919,7 +1919,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
1919
1919
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1920
1920
|
|
|
1921
1921
|
"use strict";
|
|
1922
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Select = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\");\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\");\nconst sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js\");\nclass Select extends combi_1.Expression {\n getRunnable() {\n const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure);\n const where = (0, combi_1.seq)(\"WHERE\", _1.SQLCond);\n const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)(\"OFFSET\", _1.SQLSource));\n const bypass = (0, combi_1.str)(\"BYPASSING BUFFER\");\n const fields = (0, combi_1.ver)(version_1.Version.v750,
|
|
1922
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Select = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\");\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\");\nconst sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js\");\nclass Select extends combi_1.Expression {\n getRunnable() {\n const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure);\n const where = (0, combi_1.seq)(\"WHERE\", _1.SQLCond);\n const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)(\"OFFSET\", _1.SQLSource));\n const bypass = (0, combi_1.str)(\"BYPASSING BUFFER\");\n const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);\n const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);\n const permSingle = (0, combi_1.per)(_1.SQLFrom, sql_into_structure_1.SQLIntoStructure, where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);\n const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));\n const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));\n const single = (0, combi_1.seq)(\"SINGLE\", (0, combi_1.optPrio)(\"FOR UPDATE\"), fieldList, permSingle);\n const other = (0, combi_1.seq)((0, combi_1.optPrio)(\"DISTINCT\"), fieldList, perm);\n const ret = (0, combi_1.seq)(\"SELECT\", (0, combi_1.altPrio)(single, other), (0, combi_1.optPrio)(_1.SQLHints));\n return ret;\n }\n}\nexports.Select = Select;\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js?");
|
|
1923
1923
|
|
|
1924
1924
|
/***/ }),
|
|
1925
1925
|
|
|
@@ -1930,7 +1930,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
1930
1930
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1931
1931
|
|
|
1932
1932
|
"use strict";
|
|
1933
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SelectLoop = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst sql_order_by_1 = __webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\");\nconst sql_having_1 = __webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\");\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\nconst
|
|
1933
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SelectLoop = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst sql_order_by_1 = __webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\");\nconst sql_having_1 = __webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\");\nconst sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\");\nconst sql_hints_1 = __webpack_require__(/*! ./sql_hints */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js\");\nconst sql_field_list_loop_1 = __webpack_require__(/*! ./sql_field_list_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list_loop.js\");\nconst sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js\");\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nclass SelectLoop extends combi_1.Expression {\n getRunnable() {\n const where = (0, combi_1.seq)(\"WHERE\", _1.SQLCond);\n const bypass = \"BYPASSING BUFFER\";\n const pack = (0, combi_1.seq)(\"PACKAGE SIZE\", _1.SQLSource);\n const tab = (0, combi_1.seq)(_1.SQLIntoTable, (0, combi_1.alt)(pack, (0, combi_1.seq)(_1.SQLFrom, pack), (0, combi_1.seq)(pack, _1.SQLFrom)));\n const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);\n const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, packTab));\n const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields), where, sql_into_structure_1.SQLIntoStructure, sql_up_to_1.SQLUpTo);\n const ret = (0, combi_1.seq)(\"SELECT\", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)(\"DISTINCT\"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict), (0, combi_1.optPrio)(sql_hints_1.SQLHints));\n return ret;\n }\n}\nexports.SelectLoop = SelectLoop;\n//# sourceMappingURL=select_loop.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select_loop.js?");
|
|
1934
1934
|
|
|
1935
1935
|
/***/ }),
|
|
1936
1936
|
|
|
@@ -2220,6 +2220,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
2220
2220
|
|
|
2221
2221
|
/***/ }),
|
|
2222
2222
|
|
|
2223
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields.js":
|
|
2224
|
+
/*!*******************************************************************************************!*\
|
|
2225
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields.js ***!
|
|
2226
|
+
\*******************************************************************************************/
|
|
2227
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2228
|
+
|
|
2229
|
+
"use strict";
|
|
2230
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SQLFields = void 0;\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nclass SQLFields extends combi_1.Expression {\n getRunnable() {\n return (0, combi_1.seq)(\"FIELDS\", _1.SQLFieldList);\n }\n}\nexports.SQLFields = SQLFields;\n//# sourceMappingURL=sql_fields.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields.js?");
|
|
2231
|
+
|
|
2232
|
+
/***/ }),
|
|
2233
|
+
|
|
2223
2234
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js":
|
|
2224
2235
|
/*!****************************************************************************************************!*\
|
|
2225
2236
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js ***!
|
|
@@ -11269,7 +11280,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
11269
11280
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11270
11281
|
|
|
11271
11282
|
"use strict";
|
|
11272
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MIMEObject = void 0;\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\nclass MIMEObject extends _abstract_object_1.AbstractObject {\n getType() {\n return \"SMIM\";\n }\n getURL() {\n var _a;\n this.parse();\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.URL;\n }\n getClass() {\n var _a;\n this.parse();\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.CLASS;\n }\n getAllowedNaming() {\n return {\n maxLength: 32,\n allowNamespace: false,\n };\n }\n getDataFile() {\n const main = this.getXMLFile();\n for (const f of this.getFiles()) {\n if (f.getFilename() !== (main === null || main === void 0 ? void 0 : main.getFilename())) {\n return f;\n }\n }\n return undefined;\n }\n setDirty() {\n this.parsedXML = undefined;\n super.setDirty();\n }\n getDescription() {\n // this object type does not have a description\n return undefined;\n }\n parse() {\n if (this.parsedXML) {\n return { updated: false, runtime: 0 };\n }\n const start = Date.now();\n this.parsedXML = {};\n const parsed = super.parseRaw2();\n if (parsed === undefined\n || parsed.abapGit === undefined\n || parsed.abapGit[\"asx:abap\"][\"asx:values\"] === undefined) {\n return { updated: false, runtime: 0 };\n }\n this.parsedXML.URL = parsed.abapGit[\"asx:abap\"][\"asx:values\"].URL;\n this.parsedXML.CLASS = parsed.abapGit[\"asx:abap\"][\"asx:values\"].CLASS;\n const end = Date.now();\n return { updated: true, runtime: end - start };\n }\n}\nexports.MIMEObject = MIMEObject;\n//# sourceMappingURL=mime_object.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/mime_object.js?");
|
|
11283
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MIMEObject = void 0;\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\nclass MIMEObject extends _abstract_object_1.AbstractObject {\n getType() {\n return \"SMIM\";\n }\n getURL() {\n var _a;\n this.parse();\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.URL;\n }\n getClass() {\n var _a;\n this.parse();\n return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.CLASS;\n }\n isFolder() {\n var _a;\n return ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.FOLDER) === \"X\";\n }\n getAllowedNaming() {\n return {\n maxLength: 32,\n allowNamespace: false,\n };\n }\n getDataFile() {\n const main = this.getXMLFile();\n for (const f of this.getFiles()) {\n if (f.getFilename() !== (main === null || main === void 0 ? void 0 : main.getFilename())) {\n return f;\n }\n }\n return undefined;\n }\n setDirty() {\n this.parsedXML = undefined;\n super.setDirty();\n }\n getDescription() {\n // this object type does not have a description\n return undefined;\n }\n parse() {\n if (this.parsedXML) {\n return { updated: false, runtime: 0 };\n }\n const start = Date.now();\n this.parsedXML = {};\n const parsed = super.parseRaw2();\n if (parsed === undefined\n || parsed.abapGit === undefined\n || parsed.abapGit[\"asx:abap\"][\"asx:values\"] === undefined) {\n return { updated: false, runtime: 0 };\n }\n this.parsedXML.URL = parsed.abapGit[\"asx:abap\"][\"asx:values\"].URL;\n this.parsedXML.CLASS = parsed.abapGit[\"asx:abap\"][\"asx:values\"].CLASS;\n this.parsedXML.FOLDER = parsed.abapGit[\"asx:abap\"][\"asx:values\"].FOLDER;\n const end = Date.now();\n return { updated: true, runtime: end - start };\n }\n}\nexports.MIMEObject = MIMEObject;\n//# sourceMappingURL=mime_object.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/mime_object.js?");
|
|
11273
11284
|
|
|
11274
11285
|
/***/ }),
|
|
11275
11286
|
|
|
@@ -11841,7 +11852,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
11841
11852
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11842
11853
|
|
|
11843
11854
|
"use strict";
|
|
11844
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.98.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?");
|
|
11855
|
+
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.99.0\";\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?");
|
|
11845
11856
|
|
|
11846
11857
|
/***/ }),
|
|
11847
11858
|
|
|
@@ -12314,7 +12325,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
12314
12325
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12315
12326
|
|
|
12316
12327
|
"use strict";
|
|
12317
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Downport = exports.DownportConf = void 0;\n/* eslint-disable max-len */\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\n// todo: refactor each sub-rule to new classes?\n// todo: add configuration\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\n}\nexports.DownportConf = DownportConf;\nclass SkipToNextFile extends Error {\n constructor(issue) {\n super();\n this.issue = issue;\n }\n}\nclass SpagHelper {\n constructor(spag) {\n this.spag = spag;\n }\n renameVariable(oldName, pos, lowFile, newName) {\n let fix = undefined;\n const references = this.findReferences(oldName, pos);\n references.sort((a, b) => {\n if (a.start.equals(b.start)) {\n return 0;\n }\n return a.start.isAfter(b.start) ? 1 : -1;\n });\n for (const r of references) {\n const replace = edit_helper_1.EditHelper.replaceRange(lowFile, r.start, r.end, newName);\n if (fix === undefined) {\n fix = replace;\n }\n else {\n fix = edit_helper_1.EditHelper.merge(replace, fix);\n }\n }\n return fix;\n }\n findReferences(name, pos) {\n var _a, _b;\n const positions = [];\n function has(element) {\n return positions.some(a => a.start.equals(element.start));\n }\n for (const r of this.spag.getData().references) {\n if (((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.getName()) === name && ((_b = r.resolved) === null || _b === void 0 ? void 0 : _b.getStart().equals(pos))) {\n const sub = {\n start: r.position.getStart(),\n end: r.position.getEnd(),\n };\n if (has(sub) === false) {\n positions.push(sub);\n }\n }\n }\n for (const child of this.spag.getChildren()) {\n const subPositions = new SpagHelper(child).findReferences(name, pos);\n for (const sub of subPositions) {\n if (has(sub) === false) {\n positions.push(sub);\n }\n }\n }\n return positions;\n }\n findRecursiveDuplicate(name, skip) {\n var _a;\n const found = this.spag.findVariable(name);\n if ((found === null || found === void 0 ? void 0 : found.getStart().equals(skip)) === false) {\n return found;\n }\n for (const child of ((_a = this.spag) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\n const sub = new SpagHelper(child).findRecursiveDuplicate(name, skip);\n if (sub) {\n return sub;\n }\n }\n return undefined;\n }\n isDuplicateName(name, pos) {\n let parent = this.spag.getParent();\n while ((parent === null || parent === void 0 ? void 0 : parent.getIdentifier().stype) === _scope_type_1.ScopeType.Let\n || (parent === null || parent === void 0 ? void 0 : parent.getIdentifier().stype) === _scope_type_1.ScopeType.For) {\n parent = parent.getParent();\n }\n if (parent === undefined) {\n return undefined;\n }\n return new SpagHelper(parent).findRecursiveDuplicate(name, pos) !== undefined;\n }\n}\nclass Downport {\n constructor() {\n this.conf = new DownportConf();\n }\n getMetadata() {\n return {\n key: \"downport\",\n title: \"Downport statement\",\n shortDescription: `Downport functionality`,\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\r\na higher level language version. If successful, various rules are applied to downport the statement.\r\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\r\n\r\nCurrent rules:\r\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\r\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\r\n* FIELD-SYMBOL() definitions are outlined\r\n* CONV is outlined\r\n* COND is outlined\r\n* REDUCE is outlined\r\n* SWITCH is outlined\r\n* FILTER is outlined\r\n* APPEND expression is outlined\r\n* INSERT expression is outlined\r\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\r\n* CAST changed to ?=\r\n* LOOP AT method_call( ) is outlined\r\n* VALUE # with structure fields\r\n* VALUE # with internal table lines\r\n* Table Expressions are outlined\r\n* SELECT INTO @DATA definitions are outlined\r\n* Some occurrences of string template formatting option ALPHA changed to function module call\r\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\r\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\r\n* RAISE EXCEPTION ... MESSAGE\r\n* Moving with +=, -=, /=, *=, &&= is expanded\r\n* line_exists and line_index is downported to READ TABLE\r\n* ENUMs, but does not nessesarily give the correct type and value\r\n* MESSAGE with non simple source\r\n\r\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\n tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\n };\n }\n getConfig() {\n return this.conf;\n }\n setConfig(conf) {\n this.conf = conf;\n }\n initialize(reg) {\n this.lowReg = reg;\n const version = this.lowReg.getConfig().getVersion();\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\n this.initHighReg();\n }\n return this;\n }\n listMainForInclude(filename) {\n if (filename === undefined) {\n return [];\n }\n // only initialize this.graph if needed\n if (this.graph === undefined) {\n this.graph = new include_graph_1.IncludeGraph(this.lowReg);\n }\n return this.graph.listMainForInclude(filename);\n }\n containsError(highObj) {\n for (const file of highObj.getABAPFiles()) {\n for (const statement of file.getStatements()) {\n if (statement.get() instanceof _statement_1.Unknown) {\n return true; // contains parser errors\n }\n }\n if (file.getStructure() === undefined) {\n return true;\n }\n }\n return false;\n }\n run(lowObj) {\n var _a;\n const ret = [];\n this.counter = 1;\n const version = this.lowReg.getConfig().getVersion();\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\n return ret;\n }\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\n return ret;\n }\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\n return ret;\n }\n let highSyntaxObj = highObj;\n if (this.containsError(highObj)) {\n return ret;\n }\n // for includes do the syntax check via a main program\n if (lowObj instanceof objects_1.Program && lowObj.isInclude()) {\n const mains = this.listMainForInclude((_a = lowObj.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getFilename());\n if (mains.length <= 0) {\n return [];\n }\n const f = this.highReg.getFileByName(mains[0]);\n if (f === undefined) {\n return [];\n }\n highSyntaxObj = this.highReg.findObjectForFile(f);\n }\n for (const lowFile of lowObj.getABAPFiles()) {\n let highSyntax = undefined;\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\n if (highFile === undefined) {\n continue;\n }\n const lowStatements = lowFile.getStatements();\n const highStatements = highFile.getStatements();\n if (lowStatements.length !== highStatements.length) {\n // after applying a fix, there might be more statements in lowFile\n // should highReg be initialized again?\n /*\n const message = \"Internal Error: Statement lengths does not match\";\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\n */\n // hmm, add some way to disable lazyUnknown() in statement_parser.ts\n // alternatively explicit enable it in vscode, its only relevant when a user is\n // actively editing the files\n continue;\n }\n if (highSyntax === undefined) {\n highSyntax = new syntax_1.SyntaxLogic(this.highReg, highSyntaxObj).run();\n }\n let containsUnknown = false;\n for (let i = 0; i < lowStatements.length; i++) {\n const low = lowStatements[i];\n const high = highStatements[i];\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\n || high.findFirstExpression(Expressions.InlineData)) {\n containsUnknown = true;\n try {\n const issue = this.checkStatement(low, high, lowFile, highSyntax, highFile);\n if (issue) {\n ret.push(issue);\n }\n }\n catch (e) {\n if (e instanceof SkipToNextFile) {\n ret.push(e.issue);\n break;\n }\n else {\n throw e;\n }\n }\n }\n }\n if (ret.length === 0 && containsUnknown) {\n // this is a hack in order not to change too many unit tests\n for (let i = 0; i < lowStatements.length; i++) {\n const high = highStatements[i];\n if (high.get() instanceof Statements.Data) {\n const issue = this.anonymousTableType(high, lowFile, highSyntax);\n if (issue) {\n ret.push(issue);\n }\n }\n }\n }\n else if (ret.length === 0 && / xsdbool\\(/i.test(lowFile.getRaw())) {\n for (let i = 0; i < lowStatements.length; i++) {\n const high = highStatements[i];\n const issue = this.replaceXsdBool(high, lowFile, highSyntax);\n if (issue) {\n ret.push(issue);\n break;\n }\n }\n }\n }\n return ret;\n }\n ////////////////////\n /** clones the orginal repository into highReg, and parses it with higher language version */\n initHighReg() {\n // use default configuration, ie. default target version\n const highConfig = config_1.Config.getDefault().get();\n const lowConfig = this.lowReg.getConfig().get();\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\n this.highReg = new registry_1.Registry();\n for (const o of this.lowReg.getObjects()) {\n for (const f of o.getFiles()) {\n if (this.lowReg.isDependency(o) === true) {\n this.highReg.addDependency(f);\n }\n else {\n this.highReg.addFile(f);\n }\n }\n }\n this.highReg.parse();\n }\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\n checkStatement(low, high, lowFile, highSyntax, highFile) {\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\n return undefined;\n }\n // downport XSDBOOL() early, as it is valid 702 syntax\n let found = this.replaceXsdBool(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportEnum(low, high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.partiallyImplemented(high, lowFile);\n if (found) {\n return found;\n }\n found = this.raiseException(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.emptyKey(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.stringTemplateAlpha(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.moveWithOperator(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.moveWithSimpleValue(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.assignWithTable(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.downportRefSimple(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportCorrespondingSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.downportRef(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportLoopGroup(high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.callFunctionParameterSimple(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.moveWithTableTarget(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineLoopInput(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n let skipValue = false;\n let skipReduce = false;\n const valueBody = high.findFirstExpression(Expressions.ValueBody);\n const reduceBody = high.findFirstExpression(Expressions.ReduceBody);\n if (valueBody && reduceBody) {\n const valueToken = valueBody.getFirstToken();\n const reduceToken = reduceBody.getFirstToken();\n if (valueToken.getStart().isBefore(reduceToken.getStart())) {\n skipReduce = true;\n }\n else {\n skipValue = true;\n }\n }\n if (skipValue !== true) {\n found = this.outlineValue(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n }\n if (skipReduce !== true) {\n found = this.outlineReduce(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n }\n found = this.outlineSwitch(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineFilter(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCast(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineConv(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCond(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCatchSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineGetReferenceSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineDataSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineData(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineFS(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.newToCreateObject(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceLineFunctions(high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.getReference(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceContains(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceMethodConditional(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceTableExpression(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceInsertExpression(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportMessage(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n return undefined;\n }\n //////////////////////////////////////////\n downportSQLExtras(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Select)\n && !(high.get() instanceof Statements.SelectLoop)\n && !(high.get() instanceof Statements.UpdateDatabase)\n && !(high.get() instanceof Statements.ModifyDatabase)\n && !(high.get() instanceof Statements.DeleteDatabase)\n && !(high.get() instanceof Statements.InsertDatabase)) {\n return undefined;\n }\n let fix = undefined;\n const addFix = (token) => {\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\n if (fix === undefined) {\n fix = add;\n }\n else {\n fix = edit_helper_1.EditHelper.merge(fix, add);\n }\n };\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\n high.findAllExpressionsRecursive(Expressions.SQLSource),\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\n for (const c of candidates.reverse()) {\n if (c.getFirstToken() instanceof tokens_1.WAt\n || c.getFirstToken() instanceof tokens_1.At) {\n const tokens = c.getAllTokens();\n if (tokens[1] instanceof tokens_1.ParenLeftW && tokens[tokens.length - 1] instanceof tokens_1.WParenRightW) {\n const source = c.findDirectExpression(Expressions.Source);\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA(${uniqueName}) = ${source === null || source === void 0 ? void 0 : source.concatTokens()}.\\n`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, c.getFirstToken().getStart(), c.getLastToken().getEnd(), \"@\" + uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, outline complex @\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n addFix(c.getFirstToken());\n }\n }\n }\n for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {\n for (const token of fieldList.getDirectTokens()) {\n if (token.getStr() === \",\") {\n addFix(token);\n }\n }\n }\n if (fix !== undefined) {\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove @ and ,\", this.getMetadata().key, this.conf.severity, fix);\n }\n for (const c of high.findAllExpressionsRecursive(Expressions.SQLIn)) {\n const children = c.getChildren();\n const first = children[1];\n if (!(first.get() instanceof tokens_1.WParenLeftW)) {\n continue;\n }\n const last = children[children.length - 1];\n if (last.get() instanceof tokens_1.WParenRightW || last.get() instanceof tokens_1.WParenRight) {\n const firstEnd = first.getFirstToken().getEnd();\n const endDelete = new position_1.Position(firstEnd.getRow(), firstEnd.getCol() + 1);\n const fix1 = edit_helper_1.EditHelper.deleteRange(lowFile, firstEnd, endDelete);\n const lastStart = last.getFirstToken().getStart();\n const startDelete = new position_1.Position(lastStart.getRow(), lastStart.getCol() - 1);\n const fix2 = edit_helper_1.EditHelper.deleteRange(lowFile, startDelete, lastStart);\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove spaces\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n downportSelectInline(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Select) && !(high.get() instanceof Statements.SelectLoop)) {\n return undefined;\n }\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n return undefined;\n }\n downportSelectSingleInline(low, high, lowFile, _highSyntax) {\n var _a, _b, _c, _d;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\n if (targets.length !== 1) {\n return undefined;\n }\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\n if (inlineData === undefined) {\n return undefined;\n }\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\n if (sqlFrom.length !== 1) {\n return undefined;\n }\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (tableName === undefined) {\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let fieldList = high.findFirstExpression(Expressions.SQLFieldList);\n if (fieldList === undefined) {\n fieldList = high.findFirstExpression(Expressions.SQLFieldListLoop);\n }\n if (fieldList === undefined) {\n return undefined;\n }\n let fieldDefinition = \"\";\n const fields = fieldList.findAllExpressions(Expressions.SQLFieldName);\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\n if (fields.length === 1) {\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\n }\n else if (fieldList.concatTokens() === \"*\") {\n fieldDefinition = `DATA ${name} TYPE ${tableName}.`;\n }\n else if (fieldList.concatTokens().toUpperCase() === \"COUNT( * )\") {\n fieldDefinition = `DATA ${name} TYPE i.`;\n }\n else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {\n const c = fieldList.getChildren()[0];\n if (c instanceof nodes_1.ExpressionNode) {\n const concat = (_d = c.findFirstExpression(Expressions.SQLArithmetics)) === null || _d === void 0 ? void 0 : _d.concatTokens();\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${concat}.`;\n }\n }\n else {\n for (const f of fields) {\n const fieldName = f.concatTokens();\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\n }\n fieldDefinition = `DATA: BEGIN OF ${name},\r\n${fieldDefinition}${indentation} END OF ${name}.`;\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\r\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportSelectTableInline(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\n if (targets.length !== 1) {\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\n if (inlineData === undefined) {\n return undefined;\n }\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\n if (sqlFrom.length === 0) {\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Error outlining, sqlFrom not found\", this.getMetadata().key, this.conf.severity);\n }\n let tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (tableName === undefined) {\n return undefined;\n }\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\n if (fieldList === undefined) {\n return undefined;\n }\n let fieldDefinitions = \"\";\n for (const f of fieldList.findAllExpressions(Expressions.SQLFieldName)) {\n let fieldName = f.concatTokens();\n if (fieldName.includes(\"~\")) {\n const split = fieldName.split(\"~\");\n tableName = split[0];\n fieldName = split[1];\n }\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\n let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\r\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\r\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\r\n${indentation}`);\n if (fieldDefinitions === \"\") {\n fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.\r\n${indentation}`);\n }\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n // the anonymous type minght be used in inferred type statements, define it so it can be referred\n anonymousTableType(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.Data)) {\n return undefined;\n }\n const tt = high.findFirstExpression(Expressions.TypeTable);\n if (tt === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `TYPES ${uniqueName} ${tt.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, tt.getFirstToken().getStart(), tt.getLastToken().getEnd(), \"TYPE \" + uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Add type for table definition\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportMessage(high, lowFile, highSyntax) {\n var _a, _b;\n if (!(high.get() instanceof Statements.Message)) {\n return undefined;\n }\n const foundWith = high.findExpressionAfterToken(\"WITH\");\n if (foundWith === undefined) {\n return undefined;\n }\n const likeSource = high.findExpressionAfterToken(\"LIKE\");\n for (const s of high.findAllExpressions(Expressions.Source)) {\n if (s === likeSource) {\n continue;\n }\n else if (s.getChildren().length === 1 && ((_a = s.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Constant) {\n continue;\n }\n else if (s.getChildren().length === 1 && ((_b = s.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain) {\n continue;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Refactor MESSAGE WITH source\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceAppendExpression(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.Append)) {\n return undefined;\n }\n const children = high.getChildren();\n if (children[1].get() instanceof Expressions.Source) {\n const source = children[1];\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceInsertExpression(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.InsertInternal)) {\n return undefined;\n }\n const children = high.getChildren();\n if (children[1].get() instanceof Expressions.Source) {\n const source = children[1];\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline INSERT source expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceTableExpression(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const fieldChain of high.findAllExpressionsRecursive(Expressions.FieldChain)) {\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\n if (tableExpression === undefined) {\n continue;\n }\n const concat = high.concatTokens().toUpperCase();\n if (concat.includes(\" LINE_EXISTS( \") || concat.includes(\" LINE_INDEX( \")) {\n // note: line_exists() must be replaced before handling table expressions\n continue;\n }\n let pre = \"\";\n let startToken = undefined;\n for (const child of fieldChain.getChildren()) {\n if (startToken === undefined) {\n startToken = child.getFirstToken();\n }\n else if (child === tableExpression) {\n break;\n }\n pre += child.concatTokens();\n }\n if (startToken === undefined) {\n continue;\n }\n const condition = this.tableCondition(tableExpression);\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n // note that the tabix restore should be done before throwing the exception\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\r\n${indentation}DATA ${tabixBackup} LIKE sy-tabix.\r\n${indentation}${tabixBackup} = sy-tabix.\r\n${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.\r\n${indentation}sy-tabix = ${tabixBackup}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n tableCondition(tableExpression) {\n let condition = \"\";\n let keyName = \"\";\n for (const c of tableExpression.getChildren() || []) {\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\n continue;\n }\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\n if (keyName === \"\") {\n condition = \"WITH KEY \";\n }\n else {\n condition = \"WITH TABLE KEY \" + keyName + \" COMPONENTS \";\n }\n }\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\n condition = \"INDEX \";\n }\n else if (c instanceof nodes_1.TokenNode && c.getFirstToken().getStr().toUpperCase() === \"KEY\") {\n continue;\n }\n else if (c.get() instanceof Expressions.SimpleName) {\n keyName = c.concatTokens();\n continue;\n }\n condition += c.concatTokens() + \" \";\n }\n return condition;\n }\n outlineCatchSimple(node, lowFile) {\n // outlines \"CATCH cx_bcs INTO DATA(lx_bcs_excep).\", note that this does not need to look at types\n var _a, _b;\n if (!(node.get() instanceof Statements.Catch)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n const classNames = node.findDirectExpressions(Expressions.ClassName);\n if (classNames.length !== 1) {\n return undefined;\n }\n const className = classNames[0].concatTokens();\n const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const code = ` DATA ${targetName} TYPE REF TO ${className}.\r\n${indentation}CATCH ${className} INTO ${targetName}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineGetReferenceSimple(node, lowFile) {\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.GetReference)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n const source = node.findFirstExpression(Expressions.Source);\n if (!(((_b = source === null || source === void 0 ? void 0 : source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\n return undefined;\n }\n const targetName = ((_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"errorError\";\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const firstToken = target.getFirstToken();\n const lastToken = target.getLastToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getStart(), `DATA ${targetName} LIKE REF TO ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineDataSimple(node, lowFile) {\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.Move)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n let type = \"\";\n const source = node.findFirstExpression(Expressions.Source);\n if (source === undefined) {\n return undefined;\n }\n else if (source.getChildren().length !== 1) {\n return undefined;\n }\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.FieldLength)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.TableExpression)) {\n const chain = source.findDirectExpression(Expressions.FieldChain);\n if (chain !== undefined\n && chain.getChildren().length === 2\n && chain.getChildren()[0].get() instanceof Expressions.SourceField\n && chain.getChildren()[1].get() instanceof Expressions.TableExpression) {\n type = \"LINE OF \" + chain.getChildren()[0].concatTokens();\n }\n else {\n return undefined;\n }\n }\n else {\n type = source.concatTokens();\n }\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const firstToken = node.getFirstToken();\n const lastToken = node.getLastToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${type}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n partiallyImplemented(node, lowFile) {\n if (node.get() instanceof Statements.InterfaceDef) {\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\n if (partially === undefined) {\n return undefined;\n }\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\n if (implemented === undefined) {\n return undefined;\n }\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n raiseException(node, lowFile, highSyntax) {\n /*\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\n \n DATA foo LIKE if_t100_message=>t100key.\n foo-msgid = 'ZHVAM'.\n foo-msgno = '001'.\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n DATA bar TYPE REF TO zcl_hvam_exception.\n CREATE OBJECT bar EXPORTING textid = foo.\n bar->if_t100_dyn_msg~msgty = 'E'.\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\n RAISE EXCEPTION bar.\n */\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.Raise)) {\n return undefined;\n }\n let id = undefined;\n let number = undefined;\n let startToken = node.findDirectTokenByText(\"ID\");\n if (startToken) {\n const sources = node.findDirectExpressions(Expressions.Source);\n id = sources[0].concatTokens();\n const numberExpression = node.findExpressionAfterToken(\"NUMBER\");\n if (numberExpression === undefined) {\n throw \"downport raiseException, could not find number\";\n }\n number = numberExpression.concatTokens();\n if (numberExpression.get() instanceof Expressions.MessageNumber) {\n number = \"'\" + number + \"'\";\n }\n }\n else {\n const s = node.findDirectExpression(Expressions.MessageSource);\n if (s === undefined) {\n return undefined;\n }\n id = \"'\" + ((_a = s.findDirectExpression(Expressions.MessageClass)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"'\";\n number = \"'\" + ((_b = s.findDirectExpression(Expressions.MessageTypeAndNumber)) === null || _b === void 0 ? void 0 : _b.concatTokens().substring(1)) + \"'\";\n startToken = node.getFirstToken();\n }\n const className = ((_c = node.findDirectExpression(Expressions.ClassName)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"ERROR\";\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\r\n${indentation}${uniqueName1}-msgid = ${id === null || id === void 0 ? void 0 : id.toUpperCase()}.\r\n${indentation}${uniqueName1}-msgno = ${number}.\r\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\r\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\r\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\n }\n emptyKey(low, node, lowFile) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\n const key = i.findDirectExpression(Expressions.TypeTableKey);\n if (key === undefined) {\n continue;\n }\n i = key;\n const concat = i.concatTokens();\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\n continue;\n }\n const token = i.findDirectTokenByText(\"EMPTY\");\n if (token === undefined) {\n continue;\n }\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n callFunctionParameterSimple(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.CallFunction)) {\n return undefined;\n }\n let found = undefined;\n for (const p of high.findAllExpressions(Expressions.FunctionExportingParameter)) {\n found = p.findDirectExpression(Expressions.Source);\n if (found && (found.findDirectExpression(Expressions.FieldChain)\n || found.findDirectExpression(Expressions.Constant)\n || found.findDirectExpression(Expressions.TextElement))) {\n // its actually simple, ok\n found = undefined;\n }\n else if (found !== undefined) {\n break;\n }\n }\n if (found === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${found.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, call function parameter\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportCorrespondingSimple(high, lowFile) {\n var _a, _b;\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4\n || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== \"CORRESPONDING\") {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.CorrespondingBody);\n if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1) {\n const code = `MOVE-CORRESPONDING ${sourceRef.concatTokens()} TO ${target.concatTokens()}`;\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple CORRESPONDING move\", this.getMetadata().key, this.conf.severity, fix);\n }\n else if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 5 && ((_b = sourceRef.getFirstChild()) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase()) === \"BASE\") {\n let code = `${target.concatTokens()} = ${sourceRef.getChildren()[2].concatTokens()}.\\n`;\n code += `MOVE-CORRESPONDING ${sourceRef.getChildren()[4].concatTokens()} TO ${target.concatTokens()}`;\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, CORRESPONDING BASE move\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n downportRefSimple(high, lowFile, highSyntax) {\n var _a;\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4\n || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== \"REF\") {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source);\n if (sourceRef === undefined\n || sourceRef.getChildren().length !== 1) {\n return undefined;\n }\n let code = \"\";\n if (sourceRef.findFirstExpression(Expressions.TableExpression)) {\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).\r\nIF sy-subrc <> 0.\r\n RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\nENDIF.\r\nGET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;\n }\n else {\n code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${target.concatTokens()}`;\n }\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple REF move\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportLoopGroup(high, lowFile, highSyntax, highFile) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n if (!(high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n const group = high.findDirectExpression(Expressions.LoopGroupBy);\n if (group === undefined) {\n return undefined;\n }\n const groupTargetName = ((_a = group.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.concatTokens())\n || ((_b = group.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _b === void 0 ? void 0 : _b.concatTokens().replace(\"<\", \"_\").replace(\">\", \"_\"))\n || \"nameNotFound\";\n const loopSourceName = ((_c = high.findFirstExpression(Expressions.SimpleSource2)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"nameNotFound\";\n const loopTargetName = ((_d = high.findFirstExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens())\n || ((_e = high.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens())\n || \"nameNotFound\";\n const groupTarget = ((_f = group.findDirectExpression(Expressions.LoopGroupByTarget)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || \"\";\n const isReference = (_g = high.findFirstExpression(Expressions.LoopTarget)) === null || _g === void 0 ? void 0 : _g.concatTokens().toUpperCase().startsWith(\"REFERENCE INTO \");\n let loopSourceRowType = \"typeNotFound\";\n const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());\n if (spag !== undefined) {\n const found = spag.findVariable(loopSourceName);\n const tt = found === null || found === void 0 ? void 0 : found.getType();\n if (tt instanceof basic_1.TableType) {\n loopSourceRowType = tt.getRowType().getQualifiedName() || \"typeNotFound\";\n }\n }\n let code = `TYPES: BEGIN OF ${groupTargetName}type,\\n`;\n let condition = \"\";\n let groupCountName = undefined;\n let groupIndexName = undefined;\n for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {\n const name = c.findFirstExpression(Expressions.ComponentName);\n let type = ((_h = c.findFirstExpression(Expressions.Source)) === null || _h === void 0 ? void 0 : _h.concatTokens()) || \"todo\";\n if ((_j = c.concatTokens()) === null || _j === void 0 ? void 0 : _j.toUpperCase().endsWith(\" = GROUP SIZE\")) {\n type = \"i\";\n groupCountName = name === null || name === void 0 ? void 0 : name.concatTokens();\n }\n else if ((_k = c.concatTokens()) === null || _k === void 0 ? void 0 : _k.toUpperCase().endsWith(\" = GROUP INDEX\")) {\n type = \"i\";\n groupIndexName = name === null || name === void 0 ? void 0 : name.concatTokens();\n }\n else {\n if (condition !== \"\") {\n condition += \" \";\n }\n condition += c.concatTokens();\n type = type.replace(loopTargetName, loopSourceRowType);\n type = type.replace(\"->\", \"-\");\n }\n code += ` ${name === null || name === void 0 ? void 0 : name.concatTokens()} TYPE ${type},\\n`;\n }\n const s = group.findDirectExpression(Expressions.Source);\n let singleName = \"\";\n if (s) {\n let type = s.concatTokens();\n type = type.replace(loopTargetName, loopSourceRowType);\n type = type.replace(\"->\", \"-\");\n singleName = s.concatTokens().split(\"-\")[1];\n code += ` ${singleName} TYPE ${type},\\n`;\n condition = singleName + \" = \" + s.concatTokens();\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code += ` items LIKE ${loopSourceName},\r\n END OF ${groupTargetName}type.\r\nDATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.\r\nDATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.\r\nLOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\\n`;\n if (groupIndexName !== undefined) {\n code += `DATA(${uniqueNameIndex}) = sy-tabix.\\n`;\n }\n code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.\r\nIF sy-subrc = 0.\\n`;\n if (groupCountName !== undefined) {\n code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\\n`;\n }\n code += ` INSERT ${loopTargetName}${isReference ? \"->*\" : \"\"} INTO TABLE <${uniqueFS}>-items.\r\nELSE.\\n`;\n code += ` CLEAR ${uniqueName}.\\n`;\n for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {\n const concat = c.concatTokens();\n // console.dir(concat);\n if (concat.endsWith(\" GROUP INDEX\")) {\n code += ` ${uniqueName}-${groupIndexName} = ${uniqueNameIndex}.\\n`;\n }\n else if (concat.endsWith(\" GROUP SIZE\")) {\n code += ` ${uniqueName}-${groupCountName} = 1.\\n`;\n }\n else {\n code += ` ${uniqueName}-${concat}.\\n`;\n }\n }\n if (singleName !== \"\") {\n code += ` ${uniqueName}-${singleName} = ${loopTargetName}-${singleName}.\\n`;\n }\n code += ` INSERT ${loopTargetName}${isReference ? \"->*\" : \"\"} INTO TABLE ${uniqueName}-items.\\n`;\n code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\\n`;\n code += `ENDIF.\r\nENDLOOP.\r\nLOOP AT ${groupTargetName}tab ${groupTarget}.`;\n let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {\n // make sure to find the correct/current loop statement\n if (l.findDirectStatement(Statements.Loop) !== high) {\n continue;\n }\n for (const loop of l.findAllStatements(Statements.Loop)) {\n if ((_o = loop.concatTokens()) === null || _o === void 0 ? void 0 : _o.toUpperCase().startsWith(\"LOOP AT GROUP \")) {\n const subLoopSource = loop.findFirstExpression(Expressions.SimpleSource2);\n if (subLoopSource === undefined) {\n continue;\n }\n const subLoopSourceName = (subLoopSource === null || subLoopSource === void 0 ? void 0 : subLoopSource.concatTokens()) || \"nameNotFound\";\n const subCode = `LOOP AT ${subLoopSourceName}${isReference ? \"->\" : \"-\"}items`;\n const subFix = edit_helper_1.EditHelper.replaceRange(lowFile, loop.getFirstToken().getStart(), subLoopSource.getLastToken().getEnd(), subCode);\n fix = edit_helper_1.EditHelper.merge(subFix, fix);\n }\n }\n }\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, LOOP GROUP\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportRef(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n let found = undefined;\n for (const s of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (s.getFirstToken().getStr().toUpperCase() === \"REF\"\n && s.findDirectExpression(Expressions.TypeNameOrInfer)) {\n found = s;\n }\n }\n if (found === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${found.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, REF\", this.getMetadata().key, this.conf.severity, fix);\n }\n assignWithTable(low, high, lowFile) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Assign)) {\n return undefined;\n }\n else if (high.getChildren().length !== 5) {\n return undefined;\n }\n const fieldChain = (_b = (_a = high.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.FieldChain);\n const tableExpression = fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getLastChild();\n if (tableExpression === undefined\n || !(tableExpression.get() instanceof Expressions.TableExpression)\n || !(tableExpression instanceof nodes_1.ExpressionNode)) {\n return undefined;\n }\n let condition = \"\";\n if (tableExpression.getChildren().length === 3) {\n const index = tableExpression.findDirectExpression(Expressions.Source);\n if (index === undefined) {\n return undefined;\n }\n condition = `INDEX ${index.concatTokens()}`;\n }\n else {\n let concat = tableExpression.concatTokens();\n concat = concat.substring(2);\n concat = concat.substring(0, concat.length - 2);\n condition = `WITH KEY ${concat}`;\n }\n let pre = \"\";\n for (const c of fieldChain.getChildren()) {\n if (c === tableExpression) {\n break;\n }\n pre += c.concatTokens();\n }\n const fsTarget = high.findDirectExpression(Expressions.FSTarget);\n const code = `READ TABLE ${pre} ${condition} ASSIGNING ${fsTarget === null || fsTarget === void 0 ? void 0 : fsTarget.concatTokens()}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, ASSIGN table expr\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithSimpleValue(low, high, lowFile) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4) {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const source = high.findDirectExpression(Expressions.Source);\n if (source === undefined) {\n return undefined;\n }\n const field = target.findDirectExpression(Expressions.TargetField);\n if (field === undefined) {\n return;\n }\n const valueBody = source.findDirectExpression(Expressions.ValueBody);\n if (valueBody === undefined) {\n return;\n }\n const fieldAssignments = valueBody.findDirectExpressions(Expressions.FieldAssignment);\n if (fieldAssignments.length === 0) {\n return;\n }\n else if (fieldAssignments.length !== valueBody.getChildren().length) {\n return;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let code = `CLEAR ${target.concatTokens()}.\\n`;\n for (const fieldAssignment of fieldAssignments) {\n code += indentation + target.concatTokens() + \"-\" + fieldAssignment.concatTokens() + `.\\n`;\n }\n code = code.trimEnd();\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple move\", this.getMetadata().key, this.conf.severity, fix);\n }\n // note, downporting ENUM does not give the correct types, but it will work in most cases?\n downportEnum(_low, high, lowFile, _highSyntax, highFile) {\n var _a, _b, _c, _d, _e;\n if (!(high.get() instanceof Statements.TypeEnumBegin)) {\n return undefined;\n }\n const enumStructure = (_a = highFile.getStructure()) === null || _a === void 0 ? void 0 : _a.findFirstStructure(Structures.TypeEnum);\n if (enumStructure === undefined) {\n return undefined;\n }\n if (enumStructure.getFirstStatement() !== high) {\n return undefined;\n }\n const enumName = (_b = high.findExpressionAfterToken(\"ENUM\")) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const structureName = (_c = high.findExpressionAfterToken(\"STRUCTURE\")) === null || _c === void 0 ? void 0 : _c.concatTokens();\n // all ENUMS are char like?\n let code = `TYPES ${enumName} TYPE string.\r\nCONSTANTS: BEGIN OF ${structureName},\\n`;\n let count = 1;\n for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {\n const name = (_d = e.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _d === void 0 ? void 0 : _d.concatTokens();\n let value = (_e = e.findFirstExpression(Expressions.Value)) === null || _e === void 0 ? void 0 : _e.concatTokens();\n if (value === undefined) {\n value = \"VALUE '\" + count++ + \"'\";\n }\n code += ` ${name} TYPE ${enumName} ${value},\\n`;\n }\n code += ` END OF ${structureName}.`;\n const start = enumStructure.getFirstToken().getStart();\n const end = enumStructure.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ENUM\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithTableTarget(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const tableExpression = target.findDirectExpression(Expressions.TableExpression);\n if (tableExpression === undefined) {\n return undefined;\n }\n const index = tableExpression.findDirectExpression(Expressions.Source);\n if (index === undefined) {\n return undefined;\n }\n let uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n uniqueName = `<${uniqueName}>`;\n const tName = target.concatTokens().split(\"[\")[0];\n const condition = this.tableCondition(tableExpression);\n const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n // restore tabix before exeption\n const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.\r\n${indentation}DATA ${tabixBackup} LIKE sy-tabix.\r\n${indentation}${tabixBackup} = sy-tabix.\r\n${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.\r\n${indentation}sy-tabix = ${tabixBackup}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}${uniqueName}`;\n const start = target.getFirstToken().getStart();\n const end = (_a = tableExpression.findDirectTokenByText(\"]\")) === null || _a === void 0 ? void 0 : _a.getEnd();\n if (end === undefined) {\n return undefined;\n }\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, move with table target\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithOperator(low, high, lowFile) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const children = high.getChildren();\n const secondChild = children[1];\n if (secondChild === undefined) {\n return undefined;\n }\n const op = secondChild.getFirstToken();\n let operator = \"\";\n switch (op.getStr()) {\n case \"+\":\n operator = \" + \";\n break;\n case \"-\":\n operator = \" - \";\n break;\n case \"/=\":\n operator = \" / \";\n break;\n case \"*=\":\n operator = \" * \";\n break;\n case \"&&=\":\n operator = \" && \";\n break;\n default:\n return undefined;\n }\n const target = (_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (target === undefined) {\n return;\n }\n const sourceStart = (_c = (_b = high.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStart();\n if (sourceStart === undefined) {\n return;\n }\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, \"= \" + target + operator);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Expand operator\", this.getMetadata().key, this.conf.severity, fix);\n }\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\n stringTemplateAlpha(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const topSource = high.findDirectExpression(Expressions.Source);\n if (topSource === undefined || topSource.getChildren().length !== 1) {\n return undefined;\n }\n let top = true;\n let child = topSource.getFirstChild();\n if (!(child.get() instanceof Expressions.StringTemplate)) {\n child = child.findFirstExpression(Expressions.StringTemplate);\n top = false;\n }\n if (child === undefined || !(child.get() instanceof Expressions.StringTemplate)) {\n return undefined;\n }\n const templateTokens = child.getChildren();\n if (templateTokens.length !== 3\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\n return undefined;\n }\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n let functionName = \"\";\n switch (formatting) {\n case \"ALPHA = IN\":\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\n break;\n case \"ALPHA = OUT\":\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\n break;\n default:\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const topTarget = (_c = high.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n if (top === false) {\n const code = `DATA ${uniqueName} TYPE string.\r\n${indentation}CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${uniqueName}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n const code = `CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${topTarget}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n outlineLoopInput(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n else if (high.findDirectExpression(Expressions.SimpleSource2)) {\n return undefined;\n }\n // the first Source must be outlined\n const s = high.findDirectExpression(Expressions.Source);\n if (s === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineLoopTarget(node, lowFile, highSyntax) {\n var _a, _b, _c, _d, _e, _f, _g;\n // also allows outlining of voided types\n if (!(node.get() instanceof Statements.Loop)) {\n return undefined;\n }\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (sourceName === undefined) {\n return undefined;\n }\n const concat = node.concatTokens().toUpperCase();\n if (concat.includes(\" GROUP BY \") || concat.startsWith(\"LOOP AT GROUP \")) {\n return undefined;\n }\n const isReference = concat.includes(\" REFERENCE INTO \");\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const dataTarget = (_c = (_b = node.findDirectExpression(Expressions.LoopTarget)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(Expressions.InlineData);\n if (dataTarget) {\n const targetName = ((_d = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || \"DOWNPORT_ERROR\";\n let code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\n if (isReference) {\n const likeName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code = `DATA ${likeName} LIKE LINE OF ${sourceName}.\\n${indentation}DATA ${targetName} LIKE REF TO ${likeName}.\\n${indentation}`;\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\n }\n const fsTarget = (_f = (_e = node.findDirectExpression(Expressions.LoopTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.FSTarget)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(Expressions.InlineFS);\n if (fsTarget) {\n const targetName = ((_g = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || \"DOWNPORT_ERROR\";\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineFor(forLoop, indentation, lowFile, highSyntax) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n let body = \"\";\n let end = \"\";\n const loopSource = (_a = forLoop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n let loopTargetFieldExpression = forLoop.findFirstExpression(Expressions.TargetField);\n let loopTargetFieldName = loopTargetFieldExpression === null || loopTargetFieldExpression === void 0 ? void 0 : loopTargetFieldExpression.concatTokens();\n const of = forLoop.findExpressionAfterToken(\"OF\");\n if (of !== undefined) {\n loopTargetFieldExpression = of;\n loopTargetFieldName = of === null || of === void 0 ? void 0 : of.concatTokens();\n }\n if (((_c = (_b = forLoop.findDirectExpression(Expressions.InlineLoopDefinition)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.get()) instanceof Expressions.TargetFieldSymbol) {\n loopTargetFieldExpression = undefined;\n loopTargetFieldName = undefined;\n }\n if (loopTargetFieldExpression) {\n const start = loopTargetFieldExpression.getFirstToken().getStart();\n const spag = highSyntax.spaghetti.lookupPosition(start, lowFile.getFilename());\n if (loopTargetFieldName && spag) {\n if (new SpagHelper(spag).isDuplicateName(loopTargetFieldName, start)) {\n this.renameVariable(spag, loopTargetFieldName, start, lowFile, highSyntax);\n }\n }\n }\n let cond = ((_d = forLoop.findDirectExpression(Expressions.ComponentCond)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || \"\";\n if (cond !== \"\") {\n cond = \" WHERE \" + cond;\n }\n const loop = forLoop.findDirectExpression(Expressions.InlineLoopDefinition);\n const indexInto = (_e = loop === null || loop === void 0 ? void 0 : loop.findExpressionAfterToken(\"INTO\")) === null || _e === void 0 ? void 0 : _e.concatTokens();\n if (forLoop.findDirectTokenByText(\"UNTIL\")\n || forLoop.findDirectTokenByText(\"WHILE\")) {\n const fieldDef = forLoop.findDirectExpression(Expressions.InlineFieldDefinition);\n const field = (_f = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.findFirstExpression(Expressions.Field)) === null || _f === void 0 ? void 0 : _f.concatTokens();\n const indexBackup = this.uniqueName(forLoop.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n body += indentation + \"DATA \" + field + \" TYPE i.\\n\";\n const second = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.getChildren()[2];\n if ((second === null || second === void 0 ? void 0 : second.get()) instanceof Expressions.Source) {\n body += indentation + field + \" = \" + second.concatTokens() + \".\\n\";\n }\n const not = forLoop.findDirectTokenByText(\"UNTIL\") ? \" NOT\" : \"\";\n const cond = forLoop.findFirstExpression(Expressions.Cond);\n body += indentation + `DATA ${indexBackup} LIKE sy-index.\\n`;\n body += indentation + `${indexBackup} = sy-index.\\n`;\n body += indentation + `WHILE${not} ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\\n`;\n body += indentation + ` sy-index = ${indexBackup}.\\n`;\n const then = forLoop.findExpressionAfterToken(\"THEN\");\n if (then) {\n end += ` ${field} = ${then.concatTokens()}.\\n`;\n }\n else {\n end += ` ${field} = ${field} + 1.\\n`;\n }\n end += indentation + \"ENDWHILE\";\n }\n else if (loopTargetFieldName !== undefined) {\n let from = (_g = forLoop.findExpressionAfterToken(\"FROM\")) === null || _g === void 0 ? void 0 : _g.concatTokens();\n from = from ? \" FROM \" + from : \"\";\n let to = (_h = forLoop.findExpressionAfterToken(\"TO\")) === null || _h === void 0 ? void 0 : _h.concatTokens();\n to = to ? \" TO \" + to : \"\";\n let gby = \"\";\n for (const lg of forLoop.findDirectExpressions(Expressions.LoopGroupByComponent)) {\n if (gby !== \"\") {\n gby += \" \";\n }\n gby += lg.concatTokens();\n }\n if (gby !== \"\") {\n gby = \" GROUP BY ( \" + gby + \" )\";\n }\n const fc = forLoop.findDirectExpression(Expressions.FieldChain);\n if (fc) {\n gby = \" GROUP BY \" + fc.concatTokens();\n }\n if (forLoop.findDirectTokenByText(\"ASCENDING\")) {\n gby += \" ASCENDING\";\n }\n if (forLoop.findDirectTokenByText(\"DESCENDING\")) {\n gby += \" DESCENDING\";\n }\n const groups = forLoop.findExpressionAfterToken(\"GROUPS\");\n if (groups) {\n const concat = groups.concatTokens();\n if (concat.startsWith(\"<\")) {\n gby += \" ASSIGNING FIELD-SYMBOL(\" + concat + \")\";\n }\n else {\n gby += \" INTO DATA(\" + concat + \")\";\n }\n }\n let inGroup = \"\";\n if (forLoop.concatTokens().toUpperCase().includes(\" IN GROUP \")) {\n inGroup = \"-items\";\n }\n let into = \"INTO DATA\";\n if (loopTargetFieldName.startsWith(\"<\")) {\n into = \"ASSIGNING FIELD-SYMBOL\";\n }\n // todo, also backup sy-index / sy-tabix here?\n body += indentation + `LOOP AT ${loopSource}${inGroup} ${into}(${loopTargetFieldName})${from}${to}${cond}${gby}.\\n`;\n if (indexInto) {\n body += indentation + \" DATA(\" + indexInto + \") = sy-tabix.\\n\";\n }\n end = \"ENDLOOP\";\n }\n else if (loopTargetFieldName === undefined) {\n // todo, also backup sy-index / sy-tabix here?\n const loopTargetFieldSymbol = (_j = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _j === void 0 ? void 0 : _j.concatTokens();\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol})${cond}.\\n`;\n if (indexInto) {\n body += indentation + \" DATA(\" + indexInto + \") = sy-tabix.\\n\";\n }\n end = \"ENDLOOP\";\n }\n const l = forLoop.findDirectExpression(Expressions.Let);\n if (l) {\n body += this.outlineLet(l, indentation, highSyntax, lowFile);\n }\n return { body, end };\n }\n outlineFilter(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"FILTER\") {\n continue;\n }\n const filterBody = i.findDirectExpression(Expressions.FilterBody);\n if (filterBody === undefined) {\n continue;\n }\n const sourceName = (_a = filterBody.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (sourceName === undefined) {\n continue;\n }\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n type = \"LIKE \" + sourceName;\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const loopName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n body += `DATA ${uniqueName} ${type}.\\n`;\n body += `${indentation}LOOP AT ${sourceName} INTO DATA(${loopName}) ${filterBody.concatTokens().substring(sourceName.length + 1)}.\\n`;\n body += `${indentation} INSERT ${loopName} INTO TABLE ${uniqueName}.\\n`;\n body += `${indentation}ENDLOOP.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), body);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport FILTER\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineSwitch(low, high, lowFile, highSyntax) {\n var _a, _b, _c, _d;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"SWITCH\") {\n continue;\n }\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move\n && high.findDirectExpression(Expressions.Source) === i\n && ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.TargetField)) !== undefined) {\n type = \"LIKE \" + ((_b = high.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n let name = \"\";\n const switchBody = i.findDirectExpression(Expressions.SwitchBody);\n if (switchBody === undefined) {\n continue;\n }\n for (const l of ((_c = switchBody === null || switchBody === void 0 ? void 0 : switchBody.findDirectExpression(Expressions.Let)) === null || _c === void 0 ? void 0 : _c.findDirectExpressions(Expressions.InlineFieldDefinition)) || []) {\n name = l.getFirstToken().getStr();\n body += indentation + `DATA(${name}) = ${(_d = switchBody.findFirstExpression(Expressions.Source)) === null || _d === void 0 ? void 0 : _d.concatTokens()}.\\n`;\n }\n body += `DATA ${uniqueName} ${type}.\\n`;\n let firstSource = false;\n let inWhen = false;\n for (const c of switchBody.getChildren()) {\n if (c.get() instanceof Expressions.Source && firstSource === false) {\n body += indentation + `CASE ${c.concatTokens()}.`;\n firstSource = true;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"THEN\") {\n inWhen = true;\n body += \".\\n\";\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"WHEN\") {\n inWhen = false;\n body += `\\n${indentation} WHEN `;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"OR\") {\n body += ` OR `;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"ELSE\") {\n inWhen = true;\n body += `\\n${indentation} WHEN OTHERS.\\n`;\n }\n else if (inWhen === false) {\n body += c.concatTokens();\n }\n else {\n body += indentation + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\";\n }\n }\n body += \"\\n\" + indentation + \"ENDCASE.\\n\" + indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), body);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport SWITCH\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineReduce(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\n continue;\n }\n const type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n let name = \"\";\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\n if (reduceBody === undefined) {\n continue;\n }\n const letNode = reduceBody.findDirectExpression(Expressions.Let);\n if (letNode) {\n body += this.outlineLet(letNode, indentation, highSyntax, lowFile);\n }\n let firstName = \"\";\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\n name = init.getFirstToken().getStr();\n if (firstName === \"\") {\n firstName = name;\n }\n const spag = highSyntax.spaghetti.lookupPosition(init.getFirstToken().getStart(), lowFile.getFilename());\n if (spag && new SpagHelper(spag).isDuplicateName(name, init.getFirstToken().getStart())) {\n this.renameVariable(spag, name, init.getFirstToken().getStart(), lowFile, highSyntax);\n }\n const s = (_a = init.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n const t = (_b = init.findFirstExpression(Expressions.TypeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (s) {\n if (s.toUpperCase().startsWith(\"VALUE #\")) {\n body += indentation + `DATA(${name}) = ${s.replace(\"#\", type)}.\\n`;\n }\n else {\n body += indentation + `DATA(${name}) = ${s}.\\n`;\n }\n }\n else {\n body += indentation + `DATA ${name} TYPE ${t}.\\n`;\n }\n }\n let end = \"\";\n for (const forLoop of (reduceBody === null || reduceBody === void 0 ? void 0 : reduceBody.findDirectExpressions(Expressions.For)) || []) {\n const outlineFor = this.outlineFor(forLoop, indentation, lowFile, highSyntax);\n body += outlineFor.body;\n end = outlineFor.end + `.\\n` + end;\n }\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\n if (next === undefined) {\n continue;\n }\n for (const n of next.getChildren()) {\n const concat = n.concatTokens();\n if (concat.toUpperCase() === \"NEXT\") {\n continue;\n }\n else if (n.get() instanceof Expressions.SimpleTarget) {\n body += indentation + \" \" + concat + \" \";\n }\n else if (n.get() instanceof Expressions.Source) {\n body += \" \" + concat + \".\\n\";\n }\n else {\n body += concat;\n }\n }\n body += indentation + end;\n body += indentation + `${uniqueName} = ${firstName}.\\n`;\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n body +\n indentation;\n const reduceEnd = i.findDirectTokenByText(\")\");\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), reduceEnd.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineValue(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const allSources = high.findAllExpressionsRecursive(Expressions.Source);\n for (const s of allSources) {\n const firstToken = s.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\n continue;\n }\n const valueBody = s.findDirectExpression(Expressions.ValueBody);\n let type = this.findType(s, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move && high.findDirectExpression(Expressions.Source) === s) {\n type = \"LIKE \" + ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n let indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n const base = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findExpressionAfterToken(\"BASE\");\n if (base) {\n body += indentation + uniqueName + \" = \" + base.concatTokens() + \".\\n\";\n }\n let end = \"\";\n let structureName = uniqueName;\n let added = false;\n let data = \"\";\n let previous = undefined;\n if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined) {\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const extra = (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) ? \" \" : \"\";\n data = indentation + extra + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\n }\n for (const a of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\n if (a.get() instanceof Expressions.FieldAssignment) {\n if (added === false) {\n body += data;\n added = true;\n }\n body += indentation + structureName + \"-\" + a.concatTokens() + \".\\n\";\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.For) {\n const outlineFor = this.outlineFor(a, indentation, lowFile, highSyntax);\n body += outlineFor.body;\n end = outlineFor.end + `.\\n` + end;\n indentation += \" \";\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.Source) {\n // special handling for superflous value expression\n if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren().length) === 1) {\n body += indentation + uniqueName + \" = \" + a.concatTokens() + `.\\n`;\n }\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.Let) {\n body += this.outlineLet(a, indentation, highSyntax, lowFile);\n }\n if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.ValueBodyLine) {\n let skip = false;\n for (const b of (a === null || a === void 0 ? void 0 : a.getChildren()) || []) {\n if (b.get() instanceof Expressions.FieldAssignment) {\n if (added === false) {\n body += data;\n added = true;\n }\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\n }\n else if (b.get() instanceof Expressions.Source) {\n body += indentation + \"APPEND \" + b.concatTokens() + ` TO ${uniqueName}.\\n`;\n skip = true;\n }\n else if (b.get() instanceof Expressions.ValueBodyLines) {\n body += indentation + \"APPEND \" + b.concatTokens() + ` TO ${uniqueName}.\\n`;\n skip = true;\n }\n else if (b.concatTokens() === \")\") {\n if (added === false && (previous === null || previous === void 0 ? void 0 : previous.concatTokens()) === \"(\") {\n body += data;\n added = true;\n }\n if (skip === false) {\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\n }\n }\n previous = b;\n }\n }\n }\n if (body === \"\" && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase()) === \"OPTIONAL\") {\n const fieldChain = valueBody.findFirstExpression(Expressions.FieldChain);\n const rowName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n let tableExpression = undefined;\n let tabName = \"\";\n let after = \"\";\n for (const c of (fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getChildren()) || []) {\n if (c.get() instanceof Expressions.TableExpression && c instanceof nodes_1.ExpressionNode) {\n tableExpression = c;\n }\n else if (tableExpression === undefined) {\n tabName += c.concatTokens();\n }\n else {\n after += c.concatTokens();\n }\n }\n let condition = \"\";\n if ((tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.getChildren().length) === 3) {\n condition = \"INDEX \" + ((_c = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens());\n }\n else {\n condition = \"WITH KEY \" + (tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.concatTokens().replace(\"[ \", \"\").replace(\" ]\", \"\"));\n }\n body +=\n indentation + `READ TABLE ${tabName} INTO DATA(${rowName}) ${condition}.\\n` +\n indentation + `IF sy-subrc = 0.\\n` +\n indentation + ` ${uniqueName} = ${rowName}${after}.\\n` +\n indentation + `ENDIF.\\n`;\n }\n if (end !== \"\") {\n indentation = indentation.substring(2);\n body += indentation + end;\n }\n const abap = `DATA ${uniqueName} ${type}.\\n` +\n indentation + `CLEAR ${uniqueName}.\\n` + // might be called inside a loop\n body +\n indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineLet(node, indentation, highSyntax, lowFile) {\n var _a;\n let ret = \"\";\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\n const c = f.getFirstChild();\n if (c === undefined) {\n continue;\n }\n const name = c.concatTokens().toLowerCase();\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n if (new SpagHelper(spag).isDuplicateName(name, c.getFirstToken().getStart())) {\n this.renameVariable(spag, name, c.getFirstToken().getStart(), lowFile, highSyntax);\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n const source = f.findFirstExpression(Expressions.Source);\n if (source) {\n ret += indentation + \"DATA(\" + name + `) = ${source.concatTokens()}.\\n`;\n }\n continue;\n }\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\n const source = f.findFirstExpression(Expressions.Source);\n if (source) {\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\n }\n }\n return ret;\n }\n renameVariable(spag, name, pos, lowFile, highSyntax) {\n const newName = this.uniqueName(pos, lowFile.getFilename(), highSyntax);\n const fix = new SpagHelper(spag).renameVariable(name, pos, lowFile, newName);\n const issue = issue_1.Issue.atPosition(lowFile, pos, \"Rename before outline\", this.getMetadata().key, this.conf.severity, fix);\n throw new SkipToNextFile(issue);\n }\n findType(i, lowFile, highSyntax, ref = false) {\n var _a;\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\n if (expr === undefined) {\n return undefined;\n }\n const firstToken = expr.getFirstToken();\n const concat = expr.concatTokens().toLowerCase();\n if (concat !== \"#\") {\n return ref ? \"REF TO \" + concat : concat;\n }\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n return undefined;\n }\n let inferred = undefined;\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.InferredType\n && r.resolved\n && r.position.getStart().equals(firstToken.getStart())\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\n inferred = r.resolved;\n break;\n }\n }\n if (inferred === undefined) {\n return undefined;\n }\n if (inferred.getType() instanceof basic_1.ObjectReferenceType) {\n return inferred.getType().toABAP();\n }\n else {\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n }\n }\n outlineFS(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)\n || (high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.InlineFS)) {\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n if (nameToken === undefined) {\n continue;\n }\n const name = nameToken.getStr();\n let type = \"\";\n if (high.concatTokens().toUpperCase().startsWith(\"APPEND INITIAL LINE TO \")) {\n type = \"LIKE LINE OF \" + ((_b = high.findFirstExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n else {\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n continue;\n }\n else if (found.getType() instanceof basic_1.VoidType) {\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\n }\n type = \"TYPE \";\n type += found.getType().getQualifiedName() ? found.getType().getQualifiedName().toLowerCase() : found.getType().toABAP();\n }\n const code = `FIELD-SYMBOLS ${name} ${type}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineData(node, lowFile, highSyntax) {\n // hmm, no guard here, as DATA(SDF) is valid in 702\n var _a, _b;\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n if (nameToken === undefined) {\n continue;\n }\n const name = nameToken.getStr();\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n continue;\n }\n else if (found.getType() instanceof basic_1.VoidType && found.getType().getQualifiedName() === undefined) {\n continue;\n }\n let type = found.getType().getQualifiedName()\n ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase()\n : found.getType().toABAP();\n if (found.getType() instanceof basic_1.ObjectReferenceType) {\n type = found.getType().toABAP();\n }\n if (type === \"\") {\n continue;\n }\n const code = `DATA ${name} TYPE ${type}.\\n` +\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineCond(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\n continue;\n }\n const body = i.findDirectExpression(Expressions.CondBody);\n if (body === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move\n && high.findDirectExpression(Expressions.Source) === i\n && ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.TargetField)) !== undefined) {\n type = \"LIKE \" + ((_b = high.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const indent = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const bodyCode = this.buildCondBody(body, uniqueName, indent, lowFile, highSyntax);\n const last = i.findDirectTokenByText(\")\");\n const abap = `DATA ${uniqueName} ${type}.\\n` + bodyCode;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), last.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n buildCondBody(body, uniqueName, indent, lowFile, highSyntax) {\n let code = \"\";\n let first = true;\n let addElse = true;\n for (const c of body.getChildren()) {\n if (c instanceof nodes_1.TokenNode) {\n switch (c.getFirstToken().getStr().toUpperCase()) {\n case \"WHEN\":\n if (first === true) {\n code += indent + \"IF \";\n first = false;\n }\n else {\n code += indent + \"ELSEIF \";\n }\n break;\n case \"THEN\":\n code += \".\\n\";\n break;\n case \"ELSE\":\n code += indent + \"ELSE.\\n\";\n addElse = false;\n break;\n default:\n throw \"buildCondBody, unexpected token\";\n }\n }\n else if (c.get() instanceof Expressions.Cond) {\n code += c.concatTokens();\n }\n else if (c.get() instanceof Expressions.Let) {\n code += this.outlineLet(c, indent, highSyntax, lowFile);\n }\n else if (c.get() instanceof Expressions.Source) {\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\n }\n else if (c.get() instanceof Expressions.Throw) {\n code += indent + \" \" + c.concatTokens().replace(/THROW /i, \"RAISE EXCEPTION NEW \") + \".\\n\";\n }\n else {\n throw \"buildCondBody, unexpected expression, \" + c.get().constructor.name;\n }\n }\n if (addElse) {\n // COND might be called inside a loop\n code += indent + \"ELSE.\\n\";\n code += indent + ` CLEAR ${uniqueName}.\\n`;\n }\n code += indent + \"ENDIF.\\n\";\n code += indent;\n return code;\n }\n outlineConv(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\n continue;\n }\n const end = i.findDirectTokenByText(\")\");\n if (end === undefined) {\n continue;\n }\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (body === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const type = this.findType(i, lowFile, highSyntax);\n const indent = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n indent + `${uniqueName} = ${body}.\\n` +\n indent;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), end.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n // \"CAST\" to \"?=\"\n outlineCast(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Cast)) {\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const type = this.findType(i, lowFile, highSyntax, true);\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1) +\n `${uniqueName} ?= ${body}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n uniqueName(position, filename, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\n if (spag === undefined) {\n const name = \"temprr\" + this.counter;\n this.counter++;\n return name;\n }\n while (true) {\n const name = \"temp\" + this.counter;\n const exists = this.existsRecursive(spag, name);\n this.counter++;\n if (exists === false) {\n return name;\n }\n }\n }\n existsRecursive(spag, name) {\n const existsDirect = spag.findVariable(name);\n if (existsDirect) {\n return true;\n }\n for (const child of spag.getChildren()) {\n if (child.findVariable(name) || this.existsRecursive(child, name)) {\n return true;\n }\n }\n return false;\n }\n replaceXsdBool(node, lowFile, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\n const token = r.position.getToken();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n findMethodCallExpression(node, token) {\n var _a;\n for (const m of node.findAllExpressions(Expressions.MethodCall)) {\n if ((_a = m.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStart().equals(token.getStart())) {\n return m;\n }\n }\n return undefined;\n }\n replaceMethodConditional(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const c of high.findAllExpressionsRecursive(Expressions.Compare)) {\n const chain = c.findDirectExpression(Expressions.MethodCallChain);\n if (chain === undefined) {\n continue;\n }\n const concat = chain.concatTokens().toUpperCase();\n if (concat.startsWith(\"LINE_EXISTS( \") || concat.startsWith(\"LINE_INDEX( \")) {\n // these are handled separately\n continue;\n }\n let predicate = false;\n const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference &&\n new _builtin_1.BuiltIn().isPredicate(chain.getFirstToken().getStr().toUpperCase())) {\n predicate = true;\n break;\n }\n }\n const end = chain.getLastToken().getEnd();\n let fix = edit_helper_1.EditHelper.insertAt(lowFile, end, \" IS NOT INITIAL\");\n if (predicate === true) {\n fix = edit_helper_1.EditHelper.insertAt(lowFile, end, \" ) = abap_true\");\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, chain.getFirstToken().getStart(), \"boolc( \");\n fix = edit_helper_1.EditHelper.merge(fix, fix1);\n }\n return issue_1.Issue.atToken(lowFile, chain.getFirstToken(), \"Downport method conditional\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n getReference(node, lowFile, _highSyntax) {\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.GetReference)) {\n return undefined;\n }\n const inline = (_a = node.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.InlineData);\n if (inline === undefined) {\n return undefined;\n }\n const targetName = (_b = inline.findDirectExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const sourceName = (_c = node.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n if (targetName === undefined || sourceName === undefined) {\n return undefined;\n }\n const code = `DATA ${targetName} LIKE REF TO ${sourceName}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inline.getFirstToken().getStart(), inline.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inline.getFirstToken(), \"Downport, outline DATA ref\", this.getMetadata().key, this.conf.severity, fix);\n }\n replaceContains(node, lowFile, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n // only downport if its an single method call condition\n let found = false;\n for (const c of node.findAllExpressionsRecursive(Expressions.Compare)) {\n found = c.findDirectExpression(Expressions.MethodCallChain) !== undefined;\n if (found === true) {\n break;\n }\n }\n if (found === false) {\n return undefined;\n }\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\n continue;\n }\n const func = r.position.getName().toUpperCase();\n if (func === \"CONTAINS\") {\n const token = r.position.getToken();\n const expression = this.findMethodCallExpression(node, token);\n if (expression === undefined) {\n continue;\n }\n const sList = expression.findAllExpressions(Expressions.Source).map(e => e.concatTokens());\n if (sList.length !== 2) {\n continue;\n }\n const code = sList[0] + \" CS \" + sList[1];\n const start = expression.getFirstToken().getStart();\n const end = expression.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, token, \"Downport contains()\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n replaceLineFunctions(node, lowFile, highSyntax, highFile) {\n var _a, _b;\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\n continue;\n }\n const func = r.position.getName().toUpperCase();\n if (func === \"LINE_EXISTS\" || func === \"LINE_INDEX\") {\n const token = r.position.getToken();\n const expression = this.findMethodCallExpression(node, token);\n if (expression === undefined) {\n continue;\n }\n let condition = \"\";\n for (const c of ((_a = expression === null || expression === void 0 ? void 0 : expression.findFirstExpression(Expressions.TableExpression)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\n continue;\n }\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\n condition = \"WITH KEY \";\n }\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\n condition = \"INDEX \";\n }\n condition += c.concatTokens() + \" \";\n }\n const tableName = (_b = expression.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens().split(\"[\")[0];\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const sy = func === \"LINE_EXISTS\" ? \"sy-subrc\" : \"sy-tabix\";\n const code = `DATA ${uniqueName} LIKE sy-subrc.\\n` +\n indentation + `READ TABLE ${tableName} ${condition}TRANSPORTING NO FIELDS.\\n` +\n indentation + uniqueName + ` = ${sy}.\\n` +\n indentation;\n let insertAt = node.getFirstToken().getStart();\n if (node.get() instanceof statements_1.ElseIf) {\n // assumption: no side effects in IF conditions\n insertAt = this.findStartOfIf(node, highFile);\n if (insertAt === undefined) {\n continue;\n }\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, insertAt, code);\n const start = expression.getFirstToken().getStart();\n const end = expression.getLastToken().getEnd();\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, uniqueName + (func === \"LINE_EXISTS\" ? \" = 0\" : \"\"));\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, token, \"Replace line function\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n findStartOfIf(node, highFile) {\n const structure = highFile.getStructure();\n for (const c of (structure === null || structure === void 0 ? void 0 : structure.findAllStructuresRecursive(Structures.If)) || []) {\n for (const ei of c.findDirectStructures(Structures.ElseIf)) {\n if (ei.getFirstStatement() === node) {\n return c.getFirstToken().getStart();\n }\n }\n }\n return undefined;\n }\n newToCreateObject(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const source = high.findDirectExpression(Expressions.Source);\n let fix = undefined;\n if (high.get() instanceof Statements.Move\n && source\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\n const target = high.findDirectExpression(Expressions.Target);\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\n if (target\n && found\n && source.concatTokens() === found.concatTokens()\n && target.findDirectExpression(Expressions.InlineData) === undefined) {\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\n if (abap !== undefined) {\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), abap);\n }\n }\n }\n if (fix === undefined && high.findAllExpressions(Expressions.NewObject)) {\n const found = high.findFirstExpression(Expressions.NewObject);\n if (found === undefined) {\n return undefined;\n }\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const abap = this.newParameters(found, name, highSyntax, lowFile);\n if (abap === undefined) {\n return undefined;\n }\n const type = this.findType(found, lowFile, highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\n indentation + abap + \"\\n\" +\n indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n }\n if (fix) {\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n return undefined;\n }\n }\n newParameters(found, name, highSyntax, lowFile) {\n var _a, _b, _c;\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\n if (parameters) {\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\n }\n else if (typeToken) {\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (source) {\n // find the default parameter name for the constructor\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\n let cdef = undefined;\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\n cdef = r.resolved;\n }\n }\n if (cdef && cdef.getMethodDefinitions === undefined) {\n return undefined; // something wrong\n }\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\n if (importing) {\n extra += \" EXPORTING \" + importing + \" = \" + source;\n }\n else if (spag === undefined) {\n extra += \" SpagUndefined\";\n }\n else if (cdef === undefined) {\n extra += \" ClassDefinitionNotFound\";\n }\n else {\n extra += \" SomeError\";\n }\n }\n }\n const abap = `CREATE OBJECT ${name}${extra}.`;\n return abap;\n }\n}\nexports.Downport = Downport;\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
|
|
12328
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Downport = exports.DownportConf = void 0;\n/* eslint-disable max-len */\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\nconst include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\n// todo: refactor each sub-rule to new classes?\n// todo: add configuration\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\n}\nexports.DownportConf = DownportConf;\nclass SkipToNextFile extends Error {\n constructor(issue) {\n super();\n this.issue = issue;\n }\n}\nclass SpagHelper {\n constructor(spag) {\n this.spag = spag;\n }\n renameVariable(oldName, pos, lowFile, newName) {\n let fix = undefined;\n const references = this.findReferences(oldName, pos);\n references.sort((a, b) => {\n if (a.start.equals(b.start)) {\n return 0;\n }\n return a.start.isAfter(b.start) ? 1 : -1;\n });\n for (const r of references) {\n const replace = edit_helper_1.EditHelper.replaceRange(lowFile, r.start, r.end, newName);\n if (fix === undefined) {\n fix = replace;\n }\n else {\n fix = edit_helper_1.EditHelper.merge(replace, fix);\n }\n }\n return fix;\n }\n findReferences(name, pos) {\n var _a, _b;\n const positions = [];\n function has(element) {\n return positions.some(a => a.start.equals(element.start));\n }\n for (const r of this.spag.getData().references) {\n if (((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.getName()) === name && ((_b = r.resolved) === null || _b === void 0 ? void 0 : _b.getStart().equals(pos))) {\n const sub = {\n start: r.position.getStart(),\n end: r.position.getEnd(),\n };\n if (has(sub) === false) {\n positions.push(sub);\n }\n }\n }\n for (const child of this.spag.getChildren()) {\n const subPositions = new SpagHelper(child).findReferences(name, pos);\n for (const sub of subPositions) {\n if (has(sub) === false) {\n positions.push(sub);\n }\n }\n }\n return positions;\n }\n findRecursiveDuplicate(name, skip) {\n var _a;\n const found = this.spag.findVariable(name);\n if ((found === null || found === void 0 ? void 0 : found.getStart().equals(skip)) === false) {\n return found;\n }\n for (const child of ((_a = this.spag) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\n const sub = new SpagHelper(child).findRecursiveDuplicate(name, skip);\n if (sub) {\n return sub;\n }\n }\n return undefined;\n }\n isDuplicateName(name, pos) {\n let parent = this.spag.getParent();\n while ((parent === null || parent === void 0 ? void 0 : parent.getIdentifier().stype) === _scope_type_1.ScopeType.Let\n || (parent === null || parent === void 0 ? void 0 : parent.getIdentifier().stype) === _scope_type_1.ScopeType.For) {\n parent = parent.getParent();\n }\n if (parent === undefined) {\n return undefined;\n }\n return new SpagHelper(parent).findRecursiveDuplicate(name, pos) !== undefined;\n }\n}\nclass Downport {\n constructor() {\n this.conf = new DownportConf();\n }\n getMetadata() {\n return {\n key: \"downport\",\n title: \"Downport statement\",\n shortDescription: `Downport functionality`,\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\r\na higher level language version. If successful, various rules are applied to downport the statement.\r\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\r\n\r\nCurrent rules:\r\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\r\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\r\n* FIELD-SYMBOL() definitions are outlined\r\n* CONV is outlined\r\n* COND is outlined\r\n* REDUCE is outlined\r\n* SWITCH is outlined\r\n* FILTER is outlined\r\n* APPEND expression is outlined\r\n* INSERT expression is outlined\r\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\r\n* CAST changed to ?=\r\n* LOOP AT method_call( ) is outlined\r\n* VALUE # with structure fields\r\n* VALUE # with internal table lines\r\n* Table Expressions are outlined\r\n* SELECT INTO @DATA definitions are outlined\r\n* Some occurrences of string template formatting option ALPHA changed to function module call\r\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\r\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\r\n* RAISE EXCEPTION ... MESSAGE\r\n* Moving with +=, -=, /=, *=, &&= is expanded\r\n* line_exists and line_index is downported to READ TABLE\r\n* ENUMs, but does not nessesarily give the correct type and value\r\n* MESSAGE with non simple source\r\n\r\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\n tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\n };\n }\n getConfig() {\n return this.conf;\n }\n setConfig(conf) {\n this.conf = conf;\n }\n initialize(reg) {\n this.lowReg = reg;\n const version = this.lowReg.getConfig().getVersion();\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\n this.initHighReg();\n }\n return this;\n }\n listMainForInclude(filename) {\n if (filename === undefined) {\n return [];\n }\n // only initialize this.graph if needed\n if (this.graph === undefined) {\n this.graph = new include_graph_1.IncludeGraph(this.lowReg);\n }\n return this.graph.listMainForInclude(filename);\n }\n containsError(highObj) {\n for (const file of highObj.getABAPFiles()) {\n for (const statement of file.getStatements()) {\n if (statement.get() instanceof _statement_1.Unknown) {\n return true; // contains parser errors\n }\n }\n if (file.getStructure() === undefined) {\n return true;\n }\n }\n return false;\n }\n run(lowObj) {\n var _a;\n const ret = [];\n this.counter = 1;\n const version = this.lowReg.getConfig().getVersion();\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\n return ret;\n }\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\n return ret;\n }\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\n return ret;\n }\n let highSyntaxObj = highObj;\n if (this.containsError(highObj)) {\n return ret;\n }\n // for includes do the syntax check via a main program\n if (lowObj instanceof objects_1.Program && lowObj.isInclude()) {\n const mains = this.listMainForInclude((_a = lowObj.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getFilename());\n if (mains.length <= 0) {\n return [];\n }\n const f = this.highReg.getFileByName(mains[0]);\n if (f === undefined) {\n return [];\n }\n highSyntaxObj = this.highReg.findObjectForFile(f);\n }\n for (const lowFile of lowObj.getABAPFiles()) {\n let highSyntax = undefined;\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\n if (highFile === undefined) {\n continue;\n }\n const lowStatements = lowFile.getStatements();\n const highStatements = highFile.getStatements();\n if (lowStatements.length !== highStatements.length) {\n // after applying a fix, there might be more statements in lowFile\n // should highReg be initialized again?\n /*\n const message = \"Internal Error: Statement lengths does not match\";\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\n */\n // hmm, add some way to disable lazyUnknown() in statement_parser.ts\n // alternatively explicit enable it in vscode, its only relevant when a user is\n // actively editing the files\n continue;\n }\n if (highSyntax === undefined) {\n highSyntax = new syntax_1.SyntaxLogic(this.highReg, highSyntaxObj).run();\n }\n let containsUnknown = false;\n for (let i = 0; i < lowStatements.length; i++) {\n const low = lowStatements[i];\n const high = highStatements[i];\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\n || high.findFirstExpression(Expressions.InlineData)) {\n containsUnknown = true;\n try {\n const issue = this.checkStatement(low, high, lowFile, highSyntax, highFile);\n if (issue) {\n ret.push(issue);\n }\n }\n catch (e) {\n if (e instanceof SkipToNextFile) {\n ret.push(e.issue);\n break;\n }\n else {\n throw e;\n }\n }\n }\n }\n if (ret.length === 0 && containsUnknown) {\n // this is a hack in order not to change too many unit tests\n for (let i = 0; i < lowStatements.length; i++) {\n const high = highStatements[i];\n if (high.get() instanceof Statements.Data) {\n const issue = this.anonymousTableType(high, lowFile, highSyntax);\n if (issue) {\n ret.push(issue);\n }\n }\n }\n }\n else if (ret.length === 0 && / xsdbool\\(/i.test(lowFile.getRaw())) {\n for (let i = 0; i < lowStatements.length; i++) {\n const high = highStatements[i];\n const issue = this.replaceXsdBool(high, lowFile, highSyntax);\n if (issue) {\n ret.push(issue);\n break;\n }\n }\n }\n }\n return ret;\n }\n ////////////////////\n /** clones the orginal repository into highReg, and parses it with higher language version */\n initHighReg() {\n // use default configuration, ie. default target version\n const highConfig = config_1.Config.getDefault().get();\n const lowConfig = this.lowReg.getConfig().get();\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\n this.highReg = new registry_1.Registry();\n for (const o of this.lowReg.getObjects()) {\n for (const f of o.getFiles()) {\n if (this.lowReg.isDependency(o) === true) {\n this.highReg.addDependency(f);\n }\n else {\n this.highReg.addFile(f);\n }\n }\n }\n this.highReg.parse();\n }\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\n checkStatement(low, high, lowFile, highSyntax, highFile) {\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\n return undefined;\n }\n // downport XSDBOOL() early, as it is valid 702 syntax\n let found = this.replaceXsdBool(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportEnum(low, high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.partiallyImplemented(high, lowFile);\n if (found) {\n return found;\n }\n found = this.raiseException(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.emptyKey(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.stringTemplateAlpha(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.moveWithOperator(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.moveWithSimpleValue(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.assignWithTable(low, high, lowFile);\n if (found) {\n return found;\n }\n found = this.downportRefSimple(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportCorrespondingSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.downportRef(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportLoopGroup(high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.callFunctionParameterSimple(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.moveWithTableTarget(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineLoopInput(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n let skipValue = false;\n let skipReduce = false;\n const valueBody = high.findFirstExpression(Expressions.ValueBody);\n const reduceBody = high.findFirstExpression(Expressions.ReduceBody);\n if (valueBody && reduceBody) {\n const valueToken = valueBody.getFirstToken();\n const reduceToken = reduceBody.getFirstToken();\n if (valueToken.getStart().isBefore(reduceToken.getStart())) {\n skipReduce = true;\n }\n else {\n skipValue = true;\n }\n }\n if (skipValue !== true) {\n found = this.outlineValue(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n }\n if (skipReduce !== true) {\n found = this.outlineReduce(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n }\n found = this.downportSelectFields(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineSwitch(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineFilter(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCast(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineConv(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCond(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineCatchSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineGetReferenceSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineDataSimple(high, lowFile);\n if (found) {\n return found;\n }\n found = this.outlineData(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.outlineFS(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.newToCreateObject(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceLineFunctions(high, lowFile, highSyntax, highFile);\n if (found) {\n return found;\n }\n found = this.getReference(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceContains(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceMethodConditional(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceTableExpression(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.replaceInsertExpression(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportMessage(high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n return undefined;\n }\n //////////////////////////////////////////\n downportSQLExtras(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Select)\n && !(high.get() instanceof Statements.SelectLoop)\n && !(high.get() instanceof Statements.UpdateDatabase)\n && !(high.get() instanceof Statements.ModifyDatabase)\n && !(high.get() instanceof Statements.DeleteDatabase)\n && !(high.get() instanceof Statements.InsertDatabase)) {\n return undefined;\n }\n let fix = undefined;\n const addFix = (token) => {\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\n if (fix === undefined) {\n fix = add;\n }\n else {\n fix = edit_helper_1.EditHelper.merge(fix, add);\n }\n };\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\n high.findAllExpressionsRecursive(Expressions.SQLSource),\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\n for (const c of candidates.reverse()) {\n if (c.getFirstToken() instanceof tokens_1.WAt\n || c.getFirstToken() instanceof tokens_1.At) {\n const tokens = c.getAllTokens();\n if (tokens[1] instanceof tokens_1.ParenLeftW && tokens[tokens.length - 1] instanceof tokens_1.WParenRightW) {\n const source = c.findDirectExpression(Expressions.Source);\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA(${uniqueName}) = ${source === null || source === void 0 ? void 0 : source.concatTokens()}.\\n`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, c.getFirstToken().getStart(), c.getLastToken().getEnd(), \"@\" + uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, outline complex @\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n addFix(c.getFirstToken());\n }\n }\n }\n for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {\n for (const token of fieldList.getDirectTokens()) {\n if (token.getStr() === \",\") {\n addFix(token);\n }\n }\n }\n if (fix !== undefined) {\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove @ and ,\", this.getMetadata().key, this.conf.severity, fix);\n }\n for (const c of high.findAllExpressionsRecursive(Expressions.SQLIn)) {\n const children = c.getChildren();\n const first = children[1];\n if (!(first.get() instanceof tokens_1.WParenLeftW)) {\n continue;\n }\n const last = children[children.length - 1];\n if (last.get() instanceof tokens_1.WParenRightW || last.get() instanceof tokens_1.WParenRight) {\n const firstEnd = first.getFirstToken().getEnd();\n const endDelete = new position_1.Position(firstEnd.getRow(), firstEnd.getCol() + 1);\n const fix1 = edit_helper_1.EditHelper.deleteRange(lowFile, firstEnd, endDelete);\n const lastStart = last.getFirstToken().getStart();\n const startDelete = new position_1.Position(lastStart.getRow(), lastStart.getCol() - 1);\n const fix2 = edit_helper_1.EditHelper.deleteRange(lowFile, startDelete, lastStart);\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove spaces\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n downportSelectInline(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Select) && !(high.get() instanceof Statements.SelectLoop)) {\n return undefined;\n }\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\n if (found) {\n return found;\n }\n return undefined;\n }\n downportSelectFields(low, high, lowFile, _highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Select)) {\n return undefined;\n }\n const fields = high.findFirstExpression(Expressions.SQLFields);\n if (fields === undefined) {\n return undefined;\n }\n const code = (_a = fields.getLastChild()) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (code === undefined) {\n return undefined;\n }\n const fix1 = edit_helper_1.EditHelper.deleteRange(lowFile, fields.getFirstToken().getStart(), fields.getLastToken().getEnd());\n const fix2 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getEnd(), \" \" + code);\n const fix = edit_helper_1.EditHelper.merge(fix1, fix2);\n return issue_1.Issue.atToken(lowFile, fields.getFirstToken(), \"Replace FIELDS\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportSelectSingleInline(low, high, lowFile, _highSyntax) {\n var _a, _b, _c, _d;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\n if (targets.length !== 1) {\n return undefined;\n }\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\n if (inlineData === undefined) {\n return undefined;\n }\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\n if (sqlFrom.length !== 1) {\n return undefined;\n }\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (tableName === undefined) {\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let fieldList = high.findFirstExpression(Expressions.SQLFieldList);\n if (fieldList === undefined) {\n fieldList = high.findFirstExpression(Expressions.SQLFieldListLoop);\n }\n if (fieldList === undefined) {\n return undefined;\n }\n let fieldDefinition = \"\";\n const fields = fieldList.findAllExpressions(Expressions.SQLFieldName);\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\n if (fields.length === 1) {\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\n }\n else if (fieldList.concatTokens() === \"*\") {\n fieldDefinition = `DATA ${name} TYPE ${tableName}.`;\n }\n else if (fieldList.concatTokens().toUpperCase() === \"COUNT( * )\") {\n fieldDefinition = `DATA ${name} TYPE i.`;\n }\n else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {\n const c = fieldList.getChildren()[0];\n if (c instanceof nodes_1.ExpressionNode) {\n const concat = (_d = c.findFirstExpression(Expressions.SQLArithmetics)) === null || _d === void 0 ? void 0 : _d.concatTokens();\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${concat}.`;\n }\n }\n else {\n for (const f of fields) {\n const fieldName = f.concatTokens();\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\n }\n fieldDefinition = `DATA: BEGIN OF ${name},\r\n${fieldDefinition}${indentation} END OF ${name}.`;\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\r\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportSelectTableInline(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\n if (targets.length !== 1) {\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\n if (inlineData === undefined) {\n return undefined;\n }\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\n if (sqlFrom.length === 0) {\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Error outlining, sqlFrom not found\", this.getMetadata().key, this.conf.severity);\n }\n let tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (tableName === undefined) {\n return undefined;\n }\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\n if (fieldList === undefined) {\n return undefined;\n }\n let fieldDefinitions = \"\";\n for (const f of fieldList.findAllExpressions(Expressions.SQLFieldName)) {\n let fieldName = f.concatTokens();\n if (fieldName.includes(\"~\")) {\n const split = fieldName.split(\"~\");\n tableName = split[0];\n fieldName = split[1];\n }\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\n let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\r\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\r\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\r\n${indentation}`);\n if (fieldDefinitions === \"\") {\n fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.\r\n${indentation}`);\n }\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n // the anonymous type minght be used in inferred type statements, define it so it can be referred\n anonymousTableType(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.Data)) {\n return undefined;\n }\n const tt = high.findFirstExpression(Expressions.TypeTable);\n if (tt === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `TYPES ${uniqueName} ${tt.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, tt.getFirstToken().getStart(), tt.getLastToken().getEnd(), \"TYPE \" + uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Add type for table definition\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportMessage(high, lowFile, highSyntax) {\n var _a, _b;\n if (!(high.get() instanceof Statements.Message)) {\n return undefined;\n }\n const foundWith = high.findExpressionAfterToken(\"WITH\");\n if (foundWith === undefined) {\n return undefined;\n }\n const likeSource = high.findExpressionAfterToken(\"LIKE\");\n for (const s of high.findAllExpressions(Expressions.Source)) {\n if (s === likeSource) {\n continue;\n }\n else if (s.getChildren().length === 1 && ((_a = s.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Constant) {\n continue;\n }\n else if (s.getChildren().length === 1 && ((_b = s.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain) {\n continue;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Refactor MESSAGE WITH source\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceAppendExpression(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.Append)) {\n return undefined;\n }\n const children = high.getChildren();\n if (children[1].get() instanceof Expressions.Source) {\n const source = children[1];\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceInsertExpression(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.InsertInternal)) {\n return undefined;\n }\n const children = high.getChildren();\n if (children[1].get() instanceof Expressions.Source) {\n const source = children[1];\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline INSERT source expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n replaceTableExpression(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const fieldChain of high.findAllExpressionsRecursive(Expressions.FieldChain)) {\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\n if (tableExpression === undefined) {\n continue;\n }\n const concat = high.concatTokens().toUpperCase();\n if (concat.includes(\" LINE_EXISTS( \") || concat.includes(\" LINE_INDEX( \")) {\n // note: line_exists() must be replaced before handling table expressions\n continue;\n }\n let pre = \"\";\n let startToken = undefined;\n for (const child of fieldChain.getChildren()) {\n if (startToken === undefined) {\n startToken = child.getFirstToken();\n }\n else if (child === tableExpression) {\n break;\n }\n pre += child.concatTokens();\n }\n if (startToken === undefined) {\n continue;\n }\n const condition = this.tableCondition(tableExpression);\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const firstToken = high.getFirstToken();\n // note that the tabix restore should be done before throwing the exception\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\r\n${indentation}DATA ${tabixBackup} LIKE sy-tabix.\r\n${indentation}${tabixBackup} = sy-tabix.\r\n${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.\r\n${indentation}sy-tabix = ${tabixBackup}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n tableCondition(tableExpression) {\n let condition = \"\";\n let keyName = \"\";\n for (const c of tableExpression.getChildren() || []) {\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\n continue;\n }\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\n if (keyName === \"\") {\n condition = \"WITH KEY \";\n }\n else {\n condition = \"WITH TABLE KEY \" + keyName + \" COMPONENTS \";\n }\n }\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\n condition = \"INDEX \";\n }\n else if (c instanceof nodes_1.TokenNode && c.getFirstToken().getStr().toUpperCase() === \"KEY\") {\n continue;\n }\n else if (c.get() instanceof Expressions.SimpleName) {\n keyName = c.concatTokens();\n continue;\n }\n condition += c.concatTokens() + \" \";\n }\n return condition;\n }\n outlineCatchSimple(node, lowFile) {\n // outlines \"CATCH cx_bcs INTO DATA(lx_bcs_excep).\", note that this does not need to look at types\n var _a, _b;\n if (!(node.get() instanceof Statements.Catch)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n const classNames = node.findDirectExpressions(Expressions.ClassName);\n if (classNames.length !== 1) {\n return undefined;\n }\n const className = classNames[0].concatTokens();\n const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const code = ` DATA ${targetName} TYPE REF TO ${className}.\r\n${indentation}CATCH ${className} INTO ${targetName}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineGetReferenceSimple(node, lowFile) {\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.GetReference)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n const source = node.findFirstExpression(Expressions.Source);\n if (!(((_b = source === null || source === void 0 ? void 0 : source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\n return undefined;\n }\n const targetName = ((_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"errorError\";\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const firstToken = target.getFirstToken();\n const lastToken = target.getLastToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getStart(), `DATA ${targetName} LIKE REF TO ${source.concatTokens()}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineDataSimple(node, lowFile) {\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.Move)) {\n return undefined;\n }\n const target = node.findFirstExpression(Expressions.Target);\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\n return undefined;\n }\n let type = \"\";\n const source = node.findFirstExpression(Expressions.Source);\n if (source === undefined) {\n return undefined;\n }\n else if (source.getChildren().length !== 1) {\n return undefined;\n }\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.FieldLength)) {\n return undefined;\n }\n else if (source.findFirstExpression(Expressions.TableExpression)) {\n const chain = source.findDirectExpression(Expressions.FieldChain);\n if (chain !== undefined\n && chain.getChildren().length === 2\n && chain.getChildren()[0].get() instanceof Expressions.SourceField\n && chain.getChildren()[1].get() instanceof Expressions.TableExpression) {\n type = \"LINE OF \" + chain.getChildren()[0].concatTokens();\n }\n else {\n return undefined;\n }\n }\n else {\n type = source.concatTokens();\n }\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const firstToken = node.getFirstToken();\n const lastToken = node.getLastToken();\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${type}.\\n${indentation}`);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n partiallyImplemented(node, lowFile) {\n if (node.get() instanceof Statements.InterfaceDef) {\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\n if (partially === undefined) {\n return undefined;\n }\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\n if (implemented === undefined) {\n return undefined;\n }\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n raiseException(node, lowFile, highSyntax) {\n /*\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\n \n DATA foo LIKE if_t100_message=>t100key.\n foo-msgid = 'ZHVAM'.\n foo-msgno = '001'.\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n DATA bar TYPE REF TO zcl_hvam_exception.\n CREATE OBJECT bar EXPORTING textid = foo.\n bar->if_t100_dyn_msg~msgty = 'E'.\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\n RAISE EXCEPTION bar.\n */\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.Raise)) {\n return undefined;\n }\n let id = undefined;\n let number = undefined;\n let startToken = node.findDirectTokenByText(\"ID\");\n if (startToken) {\n const sources = node.findDirectExpressions(Expressions.Source);\n id = sources[0].concatTokens();\n const numberExpression = node.findExpressionAfterToken(\"NUMBER\");\n if (numberExpression === undefined) {\n throw \"downport raiseException, could not find number\";\n }\n number = numberExpression.concatTokens();\n if (numberExpression.get() instanceof Expressions.MessageNumber) {\n number = \"'\" + number + \"'\";\n }\n }\n else {\n const s = node.findDirectExpression(Expressions.MessageSource);\n if (s === undefined) {\n return undefined;\n }\n id = \"'\" + ((_a = s.findDirectExpression(Expressions.MessageClass)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"'\";\n number = \"'\" + ((_b = s.findDirectExpression(Expressions.MessageTypeAndNumber)) === null || _b === void 0 ? void 0 : _b.concatTokens().substring(1)) + \"'\";\n startToken = node.getFirstToken();\n }\n const className = ((_c = node.findDirectExpression(Expressions.ClassName)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"ERROR\";\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\r\n${indentation}${uniqueName1}-msgid = ${id === null || id === void 0 ? void 0 : id.toUpperCase()}.\r\n${indentation}${uniqueName1}-msgno = ${number}.\r\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\r\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\r\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\n }\n emptyKey(low, node, lowFile) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\n const key = i.findDirectExpression(Expressions.TypeTableKey);\n if (key === undefined) {\n continue;\n }\n i = key;\n const concat = i.concatTokens();\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\n continue;\n }\n const token = i.findDirectTokenByText(\"EMPTY\");\n if (token === undefined) {\n continue;\n }\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n callFunctionParameterSimple(high, lowFile, highSyntax) {\n if (!(high.get() instanceof Statements.CallFunction)) {\n return undefined;\n }\n let found = undefined;\n for (const p of high.findAllExpressions(Expressions.FunctionExportingParameter)) {\n found = p.findDirectExpression(Expressions.Source);\n if (found && (found.findDirectExpression(Expressions.FieldChain)\n || found.findDirectExpression(Expressions.Constant)\n || found.findDirectExpression(Expressions.TextElement))) {\n // its actually simple, ok\n found = undefined;\n }\n else if (found !== undefined) {\n break;\n }\n }\n if (found === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${found.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, call function parameter\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportCorrespondingSimple(high, lowFile) {\n var _a, _b;\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4\n || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== \"CORRESPONDING\") {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.CorrespondingBody);\n if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1) {\n const code = `MOVE-CORRESPONDING ${sourceRef.concatTokens()} TO ${target.concatTokens()}`;\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple CORRESPONDING move\", this.getMetadata().key, this.conf.severity, fix);\n }\n else if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 5 && ((_b = sourceRef.getFirstChild()) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase()) === \"BASE\") {\n let code = `${target.concatTokens()} = ${sourceRef.getChildren()[2].concatTokens()}.\\n`;\n code += `MOVE-CORRESPONDING ${sourceRef.getChildren()[4].concatTokens()} TO ${target.concatTokens()}`;\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, CORRESPONDING BASE move\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n downportRefSimple(high, lowFile, highSyntax) {\n var _a;\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4\n || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== \"REF\") {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source);\n if (sourceRef === undefined\n || sourceRef.getChildren().length !== 1) {\n return undefined;\n }\n let code = \"\";\n if (sourceRef.findFirstExpression(Expressions.TableExpression)) {\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).\r\nIF sy-subrc <> 0.\r\n RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\nENDIF.\r\nGET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;\n }\n else {\n code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${target.concatTokens()}`;\n }\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getStart();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple REF move\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportLoopGroup(high, lowFile, highSyntax, highFile) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\n if (!(high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n const group = high.findDirectExpression(Expressions.LoopGroupBy);\n if (group === undefined) {\n return undefined;\n }\n const groupTargetName = ((_a = group.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.concatTokens())\n || ((_b = group.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _b === void 0 ? void 0 : _b.concatTokens().replace(\"<\", \"_\").replace(\">\", \"_\"))\n || \"nameNotFound\";\n const loopSourceName = ((_c = high.findFirstExpression(Expressions.SimpleSource2)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"nameNotFound\";\n const loopTargetName = ((_d = high.findFirstExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens())\n || ((_e = high.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens())\n || \"nameNotFound\";\n const groupTarget = ((_f = group.findDirectExpression(Expressions.LoopGroupByTarget)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || \"\";\n const isReference = (_g = high.findFirstExpression(Expressions.LoopTarget)) === null || _g === void 0 ? void 0 : _g.concatTokens().toUpperCase().startsWith(\"REFERENCE INTO \");\n let loopSourceRowType = \"typeNotFound\";\n const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());\n if (spag !== undefined) {\n const found = spag.findVariable(loopSourceName);\n const tt = found === null || found === void 0 ? void 0 : found.getType();\n if (tt instanceof basic_1.TableType) {\n loopSourceRowType = tt.getRowType().getQualifiedName() || \"typeNotFound\";\n }\n }\n let code = `TYPES: BEGIN OF ${groupTargetName}type,\\n`;\n let condition = \"\";\n let groupCountName = undefined;\n let groupIndexName = undefined;\n for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {\n const name = c.findFirstExpression(Expressions.ComponentName);\n let type = ((_h = c.findFirstExpression(Expressions.Source)) === null || _h === void 0 ? void 0 : _h.concatTokens()) || \"todo\";\n if ((_j = c.concatTokens()) === null || _j === void 0 ? void 0 : _j.toUpperCase().endsWith(\" = GROUP SIZE\")) {\n type = \"i\";\n groupCountName = name === null || name === void 0 ? void 0 : name.concatTokens();\n }\n else if ((_k = c.concatTokens()) === null || _k === void 0 ? void 0 : _k.toUpperCase().endsWith(\" = GROUP INDEX\")) {\n type = \"i\";\n groupIndexName = name === null || name === void 0 ? void 0 : name.concatTokens();\n }\n else {\n if (condition !== \"\") {\n condition += \" \";\n }\n condition += c.concatTokens();\n type = type.replace(loopTargetName, loopSourceRowType);\n type = type.replace(\"->\", \"-\");\n }\n code += ` ${name === null || name === void 0 ? void 0 : name.concatTokens()} TYPE ${type},\\n`;\n }\n const s = group.findDirectExpression(Expressions.Source);\n let singleName = \"\";\n if (s) {\n let type = s.concatTokens();\n type = type.replace(loopTargetName, loopSourceRowType);\n type = type.replace(\"->\", \"-\");\n singleName = s.concatTokens().split(\"-\")[1];\n code += ` ${singleName} TYPE ${type},\\n`;\n condition = singleName + \" = \" + s.concatTokens();\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code += ` items LIKE ${loopSourceName},\r\n END OF ${groupTargetName}type.\r\nDATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.\r\nDATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.\r\nLOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\\n`;\n if (groupIndexName !== undefined) {\n code += `DATA(${uniqueNameIndex}) = sy-tabix.\\n`;\n }\n code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.\r\nIF sy-subrc = 0.\\n`;\n if (groupCountName !== undefined) {\n code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\\n`;\n }\n code += ` INSERT ${loopTargetName}${isReference ? \"->*\" : \"\"} INTO TABLE <${uniqueFS}>-items.\r\nELSE.\\n`;\n code += ` CLEAR ${uniqueName}.\\n`;\n for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {\n const concat = c.concatTokens();\n // console.dir(concat);\n if (concat.endsWith(\" GROUP INDEX\")) {\n code += ` ${uniqueName}-${groupIndexName} = ${uniqueNameIndex}.\\n`;\n }\n else if (concat.endsWith(\" GROUP SIZE\")) {\n code += ` ${uniqueName}-${groupCountName} = 1.\\n`;\n }\n else {\n code += ` ${uniqueName}-${concat}.\\n`;\n }\n }\n if (singleName !== \"\") {\n code += ` ${uniqueName}-${singleName} = ${loopTargetName}-${singleName}.\\n`;\n }\n code += ` INSERT ${loopTargetName}${isReference ? \"->*\" : \"\"} INTO TABLE ${uniqueName}-items.\\n`;\n code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\\n`;\n code += `ENDIF.\r\nENDLOOP.\r\nLOOP AT ${groupTargetName}tab ${groupTarget}.`;\n let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {\n // make sure to find the correct/current loop statement\n if (l.findDirectStatement(Statements.Loop) !== high) {\n continue;\n }\n for (const loop of l.findAllStatements(Statements.Loop)) {\n if ((_o = loop.concatTokens()) === null || _o === void 0 ? void 0 : _o.toUpperCase().startsWith(\"LOOP AT GROUP \")) {\n const subLoopSource = loop.findFirstExpression(Expressions.SimpleSource2);\n if (subLoopSource === undefined) {\n continue;\n }\n const subLoopSourceName = (subLoopSource === null || subLoopSource === void 0 ? void 0 : subLoopSource.concatTokens()) || \"nameNotFound\";\n const subCode = `LOOP AT ${subLoopSourceName}${isReference ? \"->\" : \"-\"}items`;\n const subFix = edit_helper_1.EditHelper.replaceRange(lowFile, loop.getFirstToken().getStart(), subLoopSource.getLastToken().getEnd(), subCode);\n fix = edit_helper_1.EditHelper.merge(subFix, fix);\n }\n }\n }\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, LOOP GROUP\", this.getMetadata().key, this.conf.severity, fix);\n }\n downportRef(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n let found = undefined;\n for (const s of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (s.getFirstToken().getStr().toUpperCase() === \"REF\"\n && s.findDirectExpression(Expressions.TypeNameOrInfer)) {\n found = s;\n }\n }\n if (found === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${found.concatTokens()}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, REF\", this.getMetadata().key, this.conf.severity, fix);\n }\n assignWithTable(low, high, lowFile) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Assign)) {\n return undefined;\n }\n else if (high.getChildren().length !== 5) {\n return undefined;\n }\n const fieldChain = (_b = (_a = high.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.FieldChain);\n const tableExpression = fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getLastChild();\n if (tableExpression === undefined\n || !(tableExpression.get() instanceof Expressions.TableExpression)\n || !(tableExpression instanceof nodes_1.ExpressionNode)) {\n return undefined;\n }\n let condition = \"\";\n if (tableExpression.getChildren().length === 3) {\n const index = tableExpression.findDirectExpression(Expressions.Source);\n if (index === undefined) {\n return undefined;\n }\n condition = `INDEX ${index.concatTokens()}`;\n }\n else {\n let concat = tableExpression.concatTokens();\n concat = concat.substring(2);\n concat = concat.substring(0, concat.length - 2);\n condition = `WITH KEY ${concat}`;\n }\n let pre = \"\";\n for (const c of fieldChain.getChildren()) {\n if (c === tableExpression) {\n break;\n }\n pre += c.concatTokens();\n }\n const fsTarget = high.findDirectExpression(Expressions.FSTarget);\n const code = `READ TABLE ${pre} ${condition} ASSIGNING ${fsTarget === null || fsTarget === void 0 ? void 0 : fsTarget.concatTokens()}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, ASSIGN table expr\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithSimpleValue(low, high, lowFile) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Move)\n || high.getChildren().length !== 4) {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const source = high.findDirectExpression(Expressions.Source);\n if (source === undefined) {\n return undefined;\n }\n const field = target.findDirectExpression(Expressions.TargetField);\n if (field === undefined) {\n return;\n }\n const valueBody = source.findDirectExpression(Expressions.ValueBody);\n if (valueBody === undefined) {\n return;\n }\n const fieldAssignments = valueBody.findDirectExpressions(Expressions.FieldAssignment);\n if (fieldAssignments.length === 0) {\n return;\n }\n else if (fieldAssignments.length !== valueBody.getChildren().length) {\n return;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let code = `CLEAR ${target.concatTokens()}.\\n`;\n for (const fieldAssignment of fieldAssignments) {\n code += indentation + target.concatTokens() + \"-\" + fieldAssignment.concatTokens() + `.\\n`;\n }\n code = code.trimEnd();\n const start = high.getFirstToken().getStart();\n const end = high.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, simple move\", this.getMetadata().key, this.conf.severity, fix);\n }\n // note, downporting ENUM does not give the correct types, but it will work in most cases?\n downportEnum(_low, high, lowFile, _highSyntax, highFile) {\n var _a, _b, _c, _d, _e;\n if (!(high.get() instanceof Statements.TypeEnumBegin)) {\n return undefined;\n }\n const enumStructure = (_a = highFile.getStructure()) === null || _a === void 0 ? void 0 : _a.findFirstStructure(Structures.TypeEnum);\n if (enumStructure === undefined) {\n return undefined;\n }\n if (enumStructure.getFirstStatement() !== high) {\n return undefined;\n }\n const enumName = (_b = high.findExpressionAfterToken(\"ENUM\")) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const structureName = (_c = high.findExpressionAfterToken(\"STRUCTURE\")) === null || _c === void 0 ? void 0 : _c.concatTokens();\n // all ENUMS are char like?\n let code = `TYPES ${enumName} TYPE string.\r\nCONSTANTS: BEGIN OF ${structureName},\\n`;\n let count = 1;\n for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {\n const name = (_d = e.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _d === void 0 ? void 0 : _d.concatTokens();\n let value = (_e = e.findFirstExpression(Expressions.Value)) === null || _e === void 0 ? void 0 : _e.concatTokens();\n if (value === undefined) {\n value = \"VALUE '\" + count++ + \"'\";\n }\n code += ` ${name} TYPE ${enumName} ${value},\\n`;\n }\n code += ` END OF ${structureName}.`;\n const start = enumStructure.getFirstToken().getStart();\n const end = enumStructure.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ENUM\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithTableTarget(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const target = high.findDirectExpression(Expressions.Target);\n if (target === undefined) {\n return undefined;\n }\n const tableExpression = target.findDirectExpression(Expressions.TableExpression);\n if (tableExpression === undefined) {\n return undefined;\n }\n const index = tableExpression.findDirectExpression(Expressions.Source);\n if (index === undefined) {\n return undefined;\n }\n let uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n uniqueName = `<${uniqueName}>`;\n const tName = target.concatTokens().split(\"[\")[0];\n const condition = this.tableCondition(tableExpression);\n const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n // restore tabix before exeption\n const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.\r\n${indentation}DATA ${tabixBackup} LIKE sy-tabix.\r\n${indentation}${tabixBackup} = sy-tabix.\r\n${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.\r\n${indentation}sy-tabix = ${tabixBackup}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}${uniqueName}`;\n const start = target.getFirstToken().getStart();\n const end = (_a = tableExpression.findDirectTokenByText(\"]\")) === null || _a === void 0 ? void 0 : _a.getEnd();\n if (end === undefined) {\n return undefined;\n }\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, move with table target\", this.getMetadata().key, this.conf.severity, fix);\n }\n moveWithOperator(low, high, lowFile) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const children = high.getChildren();\n const secondChild = children[1];\n if (secondChild === undefined) {\n return undefined;\n }\n const op = secondChild.getFirstToken();\n let operator = \"\";\n switch (op.getStr()) {\n case \"+\":\n operator = \" + \";\n break;\n case \"-\":\n operator = \" - \";\n break;\n case \"/=\":\n operator = \" / \";\n break;\n case \"*=\":\n operator = \" * \";\n break;\n case \"&&=\":\n operator = \" && \";\n break;\n default:\n return undefined;\n }\n const target = (_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (target === undefined) {\n return;\n }\n const sourceStart = (_c = (_b = high.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStart();\n if (sourceStart === undefined) {\n return;\n }\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, \"= \" + target + operator);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Expand operator\", this.getMetadata().key, this.conf.severity, fix);\n }\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\n stringTemplateAlpha(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Move)) {\n return undefined;\n }\n const topSource = high.findDirectExpression(Expressions.Source);\n if (topSource === undefined || topSource.getChildren().length !== 1) {\n return undefined;\n }\n let top = true;\n let child = topSource.getFirstChild();\n if (!(child.get() instanceof Expressions.StringTemplate)) {\n child = child.findFirstExpression(Expressions.StringTemplate);\n top = false;\n }\n if (child === undefined || !(child.get() instanceof Expressions.StringTemplate)) {\n return undefined;\n }\n const templateTokens = child.getChildren();\n if (templateTokens.length !== 3\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\n return undefined;\n }\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n let functionName = \"\";\n switch (formatting) {\n case \"ALPHA = IN\":\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\n break;\n case \"ALPHA = OUT\":\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\n break;\n default:\n return undefined;\n }\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const topTarget = (_c = high.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n if (top === false) {\n const code = `DATA ${uniqueName} TYPE string.\r\n${indentation}CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${uniqueName}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n const code = `CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${topTarget}.`;\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n outlineLoopInput(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n else if (!(high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n else if (high.findDirectExpression(Expressions.SimpleSource2)) {\n return undefined;\n }\n // the first Source must be outlined\n const s = high.findDirectExpression(Expressions.Source);\n if (s === undefined) {\n return undefined;\n }\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\n }\n outlineLoopTarget(node, lowFile, highSyntax) {\n var _a, _b, _c, _d, _e, _f, _g;\n // also allows outlining of voided types\n if (!(node.get() instanceof Statements.Loop)) {\n return undefined;\n }\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (sourceName === undefined) {\n return undefined;\n }\n const concat = node.concatTokens().toUpperCase();\n if (concat.includes(\" GROUP BY \") || concat.startsWith(\"LOOP AT GROUP \")) {\n return undefined;\n }\n const isReference = concat.includes(\" REFERENCE INTO \");\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const dataTarget = (_c = (_b = node.findDirectExpression(Expressions.LoopTarget)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(Expressions.InlineData);\n if (dataTarget) {\n const targetName = ((_d = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || \"DOWNPORT_ERROR\";\n let code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\n if (isReference) {\n const likeName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n code = `DATA ${likeName} LIKE LINE OF ${sourceName}.\\n${indentation}DATA ${targetName} LIKE REF TO ${likeName}.\\n${indentation}`;\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\n }\n const fsTarget = (_f = (_e = node.findDirectExpression(Expressions.LoopTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.FSTarget)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(Expressions.InlineFS);\n if (fsTarget) {\n const targetName = ((_g = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || \"DOWNPORT_ERROR\";\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineFor(forLoop, indentation, lowFile, highSyntax) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n let body = \"\";\n let end = \"\";\n const loopSource = (_a = forLoop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n let loopTargetFieldExpression = forLoop.findFirstExpression(Expressions.TargetField);\n let loopTargetFieldName = loopTargetFieldExpression === null || loopTargetFieldExpression === void 0 ? void 0 : loopTargetFieldExpression.concatTokens();\n const of = forLoop.findExpressionAfterToken(\"OF\");\n if (of !== undefined) {\n loopTargetFieldExpression = of;\n loopTargetFieldName = of === null || of === void 0 ? void 0 : of.concatTokens();\n }\n if (((_c = (_b = forLoop.findDirectExpression(Expressions.InlineLoopDefinition)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.get()) instanceof Expressions.TargetFieldSymbol) {\n loopTargetFieldExpression = undefined;\n loopTargetFieldName = undefined;\n }\n if (loopTargetFieldExpression) {\n const start = loopTargetFieldExpression.getFirstToken().getStart();\n const spag = highSyntax.spaghetti.lookupPosition(start, lowFile.getFilename());\n if (loopTargetFieldName && spag) {\n if (new SpagHelper(spag).isDuplicateName(loopTargetFieldName, start)) {\n this.renameVariable(spag, loopTargetFieldName, start, lowFile, highSyntax);\n }\n }\n }\n let cond = ((_d = forLoop.findDirectExpression(Expressions.ComponentCond)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || \"\";\n if (cond !== \"\") {\n cond = \" WHERE \" + cond;\n }\n const loop = forLoop.findDirectExpression(Expressions.InlineLoopDefinition);\n const indexInto = (_e = loop === null || loop === void 0 ? void 0 : loop.findExpressionAfterToken(\"INTO\")) === null || _e === void 0 ? void 0 : _e.concatTokens();\n if (forLoop.findDirectTokenByText(\"UNTIL\")\n || forLoop.findDirectTokenByText(\"WHILE\")) {\n const fieldDef = forLoop.findDirectExpression(Expressions.InlineFieldDefinition);\n const field = (_f = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.findFirstExpression(Expressions.Field)) === null || _f === void 0 ? void 0 : _f.concatTokens();\n const indexBackup = this.uniqueName(forLoop.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n body += indentation + \"DATA \" + field + \" TYPE i.\\n\";\n const second = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.getChildren()[2];\n if ((second === null || second === void 0 ? void 0 : second.get()) instanceof Expressions.Source) {\n body += indentation + field + \" = \" + second.concatTokens() + \".\\n\";\n }\n const not = forLoop.findDirectTokenByText(\"UNTIL\") ? \" NOT\" : \"\";\n const cond = forLoop.findFirstExpression(Expressions.Cond);\n body += indentation + `DATA ${indexBackup} LIKE sy-index.\\n`;\n body += indentation + `${indexBackup} = sy-index.\\n`;\n body += indentation + `WHILE${not} ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\\n`;\n body += indentation + ` sy-index = ${indexBackup}.\\n`;\n const then = forLoop.findExpressionAfterToken(\"THEN\");\n if (then) {\n end += ` ${field} = ${then.concatTokens()}.\\n`;\n }\n else {\n end += ` ${field} = ${field} + 1.\\n`;\n }\n end += indentation + \"ENDWHILE\";\n }\n else if (loopTargetFieldName !== undefined) {\n let from = (_g = forLoop.findExpressionAfterToken(\"FROM\")) === null || _g === void 0 ? void 0 : _g.concatTokens();\n from = from ? \" FROM \" + from : \"\";\n let to = (_h = forLoop.findExpressionAfterToken(\"TO\")) === null || _h === void 0 ? void 0 : _h.concatTokens();\n to = to ? \" TO \" + to : \"\";\n let gby = \"\";\n for (const lg of forLoop.findDirectExpressions(Expressions.LoopGroupByComponent)) {\n if (gby !== \"\") {\n gby += \" \";\n }\n gby += lg.concatTokens();\n }\n if (gby !== \"\") {\n gby = \" GROUP BY ( \" + gby + \" )\";\n }\n const fc = forLoop.findDirectExpression(Expressions.FieldChain);\n if (fc) {\n gby = \" GROUP BY \" + fc.concatTokens();\n }\n if (forLoop.findDirectTokenByText(\"ASCENDING\")) {\n gby += \" ASCENDING\";\n }\n if (forLoop.findDirectTokenByText(\"DESCENDING\")) {\n gby += \" DESCENDING\";\n }\n const groups = forLoop.findExpressionAfterToken(\"GROUPS\");\n if (groups) {\n const concat = groups.concatTokens();\n if (concat.startsWith(\"<\")) {\n gby += \" ASSIGNING FIELD-SYMBOL(\" + concat + \")\";\n }\n else {\n gby += \" INTO DATA(\" + concat + \")\";\n }\n }\n let inGroup = \"\";\n if (forLoop.concatTokens().toUpperCase().includes(\" IN GROUP \")) {\n inGroup = \"-items\";\n }\n let into = \"INTO DATA\";\n if (loopTargetFieldName.startsWith(\"<\")) {\n into = \"ASSIGNING FIELD-SYMBOL\";\n }\n // todo, also backup sy-index / sy-tabix here?\n body += indentation + `LOOP AT ${loopSource}${inGroup} ${into}(${loopTargetFieldName})${from}${to}${cond}${gby}.\\n`;\n if (indexInto) {\n body += indentation + \" DATA(\" + indexInto + \") = sy-tabix.\\n\";\n }\n end = \"ENDLOOP\";\n }\n else if (loopTargetFieldName === undefined) {\n // todo, also backup sy-index / sy-tabix here?\n const loopTargetFieldSymbol = (_j = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _j === void 0 ? void 0 : _j.concatTokens();\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol})${cond}.\\n`;\n if (indexInto) {\n body += indentation + \" DATA(\" + indexInto + \") = sy-tabix.\\n\";\n }\n end = \"ENDLOOP\";\n }\n const l = forLoop.findDirectExpression(Expressions.Let);\n if (l) {\n body += this.outlineLet(l, indentation, highSyntax, lowFile);\n }\n return { body, end };\n }\n outlineFilter(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"FILTER\") {\n continue;\n }\n const filterBody = i.findDirectExpression(Expressions.FilterBody);\n if (filterBody === undefined) {\n continue;\n }\n const sourceName = (_a = filterBody.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (sourceName === undefined) {\n continue;\n }\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n type = \"LIKE \" + sourceName;\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const loopName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n body += `DATA ${uniqueName} ${type}.\\n`;\n body += `${indentation}LOOP AT ${sourceName} INTO DATA(${loopName}) ${filterBody.concatTokens().substring(sourceName.length + 1)}.\\n`;\n body += `${indentation} INSERT ${loopName} INTO TABLE ${uniqueName}.\\n`;\n body += `${indentation}ENDLOOP.\\n${indentation}`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), body);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport FILTER\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineSwitch(low, high, lowFile, highSyntax) {\n var _a, _b, _c, _d;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"SWITCH\") {\n continue;\n }\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move\n && high.findDirectExpression(Expressions.Source) === i\n && ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.TargetField)) !== undefined) {\n type = \"LIKE \" + ((_b = high.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n let name = \"\";\n const switchBody = i.findDirectExpression(Expressions.SwitchBody);\n if (switchBody === undefined) {\n continue;\n }\n for (const l of ((_c = switchBody === null || switchBody === void 0 ? void 0 : switchBody.findDirectExpression(Expressions.Let)) === null || _c === void 0 ? void 0 : _c.findDirectExpressions(Expressions.InlineFieldDefinition)) || []) {\n name = l.getFirstToken().getStr();\n body += indentation + `DATA(${name}) = ${(_d = switchBody.findFirstExpression(Expressions.Source)) === null || _d === void 0 ? void 0 : _d.concatTokens()}.\\n`;\n }\n body += `DATA ${uniqueName} ${type}.\\n`;\n let firstSource = false;\n let inWhen = false;\n for (const c of switchBody.getChildren()) {\n if (c.get() instanceof Expressions.Source && firstSource === false) {\n body += indentation + `CASE ${c.concatTokens()}.`;\n firstSource = true;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"THEN\") {\n inWhen = true;\n body += \".\\n\";\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"WHEN\") {\n inWhen = false;\n body += `\\n${indentation} WHEN `;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"OR\") {\n body += ` OR `;\n }\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"ELSE\") {\n inWhen = true;\n body += `\\n${indentation} WHEN OTHERS.\\n`;\n }\n else if (inWhen === false) {\n body += c.concatTokens();\n }\n else {\n body += indentation + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\";\n }\n }\n body += \"\\n\" + indentation + \"ENDCASE.\\n\" + indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), body);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport SWITCH\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineReduce(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n const firstToken = i.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\n continue;\n }\n const type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n let name = \"\";\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\n if (reduceBody === undefined) {\n continue;\n }\n const letNode = reduceBody.findDirectExpression(Expressions.Let);\n if (letNode) {\n body += this.outlineLet(letNode, indentation, highSyntax, lowFile);\n }\n let firstName = \"\";\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\n name = init.getFirstToken().getStr();\n if (firstName === \"\") {\n firstName = name;\n }\n const spag = highSyntax.spaghetti.lookupPosition(init.getFirstToken().getStart(), lowFile.getFilename());\n if (spag && new SpagHelper(spag).isDuplicateName(name, init.getFirstToken().getStart())) {\n this.renameVariable(spag, name, init.getFirstToken().getStart(), lowFile, highSyntax);\n }\n const s = (_a = init.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n const t = (_b = init.findFirstExpression(Expressions.TypeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (s) {\n if (s.toUpperCase().startsWith(\"VALUE #\")) {\n body += indentation + `DATA(${name}) = ${s.replace(\"#\", type)}.\\n`;\n }\n else {\n body += indentation + `DATA(${name}) = ${s}.\\n`;\n }\n }\n else {\n body += indentation + `DATA ${name} TYPE ${t}.\\n`;\n }\n }\n let end = \"\";\n for (const forLoop of (reduceBody === null || reduceBody === void 0 ? void 0 : reduceBody.findDirectExpressions(Expressions.For)) || []) {\n const outlineFor = this.outlineFor(forLoop, indentation, lowFile, highSyntax);\n body += outlineFor.body;\n end = outlineFor.end + `.\\n` + end;\n }\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\n if (next === undefined) {\n continue;\n }\n for (const n of next.getChildren()) {\n const concat = n.concatTokens();\n if (concat.toUpperCase() === \"NEXT\") {\n continue;\n }\n else if (n.get() instanceof Expressions.SimpleTarget) {\n body += indentation + \" \" + concat + \" \";\n }\n else if (n.get() instanceof Expressions.Source) {\n body += \" \" + concat + \".\\n\";\n }\n else {\n body += concat;\n }\n }\n body += indentation + end;\n body += indentation + `${uniqueName} = ${firstName}.\\n`;\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n body +\n indentation;\n const reduceEnd = i.findDirectTokenByText(\")\");\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), reduceEnd.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineValue(low, high, lowFile, highSyntax) {\n var _a, _b, _c;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const allSources = high.findAllExpressionsRecursive(Expressions.Source);\n for (const s of allSources) {\n const firstToken = s.getFirstToken();\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\n continue;\n }\n const valueBody = s.findDirectExpression(Expressions.ValueBody);\n let type = this.findType(s, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move && high.findDirectExpression(Expressions.Source) === s) {\n type = \"LIKE \" + ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n let indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n let body = \"\";\n const base = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findExpressionAfterToken(\"BASE\");\n if (base) {\n body += indentation + uniqueName + \" = \" + base.concatTokens() + \".\\n\";\n }\n let end = \"\";\n let structureName = uniqueName;\n let added = false;\n let data = \"\";\n let previous = undefined;\n if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined) {\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n const extra = (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) ? \" \" : \"\";\n data = indentation + extra + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\n }\n for (const a of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\n if (a.get() instanceof Expressions.FieldAssignment) {\n if (added === false) {\n body += data;\n added = true;\n }\n body += indentation + structureName + \"-\" + a.concatTokens() + \".\\n\";\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.For) {\n const outlineFor = this.outlineFor(a, indentation, lowFile, highSyntax);\n body += outlineFor.body;\n end = outlineFor.end + `.\\n` + end;\n indentation += \" \";\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.Source) {\n // special handling for superflous value expression\n if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren().length) === 1) {\n body += indentation + uniqueName + \" = \" + a.concatTokens() + `.\\n`;\n }\n }\n else if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.Let) {\n body += this.outlineLet(a, indentation, highSyntax, lowFile);\n }\n if (a instanceof nodes_1.ExpressionNode && a.get() instanceof Expressions.ValueBodyLine) {\n let skip = false;\n for (const b of (a === null || a === void 0 ? void 0 : a.getChildren()) || []) {\n if (b.get() instanceof Expressions.FieldAssignment) {\n if (added === false) {\n body += data;\n added = true;\n }\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\n }\n else if (b.get() instanceof Expressions.Source) {\n body += indentation + \"APPEND \" + b.concatTokens() + ` TO ${uniqueName}.\\n`;\n skip = true;\n }\n else if (b.get() instanceof Expressions.ValueBodyLines) {\n body += indentation + \"APPEND \" + b.concatTokens() + ` TO ${uniqueName}.\\n`;\n skip = true;\n }\n else if (b.concatTokens() === \")\") {\n if (added === false && (previous === null || previous === void 0 ? void 0 : previous.concatTokens()) === \"(\") {\n body += data;\n added = true;\n }\n if (skip === false) {\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\n }\n }\n previous = b;\n }\n }\n }\n if (body === \"\" && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase()) === \"OPTIONAL\") {\n const fieldChain = valueBody.findFirstExpression(Expressions.FieldChain);\n const rowName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\n let tableExpression = undefined;\n let tabName = \"\";\n let after = \"\";\n for (const c of (fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getChildren()) || []) {\n if (c.get() instanceof Expressions.TableExpression && c instanceof nodes_1.ExpressionNode) {\n tableExpression = c;\n }\n else if (tableExpression === undefined) {\n tabName += c.concatTokens();\n }\n else {\n after += c.concatTokens();\n }\n }\n let condition = \"\";\n if ((tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.getChildren().length) === 3) {\n condition = \"INDEX \" + ((_c = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens());\n }\n else {\n condition = \"WITH KEY \" + (tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.concatTokens().replace(\"[ \", \"\").replace(\" ]\", \"\"));\n }\n body +=\n indentation + `READ TABLE ${tabName} INTO DATA(${rowName}) ${condition}.\\n` +\n indentation + `IF sy-subrc = 0.\\n` +\n indentation + ` ${uniqueName} = ${rowName}${after}.\\n` +\n indentation + `ENDIF.\\n`;\n }\n if (end !== \"\") {\n indentation = indentation.substring(2);\n body += indentation + end;\n }\n const abap = `DATA ${uniqueName} ${type}.\\n` +\n indentation + `CLEAR ${uniqueName}.\\n` + // might be called inside a loop\n body +\n indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineLet(node, indentation, highSyntax, lowFile) {\n var _a;\n let ret = \"\";\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\n const c = f.getFirstChild();\n if (c === undefined) {\n continue;\n }\n const name = c.concatTokens().toLowerCase();\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n if (new SpagHelper(spag).isDuplicateName(name, c.getFirstToken().getStart())) {\n this.renameVariable(spag, name, c.getFirstToken().getStart(), lowFile, highSyntax);\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n const source = f.findFirstExpression(Expressions.Source);\n if (source) {\n ret += indentation + \"DATA(\" + name + `) = ${source.concatTokens()}.\\n`;\n }\n continue;\n }\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\n const source = f.findFirstExpression(Expressions.Source);\n if (source) {\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\n }\n }\n return ret;\n }\n renameVariable(spag, name, pos, lowFile, highSyntax) {\n const newName = this.uniqueName(pos, lowFile.getFilename(), highSyntax);\n const fix = new SpagHelper(spag).renameVariable(name, pos, lowFile, newName);\n const issue = issue_1.Issue.atPosition(lowFile, pos, \"Rename before outline\", this.getMetadata().key, this.conf.severity, fix);\n throw new SkipToNextFile(issue);\n }\n findType(i, lowFile, highSyntax, ref = false) {\n var _a;\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\n if (expr === undefined) {\n return undefined;\n }\n const firstToken = expr.getFirstToken();\n const concat = expr.concatTokens().toLowerCase();\n if (concat !== \"#\") {\n return ref ? \"REF TO \" + concat : concat;\n }\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n return undefined;\n }\n let inferred = undefined;\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.InferredType\n && r.resolved\n && r.position.getStart().equals(firstToken.getStart())\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\n inferred = r.resolved;\n break;\n }\n }\n if (inferred === undefined) {\n return undefined;\n }\n if (inferred.getType() instanceof basic_1.ObjectReferenceType) {\n return inferred.getType().toABAP();\n }\n else {\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n }\n }\n outlineFS(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)\n || (high.get() instanceof Statements.Loop)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.InlineFS)) {\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n if (nameToken === undefined) {\n continue;\n }\n const name = nameToken.getStr();\n let type = \"\";\n if (high.concatTokens().toUpperCase().startsWith(\"APPEND INITIAL LINE TO \")) {\n type = \"LIKE LINE OF \" + ((_b = high.findFirstExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n else {\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n continue;\n }\n else if (found.getType() instanceof basic_1.VoidType) {\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\n }\n type = \"TYPE \";\n type += found.getType().getQualifiedName() ? found.getType().getQualifiedName().toLowerCase() : found.getType().toABAP();\n }\n const code = `FIELD-SYMBOLS ${name} ${type}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineData(node, lowFile, highSyntax) {\n // hmm, no guard here, as DATA(SDF) is valid in 702\n var _a, _b;\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n if (nameToken === undefined) {\n continue;\n }\n const name = nameToken.getStr();\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\n if (spag === undefined) {\n continue;\n }\n const found = spag.findVariable(name);\n if (found === undefined) {\n continue;\n }\n else if (found.getType() instanceof basic_1.VoidType && found.getType().getQualifiedName() === undefined) {\n continue;\n }\n let type = found.getType().getQualifiedName()\n ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase()\n : found.getType().toABAP();\n if (found.getType() instanceof basic_1.ObjectReferenceType) {\n type = found.getType().toABAP();\n }\n if (type === \"\") {\n continue;\n }\n const code = `DATA ${name} TYPE ${type}.\\n` +\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n outlineCond(low, high, lowFile, highSyntax) {\n var _a, _b;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\n continue;\n }\n const body = i.findDirectExpression(Expressions.CondBody);\n if (body === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n let type = this.findType(i, lowFile, highSyntax);\n if (type === undefined) {\n if (high.get() instanceof Statements.Move\n && high.findDirectExpression(Expressions.Source) === i\n && ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.TargetField)) !== undefined) {\n type = \"LIKE \" + ((_b = high.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\n }\n if (type === undefined) {\n continue;\n }\n }\n else {\n type = \"TYPE \" + type;\n }\n const indent = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const bodyCode = this.buildCondBody(body, uniqueName, indent, lowFile, highSyntax);\n const last = i.findDirectTokenByText(\")\");\n const abap = `DATA ${uniqueName} ${type}.\\n` + bodyCode;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), last.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n buildCondBody(body, uniqueName, indent, lowFile, highSyntax) {\n let code = \"\";\n let first = true;\n let addElse = true;\n for (const c of body.getChildren()) {\n if (c instanceof nodes_1.TokenNode) {\n switch (c.getFirstToken().getStr().toUpperCase()) {\n case \"WHEN\":\n if (first === true) {\n code += indent + \"IF \";\n first = false;\n }\n else {\n code += indent + \"ELSEIF \";\n }\n break;\n case \"THEN\":\n code += \".\\n\";\n break;\n case \"ELSE\":\n code += indent + \"ELSE.\\n\";\n addElse = false;\n break;\n default:\n throw \"buildCondBody, unexpected token\";\n }\n }\n else if (c.get() instanceof Expressions.Cond) {\n code += c.concatTokens();\n }\n else if (c.get() instanceof Expressions.Let) {\n code += this.outlineLet(c, indent, highSyntax, lowFile);\n }\n else if (c.get() instanceof Expressions.Source) {\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\n }\n else if (c.get() instanceof Expressions.Throw) {\n code += indent + \" \" + c.concatTokens().replace(/THROW /i, \"RAISE EXCEPTION NEW \") + \".\\n\";\n }\n else {\n throw \"buildCondBody, unexpected expression, \" + c.get().constructor.name;\n }\n }\n if (addElse) {\n // COND might be called inside a loop\n code += indent + \"ELSE.\\n\";\n code += indent + ` CLEAR ${uniqueName}.\\n`;\n }\n code += indent + \"ENDIF.\\n\";\n code += indent;\n return code;\n }\n outlineConv(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Source)) {\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\n continue;\n }\n const end = i.findDirectTokenByText(\")\");\n if (end === undefined) {\n continue;\n }\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (body === undefined) {\n continue;\n }\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const type = this.findType(i, lowFile, highSyntax);\n const indent = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n indent + `${uniqueName} = ${body}.\\n` +\n indent;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), end.getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n // \"CAST\" to \"?=\"\n outlineCast(low, high, lowFile, highSyntax) {\n var _a;\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const i of high.findAllExpressionsRecursive(Expressions.Cast)) {\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const type = this.findType(i, lowFile, highSyntax, true);\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1) +\n `${uniqueName} ?= ${body}.\\n` +\n \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n uniqueName(position, filename, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\n if (spag === undefined) {\n const name = \"temprr\" + this.counter;\n this.counter++;\n return name;\n }\n while (true) {\n const name = \"temp\" + this.counter;\n const exists = this.existsRecursive(spag, name);\n this.counter++;\n if (exists === false) {\n return name;\n }\n }\n }\n existsRecursive(spag, name) {\n const existsDirect = spag.findVariable(name);\n if (existsDirect) {\n return true;\n }\n for (const child of spag.getChildren()) {\n if (child.findVariable(name) || this.existsRecursive(child, name)) {\n return true;\n }\n }\n return false;\n }\n replaceXsdBool(node, lowFile, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\n const token = r.position.getToken();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n findMethodCallExpression(node, token) {\n var _a;\n for (const m of node.findAllExpressions(Expressions.MethodCall)) {\n if ((_a = m.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStart().equals(token.getStart())) {\n return m;\n }\n }\n return undefined;\n }\n replaceMethodConditional(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n for (const c of high.findAllExpressionsRecursive(Expressions.Compare)) {\n const chain = c.findDirectExpression(Expressions.MethodCallChain);\n if (chain === undefined) {\n continue;\n }\n const concat = chain.concatTokens().toUpperCase();\n if (concat.startsWith(\"LINE_EXISTS( \") || concat.startsWith(\"LINE_INDEX( \")) {\n // these are handled separately\n continue;\n }\n let predicate = false;\n const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference &&\n new _builtin_1.BuiltIn().isPredicate(chain.getFirstToken().getStr().toUpperCase())) {\n predicate = true;\n break;\n }\n }\n const end = chain.getLastToken().getEnd();\n let fix = edit_helper_1.EditHelper.insertAt(lowFile, end, \" IS NOT INITIAL\");\n if (predicate === true) {\n fix = edit_helper_1.EditHelper.insertAt(lowFile, end, \" ) = abap_true\");\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, chain.getFirstToken().getStart(), \"boolc( \");\n fix = edit_helper_1.EditHelper.merge(fix, fix1);\n }\n return issue_1.Issue.atToken(lowFile, chain.getFirstToken(), \"Downport method conditional\", this.getMetadata().key, this.conf.severity, fix);\n }\n return undefined;\n }\n getReference(node, lowFile, _highSyntax) {\n var _a, _b, _c;\n if (!(node.get() instanceof Statements.GetReference)) {\n return undefined;\n }\n const inline = (_a = node.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.InlineData);\n if (inline === undefined) {\n return undefined;\n }\n const targetName = (_b = inline.findDirectExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n const sourceName = (_c = node.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens();\n if (targetName === undefined || sourceName === undefined) {\n return undefined;\n }\n const code = `DATA ${targetName} LIKE REF TO ${sourceName}.\\n`;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inline.getFirstToken().getStart(), inline.getLastToken().getEnd(), targetName);\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, inline.getFirstToken(), \"Downport, outline DATA ref\", this.getMetadata().key, this.conf.severity, fix);\n }\n replaceContains(node, lowFile, highSyntax) {\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n // only downport if its an single method call condition\n let found = false;\n for (const c of node.findAllExpressionsRecursive(Expressions.Compare)) {\n found = c.findDirectExpression(Expressions.MethodCallChain) !== undefined;\n if (found === true) {\n break;\n }\n }\n if (found === false) {\n return undefined;\n }\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\n continue;\n }\n const func = r.position.getName().toUpperCase();\n if (func === \"CONTAINS\") {\n const token = r.position.getToken();\n const expression = this.findMethodCallExpression(node, token);\n if (expression === undefined) {\n continue;\n }\n const sList = expression.findAllExpressions(Expressions.Source).map(e => e.concatTokens());\n if (sList.length !== 2) {\n continue;\n }\n const code = sList[0] + \" CS \" + sList[1];\n const start = expression.getFirstToken().getStart();\n const end = expression.getLastToken().getEnd();\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\n return issue_1.Issue.atToken(lowFile, token, \"Downport contains()\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n replaceLineFunctions(node, lowFile, highSyntax, highFile) {\n var _a, _b;\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\n continue;\n }\n const func = r.position.getName().toUpperCase();\n if (func === \"LINE_EXISTS\" || func === \"LINE_INDEX\") {\n const token = r.position.getToken();\n const expression = this.findMethodCallExpression(node, token);\n if (expression === undefined) {\n continue;\n }\n let condition = \"\";\n for (const c of ((_a = expression === null || expression === void 0 ? void 0 : expression.findFirstExpression(Expressions.TableExpression)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\n continue;\n }\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\n condition = \"WITH KEY \";\n }\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\n condition = \"INDEX \";\n }\n condition += c.concatTokens() + \" \";\n }\n const tableName = (_b = expression.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens().split(\"[\")[0];\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\n const sy = func === \"LINE_EXISTS\" ? \"sy-subrc\" : \"sy-tabix\";\n const code = `DATA ${uniqueName} LIKE sy-subrc.\\n` +\n indentation + `READ TABLE ${tableName} ${condition}TRANSPORTING NO FIELDS.\\n` +\n indentation + uniqueName + ` = ${sy}.\\n` +\n indentation;\n let insertAt = node.getFirstToken().getStart();\n if (node.get() instanceof statements_1.ElseIf) {\n // assumption: no side effects in IF conditions\n insertAt = this.findStartOfIf(node, highFile);\n if (insertAt === undefined) {\n continue;\n }\n }\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, insertAt, code);\n const start = expression.getFirstToken().getStart();\n const end = expression.getLastToken().getEnd();\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, uniqueName + (func === \"LINE_EXISTS\" ? \" = 0\" : \"\"));\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n return issue_1.Issue.atToken(lowFile, token, \"Replace line function\", this.getMetadata().key, this.conf.severity, fix);\n }\n }\n return undefined;\n }\n findStartOfIf(node, highFile) {\n const structure = highFile.getStructure();\n for (const c of (structure === null || structure === void 0 ? void 0 : structure.findAllStructuresRecursive(Structures.If)) || []) {\n for (const ei of c.findDirectStructures(Structures.ElseIf)) {\n if (ei.getFirstStatement() === node) {\n return c.getFirstToken().getStart();\n }\n }\n }\n return undefined;\n }\n newToCreateObject(low, high, lowFile, highSyntax) {\n if (!(low.get() instanceof _statement_1.Unknown)) {\n return undefined;\n }\n const source = high.findDirectExpression(Expressions.Source);\n let fix = undefined;\n if (high.get() instanceof Statements.Move\n && source\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\n const target = high.findDirectExpression(Expressions.Target);\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\n if (target\n && found\n && source.concatTokens() === found.concatTokens()\n && target.findDirectExpression(Expressions.InlineData) === undefined) {\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\n if (abap !== undefined) {\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), abap);\n }\n }\n }\n if (fix === undefined && high.findAllExpressions(Expressions.NewObject)) {\n const found = high.findFirstExpression(Expressions.NewObject);\n if (found === undefined) {\n return undefined;\n }\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\n const abap = this.newParameters(found, name, highSyntax, lowFile);\n if (abap === undefined) {\n return undefined;\n }\n const type = this.findType(found, lowFile, highSyntax);\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\n indentation + abap + \"\\n\" +\n indentation;\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\n }\n if (fix) {\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\n }\n else {\n return undefined;\n }\n }\n newParameters(found, name, highSyntax, lowFile) {\n var _a, _b, _c;\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\n if (parameters) {\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\n }\n else if (typeToken) {\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (source) {\n // find the default parameter name for the constructor\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\n let cdef = undefined;\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\n cdef = r.resolved;\n }\n }\n if (cdef && cdef.getMethodDefinitions === undefined) {\n return undefined; // something wrong\n }\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\n if (importing) {\n extra += \" EXPORTING \" + importing + \" = \" + source;\n }\n else if (spag === undefined) {\n extra += \" SpagUndefined\";\n }\n else if (cdef === undefined) {\n extra += \" ClassDefinitionNotFound\";\n }\n else {\n extra += \" SomeError\";\n }\n }\n }\n const abap = `CREATE OBJECT ${name}${extra}.`;\n return abap;\n }\n}\nexports.Downport = Downport;\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
|
|
12318
12329
|
|
|
12319
12330
|
/***/ }),
|
|
12320
12331
|
|
|
@@ -12578,7 +12589,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
12578
12589
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
12579
12590
|
|
|
12580
12591
|
"use strict";
|
|
12581
|
-
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_comment_style */ \"./node_modules/@abaplint/core/build/src/rules/cds_comment_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_legacy_view */ \"./node_modules/@abaplint/core/build/src/rules/cds_legacy_view.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\n__exportStar(__webpack_require__(/*! ./change_if_to_case */ \"./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./classic_exceptions_overlap */ \"./node_modules/@abaplint/core/build/src/rules/classic_exceptions_overlap.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\n__exportStar(__webpack_require__(/*! ./expand_macros */ \"./node_modules/@abaplint/core/build/src/rules/expand_macros.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fully_type_itabs */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_itabs.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_external_form_calls */ \"./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ \"./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./nrob_consistency */ \"./node_modules/@abaplint/core/build/src/rules/nrob_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_preceding_zeros */ \"./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./pragma_style */ \"./node_modules/@abaplint/core/build/src/rules/pragma_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_single_full_key */ \"./node_modules/@abaplint/core/build/src/rules/select_single_full_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./slow_parameter_passing */ \"./node_modules/@abaplint/core/build/src/rules/slow_parameter_passing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\n__exportStar(__webpack_require__(/*! ./strict_sql */ \"./node_modules/@abaplint/core/build/src/rules/strict_sql.js\"), exports);\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\n__exportStar(__webpack_require__(/*! ./superfluous_value */ \"./node_modules/@abaplint/core/build/src/rules/superfluous_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_pragma */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_pragma.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_return */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
|
|
12592
|
+
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_comment_style */ \"./node_modules/@abaplint/core/build/src/rules/cds_comment_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_legacy_view */ \"./node_modules/@abaplint/core/build/src/rules/cds_legacy_view.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\n__exportStar(__webpack_require__(/*! ./change_if_to_case */ \"./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./classic_exceptions_overlap */ \"./node_modules/@abaplint/core/build/src/rules/classic_exceptions_overlap.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\n__exportStar(__webpack_require__(/*! ./expand_macros */ \"./node_modules/@abaplint/core/build/src/rules/expand_macros.js\"), exports);\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\n__exportStar(__webpack_require__(/*! ./fully_type_itabs */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_itabs.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_external_form_calls */ \"./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ \"./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./nrob_consistency */ \"./node_modules/@abaplint/core/build/src/rules/nrob_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_preceding_zeros */ \"./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js\"), exports);\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\n__exportStar(__webpack_require__(/*! ./pragma_style */ \"./node_modules/@abaplint/core/build/src/rules/pragma_style.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\n__exportStar(__webpack_require__(/*! ./select_single_full_key */ \"./node_modules/@abaplint/core/build/src/rules/select_single_full_key.js\"), exports);\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./slow_parameter_passing */ \"./node_modules/@abaplint/core/build/src/rules/slow_parameter_passing.js\"), exports);\n__exportStar(__webpack_require__(/*! ./smim_consistency */ \"./node_modules/@abaplint/core/build/src/rules/smim_consistency.js\"), exports);\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\n__exportStar(__webpack_require__(/*! ./strict_sql */ \"./node_modules/@abaplint/core/build/src/rules/strict_sql.js\"), exports);\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\n__exportStar(__webpack_require__(/*! ./superfluous_value */ \"./node_modules/@abaplint/core/build/src/rules/superfluous_value.js\"), exports);\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_pragma */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_pragma.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unnecessary_return */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
|
|
12582
12593
|
|
|
12583
12594
|
/***/ }),
|
|
12584
12595
|
|
|
@@ -12985,7 +12996,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
12985
12996
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12986
12997
|
|
|
12987
12998
|
"use strict";
|
|
12988
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.OmitPrecedingZeros = exports.OmitPrecedingZerosConf = void 0;\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\nclass OmitPrecedingZerosConf extends _basic_rule_config_1.BasicRuleConfig {\n}\nexports.OmitPrecedingZerosConf = OmitPrecedingZerosConf;\nclass OmitPrecedingZeros extends _abap_rule_1.ABAPRule {\n constructor() {\n super(...arguments);\n this.conf = new OmitPrecedingZerosConf();\n }\n getMetadata() {\n return {\n key: \"omit_preceding_zeros\",\n title: \"Omit preceding zeros\",\n shortDescription: `Omit preceding zeros from integer constants`,\n tags: [_irule_1.RuleTag.SingleFile],\n badExample: `int = -001.`,\n goodExample: `int = -1.`,\n };\n }\n getConfig() {\n return this.conf;\n }\n setConfig(conf) {\n this.conf = conf;\n }\n runParsed(file) {\n const issues = [];\n for (const s of file.getStatements()) {\n for (const i of s.findAllExpressions(Expressions.Integer)) {\n const token = i.getLastToken();\n const str = token.getStr();\n if (str.length > 1 && str.startsWith(\"0\")) {\n if (s.get() instanceof statements_1.CallScreen || s.get() instanceof statements_1.SetScreen) {\n continue;\n }\n const
|
|
12999
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.OmitPrecedingZeros = exports.OmitPrecedingZerosConf = void 0;\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\nclass OmitPrecedingZerosConf extends _basic_rule_config_1.BasicRuleConfig {\n}\nexports.OmitPrecedingZerosConf = OmitPrecedingZerosConf;\nclass OmitPrecedingZeros extends _abap_rule_1.ABAPRule {\n constructor() {\n super(...arguments);\n this.conf = new OmitPrecedingZerosConf();\n }\n getMetadata() {\n return {\n key: \"omit_preceding_zeros\",\n title: \"Omit preceding zeros\",\n shortDescription: `Omit preceding zeros from integer constants`,\n tags: [_irule_1.RuleTag.SingleFile],\n badExample: `int = -001.`,\n goodExample: `int = -1.`,\n };\n }\n getConfig() {\n return this.conf;\n }\n setConfig(conf) {\n this.conf = conf;\n }\n runParsed(file) {\n var _a;\n const issues = [];\n const message = \"Omit preceding zeros\";\n for (const s of file.getStatements()) {\n for (const i of s.findAllExpressions(Expressions.Integer)) {\n const token = i.getLastToken();\n const str = token.getStr();\n if (str.length > 1 && str.startsWith(\"0\")) {\n if (s.get() instanceof statements_1.CallScreen || s.get() instanceof statements_1.SetScreen) {\n continue;\n }\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.getConfig().severity);\n issues.push(issue);\n }\n }\n for (const i of s.findAllExpressions(Expressions.ParameterException)) {\n const token = (_a = i.findDirectExpression(Expressions.SimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\n const str = token === null || token === void 0 ? void 0 : token.getStr();\n if (token && str && str.length > 1 && str.startsWith(\"0\")) {\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.getConfig().severity);\n issues.push(issue);\n }\n }\n }\n return issues;\n }\n}\nexports.OmitPrecedingZeros = OmitPrecedingZeros;\n//# sourceMappingURL=omit_preceding_zeros.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js?");
|
|
12989
13000
|
|
|
12990
13001
|
/***/ }),
|
|
12991
13002
|
|
|
@@ -13264,6 +13275,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
13264
13275
|
|
|
13265
13276
|
/***/ }),
|
|
13266
13277
|
|
|
13278
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/smim_consistency.js":
|
|
13279
|
+
/*!*************************************************************************!*\
|
|
13280
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/smim_consistency.js ***!
|
|
13281
|
+
\*************************************************************************/
|
|
13282
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
13283
|
+
|
|
13284
|
+
"use strict";
|
|
13285
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SMIMConsistency = exports.SMIMConsistencyConf = void 0;\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\nclass SMIMConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {\n}\nexports.SMIMConsistencyConf = SMIMConsistencyConf;\nclass SMIMConsistency {\n constructor() {\n this.conf = new SMIMConsistencyConf();\n }\n getMetadata() {\n return {\n key: \"smim_consistency\",\n title: \"SMIM consistency check\",\n shortDescription: `SMIM consistency check`,\n extendedInformation: \"Check folders exists\",\n };\n }\n getConfig() {\n return this.conf;\n }\n setConfig(conf) {\n this.conf = conf;\n }\n initialize(reg) {\n this.reg = reg;\n return this;\n }\n run(obj) {\n const issues = [];\n if (!(obj instanceof objects_1.MIMEObject)) {\n return [];\n }\n const base = this.base(obj.getURL() || \"\");\n if (base !== \"\" && this.findFolder(base) === false) {\n const message = \"Parent folder not found\";\n const position = new position_1.Position(1, 1);\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, message, this.getMetadata().key, this.conf.severity);\n issues.push(issue);\n }\n return issues;\n }\n base(full) {\n const components = full.split(\"/\");\n components.pop();\n return components.join(\"/\");\n }\n findFolder(base) {\n for (const smim of this.reg.getObjectsByType(\"SMIM\")) {\n if (base === smim.getURL()) {\n return true;\n }\n }\n return false;\n }\n}\nexports.SMIMConsistency = SMIMConsistency;\n//# sourceMappingURL=smim_consistency.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/smim_consistency.js?");
|
|
13286
|
+
|
|
13287
|
+
/***/ }),
|
|
13288
|
+
|
|
13267
13289
|
/***/ "./node_modules/@abaplint/core/build/src/rules/space_before_colon.js":
|
|
13268
13290
|
/*!***************************************************************************!*\
|
|
13269
13291
|
!*** ./node_modules/@abaplint/core/build/src/rules/space_before_colon.js ***!
|