@abaplint/transpiler 2.5.38 → 2.5.39
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/src/chunk.d.ts +19 -19
- package/build/src/chunk.js +146 -146
- package/build/src/db/database_setup_result.d.ts +8 -8
- package/build/src/db/database_setup_result.js +2 -2
- package/build/src/db/index.d.ts +13 -13
- package/build/src/db/index.js +86 -86
- package/build/src/db/sqlite_database_schema.d.ts +9 -9
- package/build/src/db/sqlite_database_schema.js +120 -120
- package/build/src/expressions/_expression_transpiler.d.ts +6 -6
- package/build/src/expressions/_expression_transpiler.js +2 -2
- package/build/src/expressions/arith_operator.d.ts +7 -7
- package/build/src/expressions/arith_operator.js +37 -37
- package/build/src/expressions/attribute_chain.d.ts +7 -7
- package/build/src/expressions/attribute_chain.js +20 -20
- package/build/src/expressions/attribute_name.d.ts +7 -7
- package/build/src/expressions/attribute_name.js +10 -10
- package/build/src/expressions/call_transformation_options.d.ts +7 -7
- package/build/src/expressions/call_transformation_options.js +27 -27
- package/build/src/expressions/call_transformation_parameters.d.ts +7 -7
- package/build/src/expressions/call_transformation_parameters.js +36 -36
- package/build/src/expressions/compare.d.ts +7 -7
- package/build/src/expressions/compare.js +88 -88
- package/build/src/expressions/compare_operator.d.ts +7 -7
- package/build/src/expressions/compare_operator.js +54 -54
- package/build/src/expressions/component_chain.d.ts +7 -7
- package/build/src/expressions/component_chain.js +20 -20
- package/build/src/expressions/component_chain_simple.d.ts +7 -7
- package/build/src/expressions/component_chain_simple.js +28 -28
- package/build/src/expressions/component_compare.d.ts +7 -7
- package/build/src/expressions/component_compare.js +49 -49
- package/build/src/expressions/component_cond.d.ts +7 -7
- package/build/src/expressions/component_cond.js +33 -33
- package/build/src/expressions/component_cond_sub.d.ts +7 -7
- package/build/src/expressions/component_cond_sub.js +36 -36
- package/build/src/expressions/cond.d.ts +7 -7
- package/build/src/expressions/cond.js +26 -26
- package/build/src/expressions/cond_sub.d.ts +7 -7
- package/build/src/expressions/cond_sub.js +26 -26
- package/build/src/expressions/constant.d.ts +10 -10
- package/build/src/expressions/constant.js +86 -86
- package/build/src/expressions/database_table.d.ts +7 -7
- package/build/src/expressions/database_table.js +20 -20
- package/build/src/expressions/field_chain.d.ts +10 -10
- package/build/src/expressions/field_chain.js +92 -92
- package/build/src/expressions/field_length.d.ts +7 -7
- package/build/src/expressions/field_length.js +25 -25
- package/build/src/expressions/field_offset.d.ts +7 -7
- package/build/src/expressions/field_offset.js +25 -25
- package/build/src/expressions/field_symbol.d.ts +7 -7
- package/build/src/expressions/field_symbol.js +13 -13
- package/build/src/expressions/function_exporting.d.ts +7 -7
- package/build/src/expressions/function_exporting.js +28 -28
- package/build/src/expressions/function_parameters.d.ts +7 -7
- package/build/src/expressions/function_parameters.js +36 -36
- package/build/src/expressions/index.d.ts +50 -50
- package/build/src/expressions/index.js +66 -66
- package/build/src/expressions/message_number.d.ts +7 -7
- package/build/src/expressions/message_number.js +10 -10
- package/build/src/expressions/method_call.d.ts +7 -7
- package/build/src/expressions/method_call.js +37 -37
- package/build/src/expressions/method_call_body.d.ts +10 -10
- package/build/src/expressions/method_call_body.js +29 -29
- package/build/src/expressions/method_call_chain.d.ts +7 -7
- package/build/src/expressions/method_call_chain.js +66 -66
- package/build/src/expressions/method_call_param.d.ts +10 -10
- package/build/src/expressions/method_call_param.js +49 -49
- package/build/src/expressions/method_parameters.d.ts +7 -7
- package/build/src/expressions/method_parameters.js +34 -34
- package/build/src/expressions/method_source.d.ts +9 -9
- package/build/src/expressions/method_source.js +111 -111
- package/build/src/expressions/parameter_list_s.d.ts +7 -7
- package/build/src/expressions/parameter_list_s.js +17 -17
- package/build/src/expressions/parameter_list_t.d.ts +7 -7
- package/build/src/expressions/parameter_list_t.js +17 -17
- package/build/src/expressions/parameter_name.d.ts +7 -7
- package/build/src/expressions/parameter_name.js +12 -12
- package/build/src/expressions/parameter_s.d.ts +7 -7
- package/build/src/expressions/parameter_s.js +15 -15
- package/build/src/expressions/parameter_t.d.ts +7 -7
- package/build/src/expressions/parameter_t.js +15 -15
- package/build/src/expressions/simple_source1.d.ts +7 -7
- package/build/src/expressions/simple_source1.js +10 -10
- package/build/src/expressions/simple_source2.d.ts +7 -7
- package/build/src/expressions/simple_source2.js +10 -10
- package/build/src/expressions/simple_source3.d.ts +9 -9
- package/build/src/expressions/simple_source3.js +13 -13
- package/build/src/expressions/simple_source4.d.ts +7 -7
- package/build/src/expressions/simple_source4.js +10 -10
- package/build/src/expressions/source.d.ts +9 -9
- package/build/src/expressions/source.js +96 -96
- package/build/src/expressions/source_field.d.ts +7 -7
- package/build/src/expressions/source_field.js +14 -14
- package/build/src/expressions/source_field_symbol.d.ts +7 -7
- package/build/src/expressions/source_field_symbol.js +10 -10
- package/build/src/expressions/sql_cond.d.ts +11 -11
- package/build/src/expressions/sql_cond.js +128 -128
- package/build/src/expressions/sql_from.d.ts +7 -7
- package/build/src/expressions/sql_from.js +25 -25
- package/build/src/expressions/sql_join.d.ts +7 -7
- package/build/src/expressions/sql_join.js +24 -24
- package/build/src/expressions/sql_source.d.ts +7 -7
- package/build/src/expressions/sql_source.js +14 -14
- package/build/src/expressions/sql_source_simple.d.ts +7 -7
- package/build/src/expressions/sql_source_simple.js +14 -14
- package/build/src/expressions/sql_target.d.ts +7 -7
- package/build/src/expressions/sql_target.js +11 -11
- package/build/src/expressions/string_template.d.ts +7 -7
- package/build/src/expressions/string_template.js +39 -39
- package/build/src/expressions/string_template_source.d.ts +8 -8
- package/build/src/expressions/string_template_source.js +52 -52
- package/build/src/expressions/target.d.ts +7 -7
- package/build/src/expressions/target.js +83 -83
- package/build/src/handlers/handle_abap.d.ts +12 -12
- package/build/src/handlers/handle_abap.js +144 -144
- package/build/src/handlers/handle_data_element.d.ts +5 -5
- package/build/src/handlers/handle_data_element.js +35 -35
- package/build/src/handlers/handle_enqu.d.ts +5 -5
- package/build/src/handlers/handle_enqu.js +27 -27
- package/build/src/handlers/handle_smim.d.ts +5 -5
- package/build/src/handlers/handle_smim.js +42 -42
- package/build/src/handlers/handle_table.d.ts +5 -5
- package/build/src/handlers/handle_table.js +29 -29
- package/build/src/handlers/handle_table_type.d.ts +5 -5
- package/build/src/handlers/handle_table_type.js +28 -28
- package/build/src/handlers/handle_type_pool.d.ts +5 -5
- package/build/src/handlers/handle_type_pool.js +38 -38
- package/build/src/handlers/handle_view.d.ts +5 -5
- package/build/src/handlers/handle_view.js +30 -30
- package/build/src/handlers/handle_w3mi.d.ts +5 -5
- package/build/src/handlers/handle_w3mi.js +42 -42
- package/build/src/index.d.ts +11 -11
- package/build/src/index.js +95 -103
- package/build/src/keywords.d.ts +9 -9
- package/build/src/keywords.js +91 -91
- package/build/src/rearranger.d.ts +7 -7
- package/build/src/rearranger.js +109 -109
- package/build/src/requires.d.ts +7 -7
- package/build/src/requires.js +111 -111
- package/build/src/statements/_statement_transpiler.d.ts +6 -6
- package/build/src/statements/_statement_transpiler.js +2 -2
- package/build/src/statements/add.d.ts +7 -7
- package/build/src/statements/add.js +20 -20
- package/build/src/statements/append.d.ts +7 -7
- package/build/src/statements/append.js +70 -70
- package/build/src/statements/assert.d.ts +7 -7
- package/build/src/statements/assert.js +15 -15
- package/build/src/statements/assign.d.ts +7 -7
- package/build/src/statements/assign.js +82 -82
- package/build/src/statements/at.d.ts +7 -7
- package/build/src/statements/at.js +10 -10
- package/build/src/statements/authority_check.d.ts +7 -7
- package/build/src/statements/authority_check.js +14 -14
- package/build/src/statements/break.d.ts +7 -7
- package/build/src/statements/break.js +10 -10
- package/build/src/statements/break_id.d.ts +7 -7
- package/build/src/statements/break_id.js +11 -11
- package/build/src/statements/call.d.ts +7 -7
- package/build/src/statements/call.js +82 -82
- package/build/src/statements/call_function.d.ts +7 -7
- package/build/src/statements/call_function.js +40 -40
- package/build/src/statements/call_kernel.d.ts +7 -7
- package/build/src/statements/call_kernel.js +21 -21
- package/build/src/statements/call_screen.d.ts +7 -7
- package/build/src/statements/call_screen.js +10 -10
- package/build/src/statements/call_transaction.d.ts +7 -7
- package/build/src/statements/call_transaction.js +10 -10
- package/build/src/statements/call_transformation.d.ts +7 -7
- package/build/src/statements/call_transformation.js +37 -37
- package/build/src/statements/case.d.ts +7 -7
- package/build/src/statements/case.js +16 -16
- package/build/src/statements/check.d.ts +7 -7
- package/build/src/statements/check.js +24 -24
- package/build/src/statements/class_deferred.d.ts +7 -7
- package/build/src/statements/class_deferred.js +10 -10
- package/build/src/statements/class_definition_load.d.ts +7 -7
- package/build/src/statements/class_definition_load.js +11 -11
- package/build/src/statements/class_implementation.d.ts +9 -9
- package/build/src/statements/class_implementation.js +53 -53
- package/build/src/statements/class_local_friends.d.ts +7 -7
- package/build/src/statements/class_local_friends.js +10 -10
- package/build/src/statements/clear.d.ts +7 -7
- package/build/src/statements/clear.js +16 -16
- package/build/src/statements/close_dataset.d.ts +7 -7
- package/build/src/statements/close_dataset.js +10 -10
- package/build/src/statements/collect.d.ts +7 -7
- package/build/src/statements/collect.js +22 -22
- package/build/src/statements/commit.d.ts +7 -7
- package/build/src/statements/commit.js +10 -10
- package/build/src/statements/concatenate.d.ts +7 -7
- package/build/src/statements/concatenate.js +33 -33
- package/build/src/statements/condense.d.ts +7 -7
- package/build/src/statements/condense.js +17 -17
- package/build/src/statements/constant.d.ts +7 -7
- package/build/src/statements/constant.js +10 -10
- package/build/src/statements/continue.d.ts +7 -7
- package/build/src/statements/continue.js +10 -10
- package/build/src/statements/convert.d.ts +7 -7
- package/build/src/statements/convert.js +42 -42
- package/build/src/statements/create_data.d.ts +7 -7
- package/build/src/statements/create_data.js +70 -70
- package/build/src/statements/create_object.d.ts +8 -8
- package/build/src/statements/create_object.js +74 -74
- package/build/src/statements/data.d.ts +8 -8
- package/build/src/statements/data.js +53 -53
- package/build/src/statements/delete_database.d.ts +7 -7
- package/build/src/statements/delete_database.js +23 -23
- package/build/src/statements/delete_dataset.d.ts +7 -7
- package/build/src/statements/delete_dataset.js +10 -10
- package/build/src/statements/delete_internal.d.ts +7 -7
- package/build/src/statements/delete_internal.js +52 -52
- package/build/src/statements/delete_textpool.d.ts +7 -7
- package/build/src/statements/delete_textpool.js +10 -10
- package/build/src/statements/describe.d.ts +7 -7
- package/build/src/statements/describe.js +45 -45
- package/build/src/statements/do.d.ts +9 -9
- package/build/src/statements/do.js +26 -26
- package/build/src/statements/editor_call.d.ts +7 -7
- package/build/src/statements/editor_call.js +10 -10
- package/build/src/statements/else.d.ts +7 -7
- package/build/src/statements/else.js +10 -10
- package/build/src/statements/else_if.d.ts +7 -7
- package/build/src/statements/else_if.js +15 -15
- package/build/src/statements/end_at.d.ts +7 -7
- package/build/src/statements/end_at.js +10 -10
- package/build/src/statements/end_case.d.ts +7 -7
- package/build/src/statements/end_case.js +10 -10
- package/build/src/statements/end_class.d.ts +7 -7
- package/build/src/statements/end_class.js +13 -13
- package/build/src/statements/end_do.d.ts +9 -9
- package/build/src/statements/end_do.js +13 -13
- package/build/src/statements/end_enhancement_section.d.ts +7 -7
- package/build/src/statements/end_enhancement_section.js +11 -11
- package/build/src/statements/end_form.d.ts +7 -7
- package/build/src/statements/end_form.js +10 -10
- package/build/src/statements/end_if.d.ts +7 -7
- package/build/src/statements/end_if.js +10 -10
- package/build/src/statements/end_loop.d.ts +7 -7
- package/build/src/statements/end_loop.js +10 -10
- package/build/src/statements/end_method.d.ts +8 -8
- package/build/src/statements/end_method.js +57 -57
- package/build/src/statements/end_try.d.ts +7 -7
- package/build/src/statements/end_try.js +10 -10
- package/build/src/statements/end_while.d.ts +9 -9
- package/build/src/statements/end_while.js +13 -13
- package/build/src/statements/enhancement_section.d.ts +7 -7
- package/build/src/statements/enhancement_section.js +11 -11
- package/build/src/statements/exit.d.ts +7 -7
- package/build/src/statements/exit.js +16 -16
- package/build/src/statements/export.d.ts +7 -7
- package/build/src/statements/export.js +10 -10
- package/build/src/statements/field_symbol.d.ts +7 -7
- package/build/src/statements/field_symbol.js +32 -32
- package/build/src/statements/find.d.ts +7 -7
- package/build/src/statements/find.js +74 -74
- package/build/src/statements/form.d.ts +6 -6
- package/build/src/statements/form.js +14 -14
- package/build/src/statements/free.d.ts +7 -7
- package/build/src/statements/free.js +10 -10
- package/build/src/statements/free_memory.d.ts +7 -7
- package/build/src/statements/free_memory.js +10 -10
- package/build/src/statements/function_pool.d.ts +7 -7
- package/build/src/statements/function_pool.js +10 -10
- package/build/src/statements/get_bit.d.ts +7 -7
- package/build/src/statements/get_bit.js +18 -18
- package/build/src/statements/get_dataset.d.ts +7 -7
- package/build/src/statements/get_dataset.js +10 -10
- package/build/src/statements/get_locale.d.ts +7 -7
- package/build/src/statements/get_locale.js +12 -12
- package/build/src/statements/get_parameter.d.ts +7 -7
- package/build/src/statements/get_parameter.js +17 -17
- package/build/src/statements/get_reference.d.ts +7 -7
- package/build/src/statements/get_reference.js +29 -29
- package/build/src/statements/get_run_time.d.ts +7 -7
- package/build/src/statements/get_run_time.js +16 -16
- package/build/src/statements/get_time.d.ts +7 -7
- package/build/src/statements/get_time.js +22 -22
- package/build/src/statements/if.d.ts +7 -7
- package/build/src/statements/if.js +16 -16
- package/build/src/statements/import.d.ts +7 -7
- package/build/src/statements/import.js +10 -10
- package/build/src/statements/include.d.ts +7 -7
- package/build/src/statements/include.js +11 -11
- package/build/src/statements/index.d.ts +141 -141
- package/build/src/statements/index.js +157 -157
- package/build/src/statements/initialization.d.ts +7 -7
- package/build/src/statements/initialization.js +10 -10
- package/build/src/statements/insert_database.d.ts +7 -7
- package/build/src/statements/insert_database.js +28 -28
- package/build/src/statements/insert_internal.d.ts +7 -7
- package/build/src/statements/insert_internal.js +41 -41
- package/build/src/statements/insert_report.d.ts +7 -7
- package/build/src/statements/insert_report.js +10 -10
- package/build/src/statements/insert_textpool.d.ts +7 -7
- package/build/src/statements/insert_textpool.js +10 -10
- package/build/src/statements/leave.d.ts +7 -7
- package/build/src/statements/leave.js +10 -10
- package/build/src/statements/log_point.d.ts +7 -7
- package/build/src/statements/log_point.js +11 -11
- package/build/src/statements/loop.d.ts +15 -15
- package/build/src/statements/loop.js +115 -115
- package/build/src/statements/loop_at_screen.d.ts +7 -7
- package/build/src/statements/loop_at_screen.js +10 -10
- package/build/src/statements/macro_call.d.ts +7 -7
- package/build/src/statements/macro_call.js +10 -10
- package/build/src/statements/message.d.ts +7 -7
- package/build/src/statements/message.js +80 -80
- package/build/src/statements/method_implementation.d.ts +9 -9
- package/build/src/statements/method_implementation.js +182 -182
- package/build/src/statements/modify_database.d.ts +7 -7
- package/build/src/statements/modify_database.js +23 -23
- package/build/src/statements/modify_internal.d.ts +7 -7
- package/build/src/statements/modify_internal.js +31 -31
- package/build/src/statements/modify_screen.d.ts +7 -7
- package/build/src/statements/modify_screen.js +10 -10
- package/build/src/statements/move.d.ts +7 -7
- package/build/src/statements/move.js +35 -35
- package/build/src/statements/move_corresponding.d.ts +7 -7
- package/build/src/statements/move_corresponding.js +15 -15
- package/build/src/statements/open_dataset.d.ts +7 -7
- package/build/src/statements/open_dataset.js +10 -10
- package/build/src/statements/overlay.d.ts +7 -7
- package/build/src/statements/overlay.js +18 -18
- package/build/src/statements/parameter.d.ts +7 -7
- package/build/src/statements/parameter.js +10 -10
- package/build/src/statements/perform.d.ts +7 -7
- package/build/src/statements/perform.js +19 -19
- package/build/src/statements/raise.d.ts +7 -7
- package/build/src/statements/raise.js +30 -30
- package/build/src/statements/raise_event.d.ts +7 -7
- package/build/src/statements/raise_event.js +11 -11
- package/build/src/statements/read_dataset.d.ts +7 -7
- package/build/src/statements/read_dataset.js +10 -10
- package/build/src/statements/read_line.d.ts +7 -7
- package/build/src/statements/read_line.js +10 -10
- package/build/src/statements/read_report.d.ts +7 -7
- package/build/src/statements/read_report.js +25 -25
- package/build/src/statements/read_table.d.ts +7 -7
- package/build/src/statements/read_table.js +90 -90
- package/build/src/statements/read_textpool.d.ts +7 -7
- package/build/src/statements/read_textpool.js +10 -10
- package/build/src/statements/receive.d.ts +7 -7
- package/build/src/statements/receive.js +10 -10
- package/build/src/statements/refresh.d.ts +7 -7
- package/build/src/statements/refresh.js +16 -16
- package/build/src/statements/replace.d.ts +7 -7
- package/build/src/statements/replace.js +47 -47
- package/build/src/statements/report.d.ts +7 -7
- package/build/src/statements/report.js +10 -10
- package/build/src/statements/retry.d.ts +7 -7
- package/build/src/statements/retry.js +10 -10
- package/build/src/statements/return.d.ts +7 -7
- package/build/src/statements/return.js +29 -29
- package/build/src/statements/rollback.d.ts +7 -7
- package/build/src/statements/rollback.js +10 -10
- package/build/src/statements/scan.d.ts +7 -7
- package/build/src/statements/scan.js +31 -31
- package/build/src/statements/search.d.ts +7 -7
- package/build/src/statements/search.js +10 -10
- package/build/src/statements/select.d.ts +9 -9
- package/build/src/statements/select.js +122 -122
- package/build/src/statements/select_option.d.ts +7 -7
- package/build/src/statements/select_option.js +10 -10
- package/build/src/statements/selection_screen.d.ts +7 -7
- package/build/src/statements/selection_screen.js +10 -10
- package/build/src/statements/set_bit.d.ts +7 -7
- package/build/src/statements/set_bit.js +20 -20
- package/build/src/statements/set_dataset.d.ts +7 -7
- package/build/src/statements/set_dataset.js +10 -10
- package/build/src/statements/set_handler.d.ts +7 -7
- package/build/src/statements/set_handler.js +26 -26
- package/build/src/statements/set_language.d.ts +7 -7
- package/build/src/statements/set_language.js +10 -10
- package/build/src/statements/set_locale.d.ts +7 -7
- package/build/src/statements/set_locale.js +12 -12
- package/build/src/statements/set_parameter.d.ts +7 -7
- package/build/src/statements/set_parameter.js +10 -10
- package/build/src/statements/set_pf_status.d.ts +7 -7
- package/build/src/statements/set_pf_status.js +10 -10
- package/build/src/statements/set_screen.d.ts +7 -7
- package/build/src/statements/set_screen.js +10 -10
- package/build/src/statements/set_titlebar.d.ts +7 -7
- package/build/src/statements/set_titlebar.js +10 -10
- package/build/src/statements/shift.d.ts +7 -7
- package/build/src/statements/shift.js +42 -42
- package/build/src/statements/sort.d.ts +8 -8
- package/build/src/statements/sort.js +48 -48
- package/build/src/statements/sort_dataset.d.ts +7 -7
- package/build/src/statements/sort_dataset.js +10 -10
- package/build/src/statements/split.d.ts +7 -7
- package/build/src/statements/split.js +23 -23
- package/build/src/statements/start_of_selection.d.ts +6 -6
- package/build/src/statements/start_of_selection.js +10 -10
- package/build/src/statements/submit.d.ts +7 -7
- package/build/src/statements/submit.js +10 -10
- package/build/src/statements/subtract.d.ts +7 -7
- package/build/src/statements/subtract.js +20 -20
- package/build/src/statements/syntax_check.d.ts +7 -7
- package/build/src/statements/syntax_check.js +10 -10
- package/build/src/statements/tables.d.ts +7 -7
- package/build/src/statements/tables.js +30 -30
- package/build/src/statements/translate.d.ts +7 -7
- package/build/src/statements/translate.js +29 -29
- package/build/src/statements/truncate_dataset.d.ts +7 -7
- package/build/src/statements/truncate_dataset.js +10 -10
- package/build/src/statements/try.d.ts +7 -7
- package/build/src/statements/try.js +10 -10
- package/build/src/statements/type.d.ts +6 -6
- package/build/src/statements/type.js +10 -10
- package/build/src/statements/type_pools.d.ts +7 -7
- package/build/src/statements/type_pools.js +11 -11
- package/build/src/statements/unassign.d.ts +7 -7
- package/build/src/statements/unassign.js +13 -13
- package/build/src/statements/unpack.d.ts +7 -7
- package/build/src/statements/unpack.js +10 -10
- package/build/src/statements/update_database.d.ts +7 -7
- package/build/src/statements/update_database.js +29 -29
- package/build/src/statements/wait.d.ts +7 -7
- package/build/src/statements/wait.js +28 -28
- package/build/src/statements/when.d.ts +9 -9
- package/build/src/statements/when.js +23 -23
- package/build/src/statements/while.d.ts +9 -9
- package/build/src/statements/while.js +21 -21
- package/build/src/statements/write.d.ts +7 -7
- package/build/src/statements/write.js +56 -56
- package/build/src/structures/_structure_transpiler.d.ts +6 -6
- package/build/src/structures/_structure_transpiler.js +2 -2
- package/build/src/structures/at.d.ts +7 -7
- package/build/src/structures/at.js +47 -47
- package/build/src/structures/at_first.d.ts +7 -7
- package/build/src/structures/at_first.js +16 -16
- package/build/src/structures/at_last.d.ts +7 -7
- package/build/src/structures/at_last.js +16 -16
- package/build/src/structures/case.d.ts +7 -7
- package/build/src/structures/case.js +53 -53
- package/build/src/structures/class_definition.d.ts +7 -7
- package/build/src/structures/class_definition.js +27 -27
- package/build/src/structures/class_implementation.d.ts +14 -14
- package/build/src/structures/class_implementation.js +146 -146
- package/build/src/structures/constants.d.ts +7 -7
- package/build/src/structures/constants.js +33 -33
- package/build/src/structures/data.d.ts +7 -7
- package/build/src/structures/data.js +26 -26
- package/build/src/structures/define.d.ts +7 -7
- package/build/src/structures/define.js +11 -11
- package/build/src/structures/do.d.ts +7 -7
- package/build/src/structures/do.js +27 -27
- package/build/src/structures/function_module.d.ts +8 -8
- package/build/src/structures/function_module.js +71 -71
- package/build/src/structures/index.d.ts +17 -17
- package/build/src/structures/index.js +33 -33
- package/build/src/structures/interface.d.ts +9 -9
- package/build/src/structures/interface.js +74 -74
- package/build/src/structures/loop.d.ts +7 -7
- package/build/src/structures/loop.js +93 -93
- package/build/src/structures/select.d.ts +7 -7
- package/build/src/structures/select.js +34 -34
- package/build/src/structures/try.d.ts +8 -8
- package/build/src/structures/try.js +69 -69
- package/build/src/structures/types.d.ts +7 -7
- package/build/src/structures/types.js +10 -10
- package/build/src/structures/when.d.ts +7 -7
- package/build/src/structures/when.js +15 -15
- package/build/src/structures/while.d.ts +7 -7
- package/build/src/structures/while.js +27 -27
- package/build/src/transpile_types.d.ts +6 -6
- package/build/src/transpile_types.js +175 -175
- package/build/src/traversal.d.ts +52 -52
- package/build/src/traversal.js +549 -549
- package/build/src/types.d.ts +58 -58
- package/build/src/types.js +2 -2
- package/build/src/unique_identifier.d.ts +9 -9
- package/build/src/unique_identifier.js +27 -27
- package/build/src/unit_test.d.ts +15 -15
- package/build/src/unit_test.js +183 -183
- package/build/src/validation.d.ts +8 -8
- package/build/src/validation.js +116 -116
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContinueTranspiler = void 0;
|
|
4
|
-
const chunk_1 = require("../chunk");
|
|
5
|
-
class ContinueTranspiler {
|
|
6
|
-
transpile(node, traversal) {
|
|
7
|
-
return new chunk_1.Chunk().append("continue;", node, traversal);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.ContinueTranspiler = ContinueTranspiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContinueTranspiler = void 0;
|
|
4
|
+
const chunk_1 = require("../chunk");
|
|
5
|
+
class ContinueTranspiler {
|
|
6
|
+
transpile(node, traversal) {
|
|
7
|
+
return new chunk_1.Chunk().append("continue;", node, traversal);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ContinueTranspiler = ContinueTranspiler;
|
|
11
11
|
//# sourceMappingURL=continue.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
-
import { Traversal } from "../traversal";
|
|
4
|
-
import { Chunk } from "../chunk";
|
|
5
|
-
export declare class ConvertTranspiler implements IStatementTranspiler {
|
|
6
|
-
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
-
}
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class ConvertTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConvertTranspiler = void 0;
|
|
4
|
-
const abaplint = require("@abaplint/core");
|
|
5
|
-
const expressions_1 = require("../expressions");
|
|
6
|
-
const chunk_1 = require("../chunk");
|
|
7
|
-
class ConvertTranspiler {
|
|
8
|
-
transpile(node, traversal) {
|
|
9
|
-
const source = [];
|
|
10
|
-
const target = [];
|
|
11
|
-
const date = node.findExpressionAfterToken("DATE");
|
|
12
|
-
if ((date === null || date === void 0 ? void 0 : date.get()) instanceof abaplint.Expressions.Source) {
|
|
13
|
-
source.push("date: " + new expressions_1.SourceTranspiler().transpile(date, traversal).getCode());
|
|
14
|
-
}
|
|
15
|
-
else if ((date === null || date === void 0 ? void 0 : date.get()) instanceof abaplint.Expressions.Target) {
|
|
16
|
-
target.push("date: " + new expressions_1.TargetTranspiler().transpile(date, traversal).getCode());
|
|
17
|
-
}
|
|
18
|
-
const time = node.findExpressionAfterToken("TIME");
|
|
19
|
-
if ((time === null || time === void 0 ? void 0 : time.get()) instanceof abaplint.Expressions.Source) {
|
|
20
|
-
source.push("time: " + new expressions_1.SourceTranspiler().transpile(time, traversal).getCode());
|
|
21
|
-
}
|
|
22
|
-
else if ((time === null || time === void 0 ? void 0 : time.get()) instanceof abaplint.Expressions.Target) {
|
|
23
|
-
target.push("time: " + new expressions_1.TargetTranspiler().transpile(time, traversal).getCode());
|
|
24
|
-
}
|
|
25
|
-
const stamp = node.findExpressionAfterToken("STAMP");
|
|
26
|
-
if ((stamp === null || stamp === void 0 ? void 0 : stamp.get()) instanceof abaplint.Expressions.Source) {
|
|
27
|
-
source.push("stamp: " + new expressions_1.SourceTranspiler().transpile(stamp, traversal).getCode());
|
|
28
|
-
}
|
|
29
|
-
else if ((stamp === null || stamp === void 0 ? void 0 : stamp.get()) instanceof abaplint.Expressions.Target) {
|
|
30
|
-
target.push("stamp: " + new expressions_1.TargetTranspiler().transpile(stamp, traversal).getCode());
|
|
31
|
-
}
|
|
32
|
-
const zone = node.findExpressionAfterToken("ZONE");
|
|
33
|
-
if ((zone === null || zone === void 0 ? void 0 : zone.get()) instanceof abaplint.Expressions.Source) {
|
|
34
|
-
source.push("zone: " + new expressions_1.SourceTranspiler().transpile(zone, traversal).getCode());
|
|
35
|
-
}
|
|
36
|
-
else if ((zone === null || zone === void 0 ? void 0 : zone.get()) instanceof abaplint.Expressions.Target) {
|
|
37
|
-
target.push("zone: " + new expressions_1.TargetTranspiler().transpile(zone, traversal).getCode());
|
|
38
|
-
}
|
|
39
|
-
return new chunk_1.Chunk(`abap.statements.convert({${source.join(",")}}, {${target.join(",")}});`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ConvertTranspiler = ConvertTranspiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConvertTranspiler = void 0;
|
|
4
|
+
const abaplint = require("@abaplint/core");
|
|
5
|
+
const expressions_1 = require("../expressions");
|
|
6
|
+
const chunk_1 = require("../chunk");
|
|
7
|
+
class ConvertTranspiler {
|
|
8
|
+
transpile(node, traversal) {
|
|
9
|
+
const source = [];
|
|
10
|
+
const target = [];
|
|
11
|
+
const date = node.findExpressionAfterToken("DATE");
|
|
12
|
+
if ((date === null || date === void 0 ? void 0 : date.get()) instanceof abaplint.Expressions.Source) {
|
|
13
|
+
source.push("date: " + new expressions_1.SourceTranspiler().transpile(date, traversal).getCode());
|
|
14
|
+
}
|
|
15
|
+
else if ((date === null || date === void 0 ? void 0 : date.get()) instanceof abaplint.Expressions.Target) {
|
|
16
|
+
target.push("date: " + new expressions_1.TargetTranspiler().transpile(date, traversal).getCode());
|
|
17
|
+
}
|
|
18
|
+
const time = node.findExpressionAfterToken("TIME");
|
|
19
|
+
if ((time === null || time === void 0 ? void 0 : time.get()) instanceof abaplint.Expressions.Source) {
|
|
20
|
+
source.push("time: " + new expressions_1.SourceTranspiler().transpile(time, traversal).getCode());
|
|
21
|
+
}
|
|
22
|
+
else if ((time === null || time === void 0 ? void 0 : time.get()) instanceof abaplint.Expressions.Target) {
|
|
23
|
+
target.push("time: " + new expressions_1.TargetTranspiler().transpile(time, traversal).getCode());
|
|
24
|
+
}
|
|
25
|
+
const stamp = node.findExpressionAfterToken("STAMP");
|
|
26
|
+
if ((stamp === null || stamp === void 0 ? void 0 : stamp.get()) instanceof abaplint.Expressions.Source) {
|
|
27
|
+
source.push("stamp: " + new expressions_1.SourceTranspiler().transpile(stamp, traversal).getCode());
|
|
28
|
+
}
|
|
29
|
+
else if ((stamp === null || stamp === void 0 ? void 0 : stamp.get()) instanceof abaplint.Expressions.Target) {
|
|
30
|
+
target.push("stamp: " + new expressions_1.TargetTranspiler().transpile(stamp, traversal).getCode());
|
|
31
|
+
}
|
|
32
|
+
const zone = node.findExpressionAfterToken("ZONE");
|
|
33
|
+
if ((zone === null || zone === void 0 ? void 0 : zone.get()) instanceof abaplint.Expressions.Source) {
|
|
34
|
+
source.push("zone: " + new expressions_1.SourceTranspiler().transpile(zone, traversal).getCode());
|
|
35
|
+
}
|
|
36
|
+
else if ((zone === null || zone === void 0 ? void 0 : zone.get()) instanceof abaplint.Expressions.Target) {
|
|
37
|
+
target.push("zone: " + new expressions_1.TargetTranspiler().transpile(zone, traversal).getCode());
|
|
38
|
+
}
|
|
39
|
+
return new chunk_1.Chunk(`abap.statements.convert({${source.join(",")}}, {${target.join(",")}});`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ConvertTranspiler = ConvertTranspiler;
|
|
43
43
|
//# sourceMappingURL=convert.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
-
import { Traversal } from "../traversal";
|
|
4
|
-
import { Chunk } from "../chunk";
|
|
5
|
-
export declare class CreateDataTranspiler implements IStatementTranspiler {
|
|
6
|
-
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
-
}
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class CreateDataTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateDataTranspiler = void 0;
|
|
4
|
-
const abaplint = require("@abaplint/core");
|
|
5
|
-
const chunk_1 = require("../chunk");
|
|
6
|
-
const expressions_1 = require("../expressions");
|
|
7
|
-
const transpile_types_1 = require("../transpile_types");
|
|
8
|
-
class CreateDataTranspiler {
|
|
9
|
-
transpile(node, traversal) {
|
|
10
|
-
var _a, _b, _c;
|
|
11
|
-
const targetNode = node.findDirectExpression(abaplint.Expressions.Target);
|
|
12
|
-
const target = traversal.traverse(targetNode);
|
|
13
|
-
const concat = node.concatTokens().toUpperCase();
|
|
14
|
-
const options = [];
|
|
15
|
-
let dynamic = (_a = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
16
|
-
if (dynamic) {
|
|
17
|
-
options.push(`"name": ` + dynamic.getFirstToken().getStr());
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
dynamic = (_b = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _b === void 0 ? void 0 : _b.findFirstExpression(abaplint.Expressions.FieldChain);
|
|
21
|
-
if (dynamic) {
|
|
22
|
-
options.push(`"name": ` + new expressions_1.FieldChainTranspiler(true).transpile(dynamic, traversal).getCode());
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const typeNameNode = node.findDirectExpression(abaplint.Expressions.TypeName);
|
|
26
|
-
if (typeNameNode) {
|
|
27
|
-
const id = (_c = traversal.findCurrentScopeByToken(typeNameNode.getFirstToken())) === null || _c === void 0 ? void 0 : _c.findType(typeNameNode.concatTokens());
|
|
28
|
-
if (id) {
|
|
29
|
-
options.push(`"type": ` + new transpile_types_1.TranspileTypes().toType(id.getType()));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
options.push(`"typeName": "${typeNameNode.concatTokens().toUpperCase()}"`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (node.findDirectTokenByText("TABLE")) {
|
|
36
|
-
options.push(`"table": true`);
|
|
37
|
-
}
|
|
38
|
-
if (concat.includes(" LIKE LINE OF ")) {
|
|
39
|
-
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
40
|
-
options.push(`"likeLineOf": ` + so.getCode());
|
|
41
|
-
}
|
|
42
|
-
else if (concat.includes(" LIKE ")) {
|
|
43
|
-
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
44
|
-
options.push(`"like": ` + so.getCode());
|
|
45
|
-
}
|
|
46
|
-
const handle = node.findExpressionAfterToken("HANDLE");
|
|
47
|
-
if (handle) {
|
|
48
|
-
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
49
|
-
const lookup = traversal.lookupClassOrInterface("KERNEL_CREATE_DATA_HANDLE", node.getFirstToken());
|
|
50
|
-
const call = `await ${lookup}.call({handle: ${so.getCode()}, dref: ${target.getCode()}});`;
|
|
51
|
-
return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("CreateData, kernel class missing");\n${call}`, node, traversal);
|
|
52
|
-
}
|
|
53
|
-
const length = node.findExpressionAfterToken("LENGTH");
|
|
54
|
-
if (length) {
|
|
55
|
-
const so = traversal.traverse(length);
|
|
56
|
-
options.push(`"length": ` + so.getCode());
|
|
57
|
-
}
|
|
58
|
-
const decimals = node.findExpressionAfterToken("DECIMALS");
|
|
59
|
-
if (decimals) {
|
|
60
|
-
const so = traversal.traverse(decimals);
|
|
61
|
-
options.push(`"decimals": ` + so.getCode());
|
|
62
|
-
}
|
|
63
|
-
let add = "";
|
|
64
|
-
if (options.length > 0) {
|
|
65
|
-
add = ",{" + options.join(",") + "}";
|
|
66
|
-
}
|
|
67
|
-
return new chunk_1.Chunk("abap.statements.createData(" + target.getCode() + add + ");");
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.CreateDataTranspiler = CreateDataTranspiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateDataTranspiler = void 0;
|
|
4
|
+
const abaplint = require("@abaplint/core");
|
|
5
|
+
const chunk_1 = require("../chunk");
|
|
6
|
+
const expressions_1 = require("../expressions");
|
|
7
|
+
const transpile_types_1 = require("../transpile_types");
|
|
8
|
+
class CreateDataTranspiler {
|
|
9
|
+
transpile(node, traversal) {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const targetNode = node.findDirectExpression(abaplint.Expressions.Target);
|
|
12
|
+
const target = traversal.traverse(targetNode);
|
|
13
|
+
const concat = node.concatTokens().toUpperCase();
|
|
14
|
+
const options = [];
|
|
15
|
+
let dynamic = (_a = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
16
|
+
if (dynamic) {
|
|
17
|
+
options.push(`"name": ` + dynamic.getFirstToken().getStr());
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
dynamic = (_b = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _b === void 0 ? void 0 : _b.findFirstExpression(abaplint.Expressions.FieldChain);
|
|
21
|
+
if (dynamic) {
|
|
22
|
+
options.push(`"name": ` + new expressions_1.FieldChainTranspiler(true).transpile(dynamic, traversal).getCode());
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const typeNameNode = node.findDirectExpression(abaplint.Expressions.TypeName);
|
|
26
|
+
if (typeNameNode) {
|
|
27
|
+
const id = (_c = traversal.findCurrentScopeByToken(typeNameNode.getFirstToken())) === null || _c === void 0 ? void 0 : _c.findType(typeNameNode.concatTokens());
|
|
28
|
+
if (id) {
|
|
29
|
+
options.push(`"type": ` + new transpile_types_1.TranspileTypes().toType(id.getType()));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
options.push(`"typeName": "${typeNameNode.concatTokens().toUpperCase()}"`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (node.findDirectTokenByText("TABLE")) {
|
|
36
|
+
options.push(`"table": true`);
|
|
37
|
+
}
|
|
38
|
+
if (concat.includes(" LIKE LINE OF ")) {
|
|
39
|
+
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
40
|
+
options.push(`"likeLineOf": ` + so.getCode());
|
|
41
|
+
}
|
|
42
|
+
else if (concat.includes(" LIKE ")) {
|
|
43
|
+
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
44
|
+
options.push(`"like": ` + so.getCode());
|
|
45
|
+
}
|
|
46
|
+
const handle = node.findExpressionAfterToken("HANDLE");
|
|
47
|
+
if (handle) {
|
|
48
|
+
const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
49
|
+
const lookup = traversal.lookupClassOrInterface("KERNEL_CREATE_DATA_HANDLE", node.getFirstToken());
|
|
50
|
+
const call = `await ${lookup}.call({handle: ${so.getCode()}, dref: ${target.getCode()}});`;
|
|
51
|
+
return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("CreateData, kernel class missing");\n${call}`, node, traversal);
|
|
52
|
+
}
|
|
53
|
+
const length = node.findExpressionAfterToken("LENGTH");
|
|
54
|
+
if (length) {
|
|
55
|
+
const so = traversal.traverse(length);
|
|
56
|
+
options.push(`"length": ` + so.getCode());
|
|
57
|
+
}
|
|
58
|
+
const decimals = node.findExpressionAfterToken("DECIMALS");
|
|
59
|
+
if (decimals) {
|
|
60
|
+
const so = traversal.traverse(decimals);
|
|
61
|
+
options.push(`"decimals": ` + so.getCode());
|
|
62
|
+
}
|
|
63
|
+
let add = "";
|
|
64
|
+
if (options.length > 0) {
|
|
65
|
+
add = ",{" + options.join(",") + "}";
|
|
66
|
+
}
|
|
67
|
+
return new chunk_1.Chunk("abap.statements.createData(" + target.getCode() + add + ");");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.CreateDataTranspiler = CreateDataTranspiler;
|
|
71
71
|
//# sourceMappingURL=create_data.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
-
import { Traversal } from "../traversal";
|
|
4
|
-
import { Chunk } from "../chunk";
|
|
5
|
-
export declare class CreateObjectTranspiler implements IStatementTranspiler {
|
|
6
|
-
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
-
private findClassName;
|
|
8
|
-
}
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class CreateObjectTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
+
private findClassName;
|
|
8
|
+
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateObjectTranspiler = void 0;
|
|
4
|
-
const abaplint = require("@abaplint/core");
|
|
5
|
-
const chunk_1 = require("../chunk");
|
|
6
|
-
const expressions_1 = require("../expressions");
|
|
7
|
-
class CreateObjectTranspiler {
|
|
8
|
-
transpile(node, traversal) {
|
|
9
|
-
var _a, _b;
|
|
10
|
-
const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();
|
|
11
|
-
let para = "";
|
|
12
|
-
const parameters = node.findFirstExpression(abaplint.Expressions.ParameterListS);
|
|
13
|
-
if (parameters) {
|
|
14
|
-
para = traversal.traverse(parameters).getCode();
|
|
15
|
-
}
|
|
16
|
-
let name = "";
|
|
17
|
-
let directGlobal = false;
|
|
18
|
-
let dynamic = (_a = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
19
|
-
if (dynamic) {
|
|
20
|
-
name = dynamic.getFirstToken().getStr();
|
|
21
|
-
name = name.substring(1, name.length - 1);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
dynamic = (_b = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _b === void 0 ? void 0 : _b.findFirstExpression(abaplint.Expressions.FieldChain);
|
|
25
|
-
if (dynamic) {
|
|
26
|
-
name = new expressions_1.FieldChainTranspiler(true).transpile(dynamic, traversal).getCode();
|
|
27
|
-
directGlobal = true;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (name === "") {
|
|
31
|
-
name = this.findClassName(node, traversal);
|
|
32
|
-
}
|
|
33
|
-
let ret = "";
|
|
34
|
-
const clas = traversal.lookupClassOrInterface(name, node.getFirstToken(), directGlobal);
|
|
35
|
-
const cx = traversal.lookupClassOrInterface("CX_SY_CREATE_OBJECT_ERROR", node.getFirstToken());
|
|
36
|
-
if (dynamic) {
|
|
37
|
-
ret += `if (${clas} === undefined) { throw new ${cx}; }\n`;
|
|
38
|
-
}
|
|
39
|
-
ret += target + ".set(await (new " + clas + "()).constructor_(" + para + "));";
|
|
40
|
-
return new chunk_1.Chunk(ret);
|
|
41
|
-
}
|
|
42
|
-
findClassName(node, traversal) {
|
|
43
|
-
var _a;
|
|
44
|
-
const c = node.findDirectExpression(abaplint.Expressions.ClassName);
|
|
45
|
-
if (c) {
|
|
46
|
-
return c.concatTokens();
|
|
47
|
-
}
|
|
48
|
-
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
49
|
-
if (scope === undefined) {
|
|
50
|
-
throw new Error("CreateObjectTranspiler, unable to lookup position");
|
|
51
|
-
}
|
|
52
|
-
const target = node.findDirectExpression(abaplint.Expressions.Target);
|
|
53
|
-
if (target === undefined) {
|
|
54
|
-
throw new Error(`CreateObjectTranspiler, target not found`);
|
|
55
|
-
}
|
|
56
|
-
const type = traversal.determineType(node, scope);
|
|
57
|
-
if (type === undefined) {
|
|
58
|
-
throw new Error(`CreateObjectTranspiler, target variable "${target === null || target === void 0 ? void 0 : target.concatTokens()}" not found in scope`);
|
|
59
|
-
}
|
|
60
|
-
else if (type instanceof abaplint.BasicTypes.GenericObjectReferenceType) {
|
|
61
|
-
return "object";
|
|
62
|
-
}
|
|
63
|
-
else if (!(type instanceof abaplint.BasicTypes.ObjectReferenceType)) {
|
|
64
|
-
if (((_a = traversal.options) === null || _a === void 0 ? void 0 : _a.unknownTypes) !== "runtimeError") {
|
|
65
|
-
throw new Error(`CreateObjectTranspiler, target variable "${target === null || target === void 0 ? void 0 : target.concatTokens()}" not a object reference`);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
return "RUNTIME_ERROR";
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return type.getIdentifierName();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.CreateObjectTranspiler = CreateObjectTranspiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateObjectTranspiler = void 0;
|
|
4
|
+
const abaplint = require("@abaplint/core");
|
|
5
|
+
const chunk_1 = require("../chunk");
|
|
6
|
+
const expressions_1 = require("../expressions");
|
|
7
|
+
class CreateObjectTranspiler {
|
|
8
|
+
transpile(node, traversal) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();
|
|
11
|
+
let para = "";
|
|
12
|
+
const parameters = node.findFirstExpression(abaplint.Expressions.ParameterListS);
|
|
13
|
+
if (parameters) {
|
|
14
|
+
para = traversal.traverse(parameters).getCode();
|
|
15
|
+
}
|
|
16
|
+
let name = "";
|
|
17
|
+
let directGlobal = false;
|
|
18
|
+
let dynamic = (_a = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
19
|
+
if (dynamic) {
|
|
20
|
+
name = dynamic.getFirstToken().getStr();
|
|
21
|
+
name = name.substring(1, name.length - 1);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
dynamic = (_b = node.findDirectExpression(abaplint.Expressions.Dynamic)) === null || _b === void 0 ? void 0 : _b.findFirstExpression(abaplint.Expressions.FieldChain);
|
|
25
|
+
if (dynamic) {
|
|
26
|
+
name = new expressions_1.FieldChainTranspiler(true).transpile(dynamic, traversal).getCode();
|
|
27
|
+
directGlobal = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (name === "") {
|
|
31
|
+
name = this.findClassName(node, traversal);
|
|
32
|
+
}
|
|
33
|
+
let ret = "";
|
|
34
|
+
const clas = traversal.lookupClassOrInterface(name, node.getFirstToken(), directGlobal);
|
|
35
|
+
const cx = traversal.lookupClassOrInterface("CX_SY_CREATE_OBJECT_ERROR", node.getFirstToken());
|
|
36
|
+
if (dynamic) {
|
|
37
|
+
ret += `if (${clas} === undefined) { throw new ${cx}; }\n`;
|
|
38
|
+
}
|
|
39
|
+
ret += target + ".set(await (new " + clas + "()).constructor_(" + para + "));";
|
|
40
|
+
return new chunk_1.Chunk(ret);
|
|
41
|
+
}
|
|
42
|
+
findClassName(node, traversal) {
|
|
43
|
+
var _a;
|
|
44
|
+
const c = node.findDirectExpression(abaplint.Expressions.ClassName);
|
|
45
|
+
if (c) {
|
|
46
|
+
return c.concatTokens();
|
|
47
|
+
}
|
|
48
|
+
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
49
|
+
if (scope === undefined) {
|
|
50
|
+
throw new Error("CreateObjectTranspiler, unable to lookup position");
|
|
51
|
+
}
|
|
52
|
+
const target = node.findDirectExpression(abaplint.Expressions.Target);
|
|
53
|
+
if (target === undefined) {
|
|
54
|
+
throw new Error(`CreateObjectTranspiler, target not found`);
|
|
55
|
+
}
|
|
56
|
+
const type = traversal.determineType(node, scope);
|
|
57
|
+
if (type === undefined) {
|
|
58
|
+
throw new Error(`CreateObjectTranspiler, target variable "${target === null || target === void 0 ? void 0 : target.concatTokens()}" not found in scope`);
|
|
59
|
+
}
|
|
60
|
+
else if (type instanceof abaplint.BasicTypes.GenericObjectReferenceType) {
|
|
61
|
+
return "object";
|
|
62
|
+
}
|
|
63
|
+
else if (!(type instanceof abaplint.BasicTypes.ObjectReferenceType)) {
|
|
64
|
+
if (((_a = traversal.options) === null || _a === void 0 ? void 0 : _a.unknownTypes) !== "runtimeError") {
|
|
65
|
+
throw new Error(`CreateObjectTranspiler, target variable "${target === null || target === void 0 ? void 0 : target.concatTokens()}" not a object reference`);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return "RUNTIME_ERROR";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return type.getIdentifierName();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.CreateObjectTranspiler = CreateObjectTranspiler;
|
|
75
75
|
//# sourceMappingURL=create_object.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
-
import { Traversal } from "../traversal";
|
|
4
|
-
import { Chunk } from "../chunk";
|
|
5
|
-
export declare class DataTranspiler implements IStatementTranspiler {
|
|
6
|
-
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
-
static buildValue(node: abaplint.Nodes.StatementNode, name: string, traversal: Traversal): string;
|
|
8
|
-
}
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class DataTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
+
static buildValue(node: abaplint.Nodes.StatementNode, name: string, traversal: Traversal): string;
|
|
8
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataTranspiler = void 0;
|
|
4
|
-
const abaplint = require("@abaplint/core");
|
|
5
|
-
const transpile_types_1 = require("../transpile_types");
|
|
6
|
-
const constant_1 = require("../expressions/constant");
|
|
7
|
-
const expressions_1 = require("../expressions");
|
|
8
|
-
const chunk_1 = require("../chunk");
|
|
9
|
-
class DataTranspiler {
|
|
10
|
-
transpile(node, traversal) {
|
|
11
|
-
var _a;
|
|
12
|
-
const token = (_a = node.findFirstExpression(abaplint.Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
13
|
-
if (token === undefined) {
|
|
14
|
-
throw new Error("DataTranspiler, token not found");
|
|
15
|
-
}
|
|
16
|
-
const scope = traversal.findCurrentScopeByToken(token);
|
|
17
|
-
if (scope === undefined) {
|
|
18
|
-
throw new Error("DataTranspiler, scope not found: " + node.concatTokens());
|
|
19
|
-
}
|
|
20
|
-
const found = scope.findVariable(token.getStr());
|
|
21
|
-
if (found === undefined) {
|
|
22
|
-
throw new Error("DataTranspiler, var not found, \"" + token.getStr() + "\"");
|
|
23
|
-
}
|
|
24
|
-
const value = DataTranspiler.buildValue(node, found.getName().toLowerCase(), traversal);
|
|
25
|
-
const ret = new chunk_1.Chunk()
|
|
26
|
-
.appendString("let ")
|
|
27
|
-
.append(found.getName().toLowerCase(), token, traversal)
|
|
28
|
-
.appendString(" = " + new transpile_types_1.TranspileTypes().toType(found.getType()))
|
|
29
|
-
.append(";", node.getLastToken(), traversal)
|
|
30
|
-
.append(value, node.getLastToken(), traversal);
|
|
31
|
-
return ret;
|
|
32
|
-
}
|
|
33
|
-
static buildValue(node, name, traversal) {
|
|
34
|
-
let value = "";
|
|
35
|
-
const val = node.findFirstExpression(abaplint.Expressions.Value);
|
|
36
|
-
if (val) {
|
|
37
|
-
let int = val.findFirstExpression(abaplint.Expressions.Integer);
|
|
38
|
-
if (int === undefined) {
|
|
39
|
-
int = val.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
40
|
-
}
|
|
41
|
-
if (int) {
|
|
42
|
-
const escaped = new constant_1.ConstantTranspiler().escape(int.concatTokens());
|
|
43
|
-
value = "\n" + name + ".set(" + escaped + ");";
|
|
44
|
-
}
|
|
45
|
-
else if (val.getChildren()[1].get() instanceof abaplint.Expressions.SimpleFieldChain) {
|
|
46
|
-
const s = new expressions_1.FieldChainTranspiler().transpile(val.getChildren()[1], traversal).getCode();
|
|
47
|
-
value = "\n" + name + ".set(" + s + ");";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return value;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.DataTranspiler = DataTranspiler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataTranspiler = void 0;
|
|
4
|
+
const abaplint = require("@abaplint/core");
|
|
5
|
+
const transpile_types_1 = require("../transpile_types");
|
|
6
|
+
const constant_1 = require("../expressions/constant");
|
|
7
|
+
const expressions_1 = require("../expressions");
|
|
8
|
+
const chunk_1 = require("../chunk");
|
|
9
|
+
class DataTranspiler {
|
|
10
|
+
transpile(node, traversal) {
|
|
11
|
+
var _a;
|
|
12
|
+
const token = (_a = node.findFirstExpression(abaplint.Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
13
|
+
if (token === undefined) {
|
|
14
|
+
throw new Error("DataTranspiler, token not found");
|
|
15
|
+
}
|
|
16
|
+
const scope = traversal.findCurrentScopeByToken(token);
|
|
17
|
+
if (scope === undefined) {
|
|
18
|
+
throw new Error("DataTranspiler, scope not found: " + node.concatTokens());
|
|
19
|
+
}
|
|
20
|
+
const found = scope.findVariable(token.getStr());
|
|
21
|
+
if (found === undefined) {
|
|
22
|
+
throw new Error("DataTranspiler, var not found, \"" + token.getStr() + "\"");
|
|
23
|
+
}
|
|
24
|
+
const value = DataTranspiler.buildValue(node, found.getName().toLowerCase(), traversal);
|
|
25
|
+
const ret = new chunk_1.Chunk()
|
|
26
|
+
.appendString("let ")
|
|
27
|
+
.append(found.getName().toLowerCase(), token, traversal)
|
|
28
|
+
.appendString(" = " + new transpile_types_1.TranspileTypes().toType(found.getType()))
|
|
29
|
+
.append(";", node.getLastToken(), traversal)
|
|
30
|
+
.append(value, node.getLastToken(), traversal);
|
|
31
|
+
return ret;
|
|
32
|
+
}
|
|
33
|
+
static buildValue(node, name, traversal) {
|
|
34
|
+
let value = "";
|
|
35
|
+
const val = node.findFirstExpression(abaplint.Expressions.Value);
|
|
36
|
+
if (val) {
|
|
37
|
+
let int = val.findFirstExpression(abaplint.Expressions.Integer);
|
|
38
|
+
if (int === undefined) {
|
|
39
|
+
int = val.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
40
|
+
}
|
|
41
|
+
if (int) {
|
|
42
|
+
const escaped = new constant_1.ConstantTranspiler().escape(int.concatTokens());
|
|
43
|
+
value = "\n" + name + ".set(" + escaped + ");";
|
|
44
|
+
}
|
|
45
|
+
else if (val.getChildren()[1].get() instanceof abaplint.Expressions.SimpleFieldChain) {
|
|
46
|
+
const s = new expressions_1.FieldChainTranspiler().transpile(val.getChildren()[1], traversal).getCode();
|
|
47
|
+
value = "\n" + name + ".set(" + s + ");";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.DataTranspiler = DataTranspiler;
|
|
54
54
|
//# sourceMappingURL=data.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
-
import { Traversal } from "../traversal";
|
|
4
|
-
import { Chunk } from "../chunk";
|
|
5
|
-
export declare class DeleteDatabaseTranspiler implements IStatementTranspiler {
|
|
6
|
-
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
-
}
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class DeleteDatabaseTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
|
|
7
|
+
}
|