@abaplint/core 2.95.41 → 2.95.43
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/adhoc/lexer_performance.d.ts +1 -1
- package/build/adhoc/lexer_performance.js +16 -16
- package/build/adhoc/parser_performance.d.ts +1 -1
- package/build/adhoc/parser_performance.js +17 -17
- package/build/src/_config.js +2 -2
- package/build/src/_iddic_references.js +2 -2
- package/build/src/_iregistry.js +2 -2
- package/build/src/abap/1_lexer/lexer.js +438 -438
- package/build/src/abap/1_lexer/lexer_result.js +2 -2
- package/build/src/abap/1_lexer/tokens/_token.js +26 -26
- package/build/src/abap/1_lexer/tokens/at.js +28 -28
- package/build/src/abap/1_lexer/tokens/bracket_left.js +28 -28
- package/build/src/abap/1_lexer/tokens/bracket_right.js +28 -28
- package/build/src/abap/1_lexer/tokens/colon.js +7 -7
- package/build/src/abap/1_lexer/tokens/comment.js +7 -7
- package/build/src/abap/1_lexer/tokens/dash.js +28 -28
- package/build/src/abap/1_lexer/tokens/identifier.js +7 -7
- package/build/src/abap/1_lexer/tokens/index.js +31 -31
- package/build/src/abap/1_lexer/tokens/instance_arrow.js +28 -28
- package/build/src/abap/1_lexer/tokens/paren_left.js +28 -28
- package/build/src/abap/1_lexer/tokens/paren_right.js +28 -28
- package/build/src/abap/1_lexer/tokens/plus.js +28 -28
- package/build/src/abap/1_lexer/tokens/pragma.js +7 -7
- package/build/src/abap/1_lexer/tokens/punctuation.js +7 -7
- package/build/src/abap/1_lexer/tokens/static_arrow.js +28 -28
- package/build/src/abap/1_lexer/tokens/string.js +19 -19
- package/build/src/abap/2_statements/combi.js +899 -899
- package/build/src/abap/2_statements/expand_macros.js +202 -202
- package/build/src/abap/2_statements/expressions/abstract.js +10 -10
- package/build/src/abap/2_statements/expressions/abstract_methods.js +11 -11
- package/build/src/abap/2_statements/expressions/and_return.js +10 -10
- package/build/src/abap/2_statements/expressions/arith_operator.js +12 -12
- package/build/src/abap/2_statements/expressions/arrow.js +11 -11
- package/build/src/abap/2_statements/expressions/arrow_or_dash.js +11 -11
- package/build/src/abap/2_statements/expressions/assign_source.js +18 -18
- package/build/src/abap/2_statements/expressions/association_name.js +10 -10
- package/build/src/abap/2_statements/expressions/attribute_chain.js +14 -14
- package/build/src/abap/2_statements/expressions/attribute_name.js +10 -10
- package/build/src/abap/2_statements/expressions/block_name.js +12 -12
- package/build/src/abap/2_statements/expressions/call_transformation_options.js +14 -14
- package/build/src/abap/2_statements/expressions/call_transformation_parameters.js +15 -15
- package/build/src/abap/2_statements/expressions/cast.js +16 -16
- package/build/src/abap/2_statements/expressions/class_final.js +10 -10
- package/build/src/abap/2_statements/expressions/class_friends.js +11 -11
- package/build/src/abap/2_statements/expressions/class_global.js +10 -10
- package/build/src/abap/2_statements/expressions/class_name.js +10 -10
- package/build/src/abap/2_statements/expressions/color.js +16 -16
- package/build/src/abap/2_statements/expressions/compare.js +22 -22
- package/build/src/abap/2_statements/expressions/compare_operator.js +13 -13
- package/build/src/abap/2_statements/expressions/component_chain.js +14 -14
- package/build/src/abap/2_statements/expressions/component_chain_simple.js +13 -13
- package/build/src/abap/2_statements/expressions/component_compare.js +20 -20
- package/build/src/abap/2_statements/expressions/component_compare_simple.js +13 -13
- package/build/src/abap/2_statements/expressions/component_compare_single.js +13 -13
- package/build/src/abap/2_statements/expressions/component_cond.js +14 -14
- package/build/src/abap/2_statements/expressions/component_cond_sub.js +13 -13
- package/build/src/abap/2_statements/expressions/component_name.js +10 -10
- package/build/src/abap/2_statements/expressions/concatenated_constant.js +12 -12
- package/build/src/abap/2_statements/expressions/cond.js +16 -16
- package/build/src/abap/2_statements/expressions/cond_body.js +13 -13
- package/build/src/abap/2_statements/expressions/cond_sub.js +14 -14
- package/build/src/abap/2_statements/expressions/constant.js +11 -11
- package/build/src/abap/2_statements/expressions/constant_field_length.js +13 -13
- package/build/src/abap/2_statements/expressions/constant_string.js +10 -10
- package/build/src/abap/2_statements/expressions/conv_body.js +11 -11
- package/build/src/abap/2_statements/expressions/corresponding_body.js +17 -17
- package/build/src/abap/2_statements/expressions/data_definition.js +13 -13
- package/build/src/abap/2_statements/expressions/database_connection.js +12 -12
- package/build/src/abap/2_statements/expressions/database_table.js +11 -11
- package/build/src/abap/2_statements/expressions/decimals.js +12 -12
- package/build/src/abap/2_statements/expressions/default.js +13 -13
- package/build/src/abap/2_statements/expressions/definition_name.js +12 -12
- package/build/src/abap/2_statements/expressions/dereference.js +11 -11
- package/build/src/abap/2_statements/expressions/destination.js +11 -11
- package/build/src/abap/2_statements/expressions/dynamic.js +13 -13
- package/build/src/abap/2_statements/expressions/entity_association.js +10 -10
- package/build/src/abap/2_statements/expressions/event_handler.js +12 -12
- package/build/src/abap/2_statements/expressions/event_name.js +10 -10
- package/build/src/abap/2_statements/expressions/exception_name.js +13 -13
- package/build/src/abap/2_statements/expressions/field.js +12 -12
- package/build/src/abap/2_statements/expressions/field_all.js +12 -12
- package/build/src/abap/2_statements/expressions/field_assignment.js +13 -13
- package/build/src/abap/2_statements/expressions/field_chain.js +19 -19
- package/build/src/abap/2_statements/expressions/field_length.js +14 -14
- package/build/src/abap/2_statements/expressions/field_offset.js +13 -13
- package/build/src/abap/2_statements/expressions/field_sub.js +13 -13
- package/build/src/abap/2_statements/expressions/field_symbol.js +13 -13
- package/build/src/abap/2_statements/expressions/filter_body.js +13 -13
- package/build/src/abap/2_statements/expressions/final_methods.js +11 -11
- package/build/src/abap/2_statements/expressions/find_type.js +11 -11
- package/build/src/abap/2_statements/expressions/for.js +24 -24
- package/build/src/abap/2_statements/expressions/form_changing.js +11 -11
- package/build/src/abap/2_statements/expressions/form_name.js +12 -12
- package/build/src/abap/2_statements/expressions/form_param.js +13 -13
- package/build/src/abap/2_statements/expressions/form_param_name.js +14 -14
- package/build/src/abap/2_statements/expressions/form_param_type.js +16 -16
- package/build/src/abap/2_statements/expressions/form_raising.js +14 -14
- package/build/src/abap/2_statements/expressions/form_tables.js +11 -11
- package/build/src/abap/2_statements/expressions/form_using.js +11 -11
- package/build/src/abap/2_statements/expressions/fstarget.js +11 -11
- package/build/src/abap/2_statements/expressions/function_exporting.js +12 -12
- package/build/src/abap/2_statements/expressions/function_exporting_parameter.js +16 -16
- package/build/src/abap/2_statements/expressions/function_name.js +11 -11
- package/build/src/abap/2_statements/expressions/function_parameters.js +17 -17
- package/build/src/abap/2_statements/expressions/include_name.js +11 -11
- package/build/src/abap/2_statements/expressions/index.js +226 -226
- package/build/src/abap/2_statements/expressions/inline_field.js +11 -11
- package/build/src/abap/2_statements/expressions/inline_field_definition.js +11 -11
- package/build/src/abap/2_statements/expressions/inline_loop_definition.js +12 -12
- package/build/src/abap/2_statements/expressions/inlinedata.js +17 -17
- package/build/src/abap/2_statements/expressions/inlinefs.js +16 -16
- package/build/src/abap/2_statements/expressions/integer.js +12 -12
- package/build/src/abap/2_statements/expressions/interface_name.js +10 -10
- package/build/src/abap/2_statements/expressions/kernel_id.js +12 -12
- package/build/src/abap/2_statements/expressions/language.js +10 -10
- package/build/src/abap/2_statements/expressions/length.js +12 -12
- package/build/src/abap/2_statements/expressions/let.js +11 -11
- package/build/src/abap/2_statements/expressions/loop_group_by.js +16 -16
- package/build/src/abap/2_statements/expressions/loop_group_by_component.js +15 -15
- package/build/src/abap/2_statements/expressions/loop_group_by_target.js +14 -14
- package/build/src/abap/2_statements/expressions/loop_target.js +14 -14
- package/build/src/abap/2_statements/expressions/macro_name.js +12 -12
- package/build/src/abap/2_statements/expressions/message_class.js +11 -11
- package/build/src/abap/2_statements/expressions/message_number.js +10 -10
- package/build/src/abap/2_statements/expressions/message_source.js +15 -15
- package/build/src/abap/2_statements/expressions/message_type_and_number.js +10 -10
- package/build/src/abap/2_statements/expressions/method_call.js +13 -13
- package/build/src/abap/2_statements/expressions/method_call_body.js +15 -15
- package/build/src/abap/2_statements/expressions/method_call_chain.js +19 -19
- package/build/src/abap/2_statements/expressions/method_call_param.js +19 -19
- package/build/src/abap/2_statements/expressions/method_def_changing.js +11 -11
- package/build/src/abap/2_statements/expressions/method_def_exceptions.js +12 -12
- package/build/src/abap/2_statements/expressions/method_def_exporting.js +11 -11
- package/build/src/abap/2_statements/expressions/method_def_importing.js +12 -12
- package/build/src/abap/2_statements/expressions/method_def_raising.js +14 -14
- package/build/src/abap/2_statements/expressions/method_def_returning.js +13 -13
- package/build/src/abap/2_statements/expressions/method_name.js +10 -10
- package/build/src/abap/2_statements/expressions/method_param.js +15 -15
- package/build/src/abap/2_statements/expressions/method_param_name.js +11 -11
- package/build/src/abap/2_statements/expressions/method_param_optional.js +11 -11
- package/build/src/abap/2_statements/expressions/method_parameters.js +17 -17
- package/build/src/abap/2_statements/expressions/method_source.js +22 -22
- package/build/src/abap/2_statements/expressions/modif.js +10 -10
- package/build/src/abap/2_statements/expressions/namespace_simple_name.js +10 -10
- package/build/src/abap/2_statements/expressions/new_object.js +18 -18
- package/build/src/abap/2_statements/expressions/ole_exporting.js +12 -12
- package/build/src/abap/2_statements/expressions/or.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_exception.js +12 -12
- package/build/src/abap/2_statements/expressions/parameter_list_exceptions.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_list_s.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_list_t.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_name.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_s.js +11 -11
- package/build/src/abap/2_statements/expressions/parameter_t.js +11 -11
- package/build/src/abap/2_statements/expressions/pass_by_value.js +13 -13
- package/build/src/abap/2_statements/expressions/perform_changing.js +12 -12
- package/build/src/abap/2_statements/expressions/perform_tables.js +12 -12
- package/build/src/abap/2_statements/expressions/perform_using.js +12 -12
- package/build/src/abap/2_statements/expressions/radio_group_name.js +10 -10
- package/build/src/abap/2_statements/expressions/raise_with.js +12 -12
- package/build/src/abap/2_statements/expressions/read_table_target.js +13 -13
- package/build/src/abap/2_statements/expressions/receive_parameters.js +16 -16
- package/build/src/abap/2_statements/expressions/redefinition.js +10 -10
- package/build/src/abap/2_statements/expressions/reduce_body.js +13 -13
- package/build/src/abap/2_statements/expressions/reduce_next.js +15 -15
- package/build/src/abap/2_statements/expressions/report_name.js +11 -11
- package/build/src/abap/2_statements/expressions/select.js +25 -25
- package/build/src/abap/2_statements/expressions/select_loop.js +26 -26
- package/build/src/abap/2_statements/expressions/simple_field_chain.js +17 -17
- package/build/src/abap/2_statements/expressions/simple_field_chain2.js +19 -19
- package/build/src/abap/2_statements/expressions/simple_name.js +10 -10
- package/build/src/abap/2_statements/expressions/simple_source1.js +13 -13
- package/build/src/abap/2_statements/expressions/simple_source2.js +14 -14
- package/build/src/abap/2_statements/expressions/simple_source3.js +11 -11
- package/build/src/abap/2_statements/expressions/simple_source4.js +12 -12
- package/build/src/abap/2_statements/expressions/simple_target.js +21 -21
- package/build/src/abap/2_statements/expressions/source.js +40 -40
- package/build/src/abap/2_statements/expressions/source_field.js +11 -11
- package/build/src/abap/2_statements/expressions/source_field_symbol.js +11 -11
- package/build/src/abap/2_statements/expressions/sql_aggregation.js +21 -21
- package/build/src/abap/2_statements/expressions/sql_alias_field.js +10 -10
- package/build/src/abap/2_statements/expressions/sql_arithmetics.js +14 -14
- package/build/src/abap/2_statements/expressions/sql_as_name.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_case.js +21 -21
- package/build/src/abap/2_statements/expressions/sql_cds_parameters.js +14 -14
- package/build/src/abap/2_statements/expressions/sql_client.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_compare.js +21 -21
- package/build/src/abap/2_statements/expressions/sql_compare_operator.js +11 -11
- package/build/src/abap/2_statements/expressions/sql_cond.js +16 -16
- package/build/src/abap/2_statements/expressions/sql_field.js +21 -21
- package/build/src/abap/2_statements/expressions/sql_field_and_value.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_field_list.js +14 -14
- package/build/src/abap/2_statements/expressions/sql_field_list_loop.js +19 -19
- package/build/src/abap/2_statements/expressions/sql_field_name.js +10 -10
- package/build/src/abap/2_statements/expressions/sql_for_all_entries.js +12 -12
- package/build/src/abap/2_statements/expressions/sql_from.js +14 -14
- package/build/src/abap/2_statements/expressions/sql_from_source.js +17 -17
- package/build/src/abap/2_statements/expressions/sql_function.js +36 -36
- package/build/src/abap/2_statements/expressions/sql_group_by.js +15 -15
- package/build/src/abap/2_statements/expressions/sql_having.js +12 -12
- package/build/src/abap/2_statements/expressions/sql_hints.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_in.js +20 -20
- package/build/src/abap/2_statements/expressions/sql_into_structure.js +14 -14
- package/build/src/abap/2_statements/expressions/sql_into_table.js +12 -12
- package/build/src/abap/2_statements/expressions/sql_join.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_order_by.js +15 -15
- package/build/src/abap/2_statements/expressions/sql_path.js +13 -13
- package/build/src/abap/2_statements/expressions/sql_source.js +15 -15
- package/build/src/abap/2_statements/expressions/sql_source_simple.js +16 -16
- package/build/src/abap/2_statements/expressions/sql_target.js +15 -15
- package/build/src/abap/2_statements/expressions/sql_up_to.js +12 -12
- package/build/src/abap/2_statements/expressions/string_template.js +14 -14
- package/build/src/abap/2_statements/expressions/string_template_formatting.js +34 -34
- package/build/src/abap/2_statements/expressions/string_template_source.js +12 -12
- package/build/src/abap/2_statements/expressions/super_class_name.js +11 -11
- package/build/src/abap/2_statements/expressions/switch_body.js +13 -13
- package/build/src/abap/2_statements/expressions/table_body.js +12 -12
- package/build/src/abap/2_statements/expressions/table_expression.js +17 -17
- package/build/src/abap/2_statements/expressions/target.js +22 -22
- package/build/src/abap/2_statements/expressions/target_field.js +11 -11
- package/build/src/abap/2_statements/expressions/target_field_symbol.js +11 -11
- package/build/src/abap/2_statements/expressions/test_seam_name.js +12 -12
- package/build/src/abap/2_statements/expressions/text_element.js +12 -12
- package/build/src/abap/2_statements/expressions/text_element_key.js +10 -10
- package/build/src/abap/2_statements/expressions/text_element_string.js +14 -14
- package/build/src/abap/2_statements/expressions/throw.js +13 -13
- package/build/src/abap/2_statements/expressions/type.js +15 -15
- package/build/src/abap/2_statements/expressions/type_name.js +15 -15
- package/build/src/abap/2_statements/expressions/type_name_or_infer.js +11 -11
- package/build/src/abap/2_statements/expressions/type_param.js +16 -16
- package/build/src/abap/2_statements/expressions/type_table.js +29 -29
- package/build/src/abap/2_statements/expressions/type_table_key.js +17 -17
- package/build/src/abap/2_statements/expressions/value.js +12 -12
- package/build/src/abap/2_statements/expressions/value_body.js +15 -15
- package/build/src/abap/2_statements/expressions/value_body_line.js +15 -15
- package/build/src/abap/2_statements/expressions/value_body_lines.js +13 -13
- package/build/src/abap/2_statements/expressions/with_name.js +11 -11
- package/build/src/abap/2_statements/expressions/write_offset_length.js +17 -17
- package/build/src/abap/2_statements/result.js +36 -36
- package/build/src/abap/2_statements/statement_parser.js +280 -280
- package/build/src/abap/2_statements/statement_result.js +2 -2
- package/build/src/abap/2_statements/statement_runnable.js +2 -2
- package/build/src/abap/2_statements/statements/_statement.js +39 -39
- package/build/src/abap/2_statements/statements/add.js +14 -14
- package/build/src/abap/2_statements/statements/add_corresponding.js +13 -13
- package/build/src/abap/2_statements/statements/aliases.js +11 -11
- package/build/src/abap/2_statements/statements/append.js +19 -19
- package/build/src/abap/2_statements/statements/assert.js +14 -14
- package/build/src/abap/2_statements/statements/assign.js +20 -20
- package/build/src/abap/2_statements/statements/assign_local_copy.js +13 -13
- package/build/src/abap/2_statements/statements/at.js +16 -16
- package/build/src/abap/2_statements/statements/at_first.js +10 -10
- package/build/src/abap/2_statements/statements/at_last.js +10 -10
- package/build/src/abap/2_statements/statements/at_line_selection.js +11 -11
- package/build/src/abap/2_statements/statements/at_selection_screen.js +21 -21
- package/build/src/abap/2_statements/statements/at_user_command.js +11 -11
- package/build/src/abap/2_statements/statements/authority_check.js +15 -15
- package/build/src/abap/2_statements/statements/back.js +11 -11
- package/build/src/abap/2_statements/statements/break.js +14 -14
- package/build/src/abap/2_statements/statements/break_id.js +14 -14
- package/build/src/abap/2_statements/statements/call.js +13 -13
- package/build/src/abap/2_statements/statements/call_badi.js +13 -13
- package/build/src/abap/2_statements/statements/call_database.js +17 -17
- package/build/src/abap/2_statements/statements/call_dialog.js +17 -17
- package/build/src/abap/2_statements/statements/call_function.js +23 -23
- package/build/src/abap/2_statements/statements/call_kernel.js +13 -13
- package/build/src/abap/2_statements/statements/call_ole.js +14 -14
- package/build/src/abap/2_statements/statements/call_screen.js +15 -15
- package/build/src/abap/2_statements/statements/call_selection_screen.js +17 -17
- package/build/src/abap/2_statements/statements/call_transaction.js +17 -17
- package/build/src/abap/2_statements/statements/call_transformation.js +19 -19
- package/build/src/abap/2_statements/statements/case.js +11 -11
- package/build/src/abap/2_statements/statements/case_type.js +12 -12
- package/build/src/abap/2_statements/statements/catch.js +11 -11
- package/build/src/abap/2_statements/statements/catch_system_exceptions.js +13 -13
- package/build/src/abap/2_statements/statements/check.js +12 -12
- package/build/src/abap/2_statements/statements/check_select_options.js +12 -12
- package/build/src/abap/2_statements/statements/class_data.js +11 -11
- package/build/src/abap/2_statements/statements/class_data_begin.js +13 -13
- package/build/src/abap/2_statements/statements/class_data_end.js +13 -13
- package/build/src/abap/2_statements/statements/class_deferred.js +11 -11
- package/build/src/abap/2_statements/statements/class_definition.js +19 -19
- package/build/src/abap/2_statements/statements/class_definition_load.js +11 -11
- package/build/src/abap/2_statements/statements/class_implementation.js +11 -11
- package/build/src/abap/2_statements/statements/class_local_friends.js +11 -11
- package/build/src/abap/2_statements/statements/cleanup.js +12 -12
- package/build/src/abap/2_statements/statements/clear.js +13 -13
- package/build/src/abap/2_statements/statements/close_cursor.js +13 -13
- package/build/src/abap/2_statements/statements/close_dataset.js +13 -13
- package/build/src/abap/2_statements/statements/collect.js +13 -13
- package/build/src/abap/2_statements/statements/commit.js +12 -12
- package/build/src/abap/2_statements/statements/commit_entities.js +13 -13
- package/build/src/abap/2_statements/statements/communication.js +20 -20
- package/build/src/abap/2_statements/statements/compute.js +13 -13
- package/build/src/abap/2_statements/statements/concatenate.js +17 -17
- package/build/src/abap/2_statements/statements/condense.js +11 -11
- package/build/src/abap/2_statements/statements/constant.js +13 -13
- package/build/src/abap/2_statements/statements/constant_begin.js +12 -12
- package/build/src/abap/2_statements/statements/constant_end.js +12 -12
- package/build/src/abap/2_statements/statements/contexts.js +13 -13
- package/build/src/abap/2_statements/statements/continue.js +10 -10
- package/build/src/abap/2_statements/statements/controls.js +15 -15
- package/build/src/abap/2_statements/statements/convert.js +23 -23
- package/build/src/abap/2_statements/statements/convert_text.js +11 -11
- package/build/src/abap/2_statements/statements/create_data.js +27 -27
- package/build/src/abap/2_statements/statements/create_object.js +18 -18
- package/build/src/abap/2_statements/statements/create_ole.js +13 -13
- package/build/src/abap/2_statements/statements/data.js +11 -11
- package/build/src/abap/2_statements/statements/data_begin.js +13 -13
- package/build/src/abap/2_statements/statements/data_end.js +14 -14
- package/build/src/abap/2_statements/statements/define.js +13 -13
- package/build/src/abap/2_statements/statements/delete_cluster.js +15 -15
- package/build/src/abap/2_statements/statements/delete_database.js +16 -16
- package/build/src/abap/2_statements/statements/delete_dataset.js +13 -13
- package/build/src/abap/2_statements/statements/delete_dynpro.js +13 -13
- package/build/src/abap/2_statements/statements/delete_internal.js +23 -23
- package/build/src/abap/2_statements/statements/delete_memory.js +16 -16
- package/build/src/abap/2_statements/statements/delete_report.js +14 -14
- package/build/src/abap/2_statements/statements/delete_textpool.js +15 -15
- package/build/src/abap/2_statements/statements/demand.js +15 -15
- package/build/src/abap/2_statements/statements/describe.js +28 -28
- package/build/src/abap/2_statements/statements/detail.js +11 -11
- package/build/src/abap/2_statements/statements/divide.js +12 -12
- package/build/src/abap/2_statements/statements/do.js +14 -14
- package/build/src/abap/2_statements/statements/editor_call.js +15 -15
- package/build/src/abap/2_statements/statements/else.js +10 -10
- package/build/src/abap/2_statements/statements/elseif.js +11 -11
- package/build/src/abap/2_statements/statements/end_enhancement.js +11 -11
- package/build/src/abap/2_statements/statements/end_enhancement_section.js +12 -12
- package/build/src/abap/2_statements/statements/end_of_page.js +11 -11
- package/build/src/abap/2_statements/statements/end_of_selection.js +11 -11
- package/build/src/abap/2_statements/statements/end_test_injection.js +10 -10
- package/build/src/abap/2_statements/statements/end_test_seam.js +10 -10
- package/build/src/abap/2_statements/statements/endat.js +11 -11
- package/build/src/abap/2_statements/statements/endcase.js +10 -10
- package/build/src/abap/2_statements/statements/endcatch.js +11 -11
- package/build/src/abap/2_statements/statements/endclass.js +10 -10
- package/build/src/abap/2_statements/statements/enddefine.js +11 -11
- package/build/src/abap/2_statements/statements/enddo.js +10 -10
- package/build/src/abap/2_statements/statements/endexec.js +11 -11
- package/build/src/abap/2_statements/statements/endform.js +11 -11
- package/build/src/abap/2_statements/statements/endfunction.js +10 -10
- package/build/src/abap/2_statements/statements/endif.js +10 -10
- package/build/src/abap/2_statements/statements/endinterface.js +10 -10
- package/build/src/abap/2_statements/statements/endloop.js +10 -10
- package/build/src/abap/2_statements/statements/endmethod.js +10 -10
- package/build/src/abap/2_statements/statements/endmodule.js +11 -11
- package/build/src/abap/2_statements/statements/endon.js +12 -12
- package/build/src/abap/2_statements/statements/endprovide.js +12 -12
- package/build/src/abap/2_statements/statements/endselect.js +10 -10
- package/build/src/abap/2_statements/statements/endtry.js +10 -10
- package/build/src/abap/2_statements/statements/endwhile.js +10 -10
- package/build/src/abap/2_statements/statements/endwith.js +11 -11
- package/build/src/abap/2_statements/statements/enhancement.js +13 -13
- package/build/src/abap/2_statements/statements/enhancement_point.js +13 -13
- package/build/src/abap/2_statements/statements/enhancement_section.js +14 -14
- package/build/src/abap/2_statements/statements/events.js +12 -12
- package/build/src/abap/2_statements/statements/exec_sql.js +14 -14
- package/build/src/abap/2_statements/statements/exit.js +10 -10
- package/build/src/abap/2_statements/statements/export.js +28 -28
- package/build/src/abap/2_statements/statements/export_dynpro.js +13 -13
- package/build/src/abap/2_statements/statements/extract.js +13 -13
- package/build/src/abap/2_statements/statements/fetch_next_cursor.js +15 -15
- package/build/src/abap/2_statements/statements/field_group.js +13 -13
- package/build/src/abap/2_statements/statements/fields.js +13 -13
- package/build/src/abap/2_statements/statements/fieldsymbol.js +12 -12
- package/build/src/abap/2_statements/statements/find.js +16 -16
- package/build/src/abap/2_statements/statements/form.js +13 -13
- package/build/src/abap/2_statements/statements/form_definition.js +12 -12
- package/build/src/abap/2_statements/statements/format.js +16 -16
- package/build/src/abap/2_statements/statements/free.js +12 -12
- package/build/src/abap/2_statements/statements/free_memory.js +13 -13
- package/build/src/abap/2_statements/statements/free_object.js +13 -13
- package/build/src/abap/2_statements/statements/function_module.js +11 -11
- package/build/src/abap/2_statements/statements/function_pool.js +14 -14
- package/build/src/abap/2_statements/statements/generate_dynpro.js +15 -15
- package/build/src/abap/2_statements/statements/generate_report.js +26 -26
- package/build/src/abap/2_statements/statements/generate_subroutine.js +21 -21
- package/build/src/abap/2_statements/statements/get.js +15 -15
- package/build/src/abap/2_statements/statements/get_badi.js +16 -16
- package/build/src/abap/2_statements/statements/get_bit.js +12 -12
- package/build/src/abap/2_statements/statements/get_cursor.js +19 -19
- package/build/src/abap/2_statements/statements/get_dataset.js +15 -15
- package/build/src/abap/2_statements/statements/get_locale.js +15 -15
- package/build/src/abap/2_statements/statements/get_parameter.js +13 -13
- package/build/src/abap/2_statements/statements/get_permissions.js +13 -13
- package/build/src/abap/2_statements/statements/get_pf_status.js +15 -15
- package/build/src/abap/2_statements/statements/get_property.js +13 -13
- package/build/src/abap/2_statements/statements/get_reference.js +12 -12
- package/build/src/abap/2_statements/statements/get_run_time.js +13 -13
- package/build/src/abap/2_statements/statements/get_time.js +12 -12
- package/build/src/abap/2_statements/statements/hide.js +13 -13
- package/build/src/abap/2_statements/statements/if.js +11 -11
- package/build/src/abap/2_statements/statements/import.js +28 -28
- package/build/src/abap/2_statements/statements/import_dynpro.js +13 -13
- package/build/src/abap/2_statements/statements/import_nametab.js +13 -13
- package/build/src/abap/2_statements/statements/include.js +12 -12
- package/build/src/abap/2_statements/statements/include_type.js +14 -14
- package/build/src/abap/2_statements/statements/index.js +322 -322
- package/build/src/abap/2_statements/statements/infotypes.js +15 -15
- package/build/src/abap/2_statements/statements/initialization.js +11 -11
- package/build/src/abap/2_statements/statements/insert_database.js +16 -16
- package/build/src/abap/2_statements/statements/insert_field_group.js +15 -15
- package/build/src/abap/2_statements/statements/insert_internal.js +27 -27
- package/build/src/abap/2_statements/statements/insert_report.js +14 -14
- package/build/src/abap/2_statements/statements/insert_textpool.js +15 -15
- package/build/src/abap/2_statements/statements/interface.js +11 -11
- package/build/src/abap/2_statements/statements/interface_def.js +15 -15
- package/build/src/abap/2_statements/statements/interface_deferred.js +11 -11
- package/build/src/abap/2_statements/statements/interface_load.js +11 -11
- package/build/src/abap/2_statements/statements/leave.js +15 -15
- package/build/src/abap/2_statements/statements/load_of_program.js +12 -12
- package/build/src/abap/2_statements/statements/load_report.js +13 -13
- package/build/src/abap/2_statements/statements/local.js +13 -13
- package/build/src/abap/2_statements/statements/log_point.js +15 -15
- package/build/src/abap/2_statements/statements/loop.js +21 -21
- package/build/src/abap/2_statements/statements/loop_at_screen.js +13 -13
- package/build/src/abap/2_statements/statements/message.js +24 -24
- package/build/src/abap/2_statements/statements/method_def.js +27 -27
- package/build/src/abap/2_statements/statements/method_implementation.js +16 -16
- package/build/src/abap/2_statements/statements/modify_database.js +13 -13
- package/build/src/abap/2_statements/statements/modify_entities.js +15 -15
- package/build/src/abap/2_statements/statements/modify_internal.js +22 -22
- package/build/src/abap/2_statements/statements/modify_line.js +25 -25
- package/build/src/abap/2_statements/statements/modify_screen.js +13 -13
- package/build/src/abap/2_statements/statements/module.js +13 -13
- package/build/src/abap/2_statements/statements/move.js +20 -20
- package/build/src/abap/2_statements/statements/move_corresponding.js +15 -15
- package/build/src/abap/2_statements/statements/multiply.js +12 -12
- package/build/src/abap/2_statements/statements/new_line.js +12 -12
- package/build/src/abap/2_statements/statements/new_page.js +28 -28
- package/build/src/abap/2_statements/statements/nodes.js +13 -13
- package/build/src/abap/2_statements/statements/on_change.js +14 -14
- package/build/src/abap/2_statements/statements/open_cursor.js +13 -13
- package/build/src/abap/2_statements/statements/open_dataset.js +28 -28
- package/build/src/abap/2_statements/statements/overlay.js +13 -13
- package/build/src/abap/2_statements/statements/pack.js +13 -13
- package/build/src/abap/2_statements/statements/parameter.js +26 -26
- package/build/src/abap/2_statements/statements/perform.js +21 -21
- package/build/src/abap/2_statements/statements/position.js +13 -13
- package/build/src/abap/2_statements/statements/print_control.js +15 -15
- package/build/src/abap/2_statements/statements/private.js +10 -10
- package/build/src/abap/2_statements/statements/program.js +18 -18
- package/build/src/abap/2_statements/statements/protected.js +10 -10
- package/build/src/abap/2_statements/statements/provide.js +16 -16
- package/build/src/abap/2_statements/statements/public.js +10 -10
- package/build/src/abap/2_statements/statements/put.js +13 -13
- package/build/src/abap/2_statements/statements/raise.js +19 -19
- package/build/src/abap/2_statements/statements/raise_event.js +12 -12
- package/build/src/abap/2_statements/statements/ranges.js +14 -14
- package/build/src/abap/2_statements/statements/read_dataset.js +13 -13
- package/build/src/abap/2_statements/statements/read_entities.js +17 -17
- package/build/src/abap/2_statements/statements/read_line.js +19 -19
- package/build/src/abap/2_statements/statements/read_report.js +16 -16
- package/build/src/abap/2_statements/statements/read_table.js +20 -20
- package/build/src/abap/2_statements/statements/read_textpool.js +16 -16
- package/build/src/abap/2_statements/statements/receive.js +13 -13
- package/build/src/abap/2_statements/statements/refresh.js +14 -14
- package/build/src/abap/2_statements/statements/refresh_control.js +13 -13
- package/build/src/abap/2_statements/statements/reject.js +13 -13
- package/build/src/abap/2_statements/statements/replace.js +24 -24
- package/build/src/abap/2_statements/statements/report.js +20 -20
- package/build/src/abap/2_statements/statements/reserve.js +13 -13
- package/build/src/abap/2_statements/statements/resume.js +10 -10
- package/build/src/abap/2_statements/statements/retry.js +11 -11
- package/build/src/abap/2_statements/statements/return.js +10 -10
- package/build/src/abap/2_statements/statements/rollback.js +11 -11
- package/build/src/abap/2_statements/statements/rollback_entities.js +12 -12
- package/build/src/abap/2_statements/statements/scan.js +34 -34
- package/build/src/abap/2_statements/statements/scroll_list.js +17 -17
- package/build/src/abap/2_statements/statements/search.js +17 -17
- package/build/src/abap/2_statements/statements/select.js +13 -13
- package/build/src/abap/2_statements/statements/select_loop.js +10 -10
- package/build/src/abap/2_statements/statements/selectionscreen.js +43 -43
- package/build/src/abap/2_statements/statements/selectoption.js +23 -23
- package/build/src/abap/2_statements/statements/set_bit.js +12 -12
- package/build/src/abap/2_statements/statements/set_blank.js +13 -13
- package/build/src/abap/2_statements/statements/set_country.js +13 -13
- package/build/src/abap/2_statements/statements/set_cursor.js +17 -17
- package/build/src/abap/2_statements/statements/set_dataset.js +13 -13
- package/build/src/abap/2_statements/statements/set_extended_check.js +12 -12
- package/build/src/abap/2_statements/statements/set_handler.js +14 -14
- package/build/src/abap/2_statements/statements/set_language.js +13 -13
- package/build/src/abap/2_statements/statements/set_left.js +13 -13
- package/build/src/abap/2_statements/statements/set_locale.js +15 -15
- package/build/src/abap/2_statements/statements/set_locks.js +13 -13
- package/build/src/abap/2_statements/statements/set_margin.js +13 -13
- package/build/src/abap/2_statements/statements/set_parameter.js +13 -13
- package/build/src/abap/2_statements/statements/set_pf_status.js +15 -15
- package/build/src/abap/2_statements/statements/set_property.js +13 -13
- package/build/src/abap/2_statements/statements/set_run_time.js +14 -14
- package/build/src/abap/2_statements/statements/set_screen.js +13 -13
- package/build/src/abap/2_statements/statements/set_titlebar.js +15 -15
- package/build/src/abap/2_statements/statements/set_update_task.js +11 -11
- package/build/src/abap/2_statements/statements/set_user_command.js +13 -13
- package/build/src/abap/2_statements/statements/shift.js +17 -17
- package/build/src/abap/2_statements/statements/skip.js +13 -13
- package/build/src/abap/2_statements/statements/sort.js +18 -18
- package/build/src/abap/2_statements/statements/sort_dataset.js +17 -17
- package/build/src/abap/2_statements/statements/split.js +14 -14
- package/build/src/abap/2_statements/statements/start_of_selection.js +11 -11
- package/build/src/abap/2_statements/statements/static.js +14 -14
- package/build/src/abap/2_statements/statements/static_begin.js +13 -13
- package/build/src/abap/2_statements/statements/static_end.js +12 -12
- package/build/src/abap/2_statements/statements/stop.js +11 -11
- package/build/src/abap/2_statements/statements/submit.js +39 -39
- package/build/src/abap/2_statements/statements/subtract.js +12 -12
- package/build/src/abap/2_statements/statements/subtract_corresponding.js +13 -13
- package/build/src/abap/2_statements/statements/sum.js +11 -11
- package/build/src/abap/2_statements/statements/summary.js +11 -11
- package/build/src/abap/2_statements/statements/supply.js +14 -14
- package/build/src/abap/2_statements/statements/suppress_dialog.js +12 -12
- package/build/src/abap/2_statements/statements/syntax_check.js +29 -29
- package/build/src/abap/2_statements/statements/system_call.js +17 -17
- package/build/src/abap/2_statements/statements/tables.js +13 -13
- package/build/src/abap/2_statements/statements/test_injection.js +11 -11
- package/build/src/abap/2_statements/statements/test_seam.js +11 -11
- package/build/src/abap/2_statements/statements/top_of_page.js +12 -12
- package/build/src/abap/2_statements/statements/transfer.js +14 -14
- package/build/src/abap/2_statements/statements/translate.js +13 -13
- package/build/src/abap/2_statements/statements/truncate_dataset.js +11 -11
- package/build/src/abap/2_statements/statements/try.js +10 -10
- package/build/src/abap/2_statements/statements/type.js +17 -17
- package/build/src/abap/2_statements/statements/type_begin.js +13 -13
- package/build/src/abap/2_statements/statements/type_end.js +12 -12
- package/build/src/abap/2_statements/statements/type_enum.js +14 -14
- package/build/src/abap/2_statements/statements/type_enum_begin.js +16 -16
- package/build/src/abap/2_statements/statements/type_enum_end.js +14 -14
- package/build/src/abap/2_statements/statements/type_mesh.js +16 -16
- package/build/src/abap/2_statements/statements/type_mesh_begin.js +13 -13
- package/build/src/abap/2_statements/statements/type_mesh_end.js +13 -13
- package/build/src/abap/2_statements/statements/type_pool.js +14 -14
- package/build/src/abap/2_statements/statements/type_pools.js +14 -14
- package/build/src/abap/2_statements/statements/uline.js +13 -13
- package/build/src/abap/2_statements/statements/unassign.js +11 -11
- package/build/src/abap/2_statements/statements/unpack.js +13 -13
- package/build/src/abap/2_statements/statements/update_database.js +15 -15
- package/build/src/abap/2_statements/statements/wait.js +19 -19
- package/build/src/abap/2_statements/statements/when.js +12 -12
- package/build/src/abap/2_statements/statements/when_others.js +10 -10
- package/build/src/abap/2_statements/statements/when_type.js +14 -14
- package/build/src/abap/2_statements/statements/while.js +12 -12
- package/build/src/abap/2_statements/statements/window.js +14 -14
- package/build/src/abap/2_statements/statements/with.js +14 -14
- package/build/src/abap/2_statements/statements/with_loop.js +14 -14
- package/build/src/abap/2_statements/statements/write.js +19 -19
- package/build/src/abap/3_structures/structure_parser.js +57 -57
- package/build/src/abap/3_structures/structure_result.js +2 -2
- package/build/src/abap/3_structures/structures/_combi.js +325 -325
- package/build/src/abap/3_structures/structures/_match.js +2 -2
- package/build/src/abap/3_structures/structures/_structure.js +2 -2
- package/build/src/abap/3_structures/structures/_structure_runnable.js +2 -2
- package/build/src/abap/3_structures/structures/any.js +12 -12
- package/build/src/abap/3_structures/structures/at.js +12 -12
- package/build/src/abap/3_structures/structures/at_first.js +12 -12
- package/build/src/abap/3_structures/structures/at_last.js +12 -12
- package/build/src/abap/3_structures/structures/body.js +12 -12
- package/build/src/abap/3_structures/structures/case.js +13 -13
- package/build/src/abap/3_structures/structures/case_type.js +12 -12
- package/build/src/abap/3_structures/structures/catch.js +13 -13
- package/build/src/abap/3_structures/structures/catch_system_exceptions.js +12 -12
- package/build/src/abap/3_structures/structures/class_data.js +11 -11
- package/build/src/abap/3_structures/structures/class_definition.js +16 -16
- package/build/src/abap/3_structures/structures/class_global.js +12 -12
- package/build/src/abap/3_structures/structures/class_implementation.js +14 -14
- package/build/src/abap/3_structures/structures/cleanup.js +13 -13
- package/build/src/abap/3_structures/structures/constants.js +11 -11
- package/build/src/abap/3_structures/structures/data.js +15 -15
- package/build/src/abap/3_structures/structures/define.js +12 -12
- package/build/src/abap/3_structures/structures/do.js +12 -12
- package/build/src/abap/3_structures/structures/else.js +14 -14
- package/build/src/abap/3_structures/structures/elseif.js +14 -14
- package/build/src/abap/3_structures/structures/enhancement.js +12 -12
- package/build/src/abap/3_structures/structures/enhancement_section.js +12 -12
- package/build/src/abap/3_structures/structures/exec_sql.js +12 -12
- package/build/src/abap/3_structures/structures/form.js +12 -12
- package/build/src/abap/3_structures/structures/function_module.js +12 -12
- package/build/src/abap/3_structures/structures/if.js +15 -15
- package/build/src/abap/3_structures/structures/index.js +67 -67
- package/build/src/abap/3_structures/structures/interface.js +13 -13
- package/build/src/abap/3_structures/structures/interface_global.js +12 -12
- package/build/src/abap/3_structures/structures/loop.js +13 -13
- package/build/src/abap/3_structures/structures/loop_at_screen.js +12 -12
- package/build/src/abap/3_structures/structures/method.js +13 -13
- package/build/src/abap/3_structures/structures/module.js +12 -12
- package/build/src/abap/3_structures/structures/normal.js +15 -15
- package/build/src/abap/3_structures/structures/on_change.js +12 -12
- package/build/src/abap/3_structures/structures/private_section.js +12 -12
- package/build/src/abap/3_structures/structures/protected_section.js +12 -12
- package/build/src/abap/3_structures/structures/provide.js +12 -12
- package/build/src/abap/3_structures/structures/public_section.js +12 -12
- package/build/src/abap/3_structures/structures/section_section.js +17 -17
- package/build/src/abap/3_structures/structures/select.js +12 -12
- package/build/src/abap/3_structures/structures/statics.js +11 -11
- package/build/src/abap/3_structures/structures/test_injection.js +12 -12
- package/build/src/abap/3_structures/structures/test_seam.js +12 -12
- package/build/src/abap/3_structures/structures/try.js +15 -15
- package/build/src/abap/3_structures/structures/type_enum.js +11 -11
- package/build/src/abap/3_structures/structures/type_mesh.js +11 -11
- package/build/src/abap/3_structures/structures/types.js +12 -12
- package/build/src/abap/3_structures/structures/when.js +13 -13
- package/build/src/abap/3_structures/structures/when_type.js +13 -13
- package/build/src/abap/3_structures/structures/while.js +12 -12
- package/build/src/abap/3_structures/structures/with.js +12 -12
- package/build/src/abap/4_file_information/_abap_file_information.js +17 -17
- package/build/src/abap/4_file_information/_identifier.js +35 -35
- package/build/src/abap/4_file_information/abap_file_information.js +352 -352
- package/build/src/abap/4_file_information/visibility.js +9 -9
- package/build/src/abap/5_syntax/_builtin.js +1090 -1090
- package/build/src/abap/5_syntax/_current_scope.js +351 -351
- package/build/src/abap/5_syntax/_object_oriented.js +340 -340
- package/build/src/abap/5_syntax/_procedural.js +152 -152
- package/build/src/abap/5_syntax/_reference.js +23 -23
- package/build/src/abap/5_syntax/_scope_type.js +22 -22
- package/build/src/abap/5_syntax/_spaghetti_scope.js +2 -2
- package/build/src/abap/5_syntax/_statement_syntax.js +2 -2
- package/build/src/abap/5_syntax/_type_utils.js +266 -266
- package/build/src/abap/5_syntax/basic_types.js +880 -880
- package/build/src/abap/5_syntax/expressions/attribute_chain.js +40 -40
- package/build/src/abap/5_syntax/expressions/attribute_name.js +62 -62
- package/build/src/abap/5_syntax/expressions/cast.js +58 -58
- package/build/src/abap/5_syntax/expressions/compare.js +21 -21
- package/build/src/abap/5_syntax/expressions/component_chain.js +85 -85
- package/build/src/abap/5_syntax/expressions/component_compare.js +19 -19
- package/build/src/abap/5_syntax/expressions/component_compare_simple.js +29 -29
- package/build/src/abap/5_syntax/expressions/component_cond.js +19 -19
- package/build/src/abap/5_syntax/expressions/component_name.js +37 -37
- package/build/src/abap/5_syntax/expressions/cond.js +22 -22
- package/build/src/abap/5_syntax/expressions/cond_body.js +36 -36
- package/build/src/abap/5_syntax/expressions/constant.js +23 -23
- package/build/src/abap/5_syntax/expressions/conv_body.js +25 -25
- package/build/src/abap/5_syntax/expressions/corresponding_body.js +23 -23
- package/build/src/abap/5_syntax/expressions/data_definition.js +36 -36
- package/build/src/abap/5_syntax/expressions/database_table.js +26 -26
- package/build/src/abap/5_syntax/expressions/default.js +15 -15
- package/build/src/abap/5_syntax/expressions/dereference.js +19 -19
- package/build/src/abap/5_syntax/expressions/dynamic.js +15 -15
- package/build/src/abap/5_syntax/expressions/field_assignment.js +37 -37
- package/build/src/abap/5_syntax/expressions/field_chain.js +140 -140
- package/build/src/abap/5_syntax/expressions/field_length.js +15 -15
- package/build/src/abap/5_syntax/expressions/field_offset.js +15 -15
- package/build/src/abap/5_syntax/expressions/filter_body.js +23 -23
- package/build/src/abap/5_syntax/expressions/for.js +59 -59
- package/build/src/abap/5_syntax/expressions/form_param.js +41 -41
- package/build/src/abap/5_syntax/expressions/fstarget.js +24 -24
- package/build/src/abap/5_syntax/expressions/inline_data.js +25 -25
- package/build/src/abap/5_syntax/expressions/inline_field_definition.js +42 -42
- package/build/src/abap/5_syntax/expressions/inline_fs.js +25 -25
- package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +52 -52
- package/build/src/abap/5_syntax/expressions/let.js +21 -21
- package/build/src/abap/5_syntax/expressions/loop_group_by.js +41 -41
- package/build/src/abap/5_syntax/expressions/message_source.js +13 -13
- package/build/src/abap/5_syntax/expressions/method_call_body.js +23 -23
- package/build/src/abap/5_syntax/expressions/method_call_chain.js +126 -126
- package/build/src/abap/5_syntax/expressions/method_call_param.js +74 -74
- package/build/src/abap/5_syntax/expressions/method_def_returning.js +28 -28
- package/build/src/abap/5_syntax/expressions/method_param.js +37 -37
- package/build/src/abap/5_syntax/expressions/method_parameters.js +216 -216
- package/build/src/abap/5_syntax/expressions/method_source.js +141 -141
- package/build/src/abap/5_syntax/expressions/new_object.js +119 -119
- package/build/src/abap/5_syntax/expressions/raise_with.js +13 -13
- package/build/src/abap/5_syntax/expressions/reduce_body.js +60 -60
- package/build/src/abap/5_syntax/expressions/reduce_next.js +20 -20
- package/build/src/abap/5_syntax/expressions/select.js +56 -56
- package/build/src/abap/5_syntax/expressions/select_loop.js +11 -11
- package/build/src/abap/5_syntax/expressions/source.js +251 -251
- package/build/src/abap/5_syntax/expressions/source_field.js +25 -25
- package/build/src/abap/5_syntax/expressions/source_field_symbol.js +16 -16
- package/build/src/abap/5_syntax/expressions/sql_for_all_entries.js +26 -26
- package/build/src/abap/5_syntax/expressions/sql_from.js +21 -21
- package/build/src/abap/5_syntax/expressions/string_template.js +15 -15
- package/build/src/abap/5_syntax/expressions/switch_body.js +25 -25
- package/build/src/abap/5_syntax/expressions/table_expression.js +16 -16
- package/build/src/abap/5_syntax/expressions/target.js +139 -139
- package/build/src/abap/5_syntax/expressions/type_table.js +42 -42
- package/build/src/abap/5_syntax/expressions/type_table_key.js +24 -24
- package/build/src/abap/5_syntax/expressions/value_body.js +70 -70
- package/build/src/abap/5_syntax/global_definitions/find_global_definitions.js +141 -141
- package/build/src/abap/5_syntax/spaghetti_scope.js +284 -285
- package/build/src/abap/5_syntax/statements/add.js +17 -17
- package/build/src/abap/5_syntax/statements/add_corresponding.js +17 -17
- package/build/src/abap/5_syntax/statements/append.js +64 -64
- package/build/src/abap/5_syntax/statements/assert.js +13 -13
- package/build/src/abap/5_syntax/statements/assign.js +33 -33
- package/build/src/abap/5_syntax/statements/authority_check.js +13 -13
- package/build/src/abap/5_syntax/statements/call.js +28 -28
- package/build/src/abap/5_syntax/statements/call_badi.js +21 -21
- package/build/src/abap/5_syntax/statements/call_function.js +32 -32
- package/build/src/abap/5_syntax/statements/call_kernel.js +13 -13
- package/build/src/abap/5_syntax/statements/call_transaction.js +17 -17
- package/build/src/abap/5_syntax/statements/call_transformation.js +29 -29
- package/build/src/abap/5_syntax/statements/case.js +14 -14
- package/build/src/abap/5_syntax/statements/catch.js +60 -60
- package/build/src/abap/5_syntax/statements/check.js +13 -13
- package/build/src/abap/5_syntax/statements/class_data.js +26 -26
- package/build/src/abap/5_syntax/statements/class_deferred.js +12 -12
- package/build/src/abap/5_syntax/statements/class_implementation.js +42 -42
- package/build/src/abap/5_syntax/statements/class_local_friends.js +22 -22
- package/build/src/abap/5_syntax/statements/clear.js +17 -17
- package/build/src/abap/5_syntax/statements/close_dataset.js +13 -13
- package/build/src/abap/5_syntax/statements/collect.js +24 -24
- package/build/src/abap/5_syntax/statements/commit_entities.js +25 -25
- package/build/src/abap/5_syntax/statements/concatenate.js +25 -25
- package/build/src/abap/5_syntax/statements/condense.js +13 -13
- package/build/src/abap/5_syntax/statements/constant.js +24 -24
- package/build/src/abap/5_syntax/statements/controls.js +43 -43
- package/build/src/abap/5_syntax/statements/convert.js +47 -47
- package/build/src/abap/5_syntax/statements/create_data.js +26 -26
- package/build/src/abap/5_syntax/statements/create_object.js +98 -98
- package/build/src/abap/5_syntax/statements/data.js +21 -21
- package/build/src/abap/5_syntax/statements/delete_cluster.js +21 -21
- package/build/src/abap/5_syntax/statements/delete_database.js +25 -25
- package/build/src/abap/5_syntax/statements/delete_internal.js +42 -42
- package/build/src/abap/5_syntax/statements/delete_report.js +13 -13
- package/build/src/abap/5_syntax/statements/describe.js +61 -61
- package/build/src/abap/5_syntax/statements/divide.js +17 -17
- package/build/src/abap/5_syntax/statements/do.js +14 -14
- package/build/src/abap/5_syntax/statements/else_if.js +13 -13
- package/build/src/abap/5_syntax/statements/export.js +25 -25
- package/build/src/abap/5_syntax/statements/fieldsymbol.js +22 -22
- package/build/src/abap/5_syntax/statements/find.js +76 -76
- package/build/src/abap/5_syntax/statements/form.js +21 -21
- package/build/src/abap/5_syntax/statements/format.js +13 -13
- package/build/src/abap/5_syntax/statements/get_badi.js +21 -21
- package/build/src/abap/5_syntax/statements/get_bit.js +25 -25
- package/build/src/abap/5_syntax/statements/get_cursor.js +13 -13
- package/build/src/abap/5_syntax/statements/get_locale.js +17 -17
- package/build/src/abap/5_syntax/statements/get_parameter.js +24 -24
- package/build/src/abap/5_syntax/statements/get_reference.js +23 -23
- package/build/src/abap/5_syntax/statements/get_run_time.js +20 -20
- package/build/src/abap/5_syntax/statements/get_time.js +20 -20
- package/build/src/abap/5_syntax/statements/if.js +13 -13
- package/build/src/abap/5_syntax/statements/import.js +25 -25
- package/build/src/abap/5_syntax/statements/import_dynpro.js +17 -17
- package/build/src/abap/5_syntax/statements/include_type.js +55 -55
- package/build/src/abap/5_syntax/statements/insert_database.js +25 -25
- package/build/src/abap/5_syntax/statements/insert_field_group.js +20 -20
- package/build/src/abap/5_syntax/statements/insert_internal.js +54 -54
- package/build/src/abap/5_syntax/statements/insert_report.js +13 -13
- package/build/src/abap/5_syntax/statements/insert_textpool.js +13 -13
- package/build/src/abap/5_syntax/statements/interface_deferred.js +12 -12
- package/build/src/abap/5_syntax/statements/log_point.js +14 -14
- package/build/src/abap/5_syntax/statements/loop.js +89 -89
- package/build/src/abap/5_syntax/statements/loop_at_screen.js +20 -20
- package/build/src/abap/5_syntax/statements/message.js +31 -31
- package/build/src/abap/5_syntax/statements/method_implementation.js +41 -41
- package/build/src/abap/5_syntax/statements/modify_database.js +37 -37
- package/build/src/abap/5_syntax/statements/modify_entities.js +25 -25
- package/build/src/abap/5_syntax/statements/modify_internal.js +26 -26
- package/build/src/abap/5_syntax/statements/modify_screen.js +13 -13
- package/build/src/abap/5_syntax/statements/move.js +43 -43
- package/build/src/abap/5_syntax/statements/move_corresponding.js +28 -28
- package/build/src/abap/5_syntax/statements/multiply.js +17 -17
- package/build/src/abap/5_syntax/statements/open_dataset.js +17 -17
- package/build/src/abap/5_syntax/statements/pack.js +17 -17
- package/build/src/abap/5_syntax/statements/parameter.js +25 -25
- package/build/src/abap/5_syntax/statements/perform.js +52 -52
- package/build/src/abap/5_syntax/statements/raise.js +65 -65
- package/build/src/abap/5_syntax/statements/raise_event.js +23 -23
- package/build/src/abap/5_syntax/statements/ranges.js +30 -30
- package/build/src/abap/5_syntax/statements/read_entities.js +25 -25
- package/build/src/abap/5_syntax/statements/read_report.js +17 -17
- package/build/src/abap/5_syntax/statements/read_table.js +94 -94
- package/build/src/abap/5_syntax/statements/read_textpool.js +17 -17
- package/build/src/abap/5_syntax/statements/receive.js +19 -19
- package/build/src/abap/5_syntax/statements/replace.js +17 -17
- package/build/src/abap/5_syntax/statements/scan.js +17 -17
- package/build/src/abap/5_syntax/statements/search.js +13 -13
- package/build/src/abap/5_syntax/statements/select.js +16 -16
- package/build/src/abap/5_syntax/statements/select_loop.js +14 -14
- package/build/src/abap/5_syntax/statements/selection_screen.js +31 -31
- package/build/src/abap/5_syntax/statements/selectoption.js +50 -50
- package/build/src/abap/5_syntax/statements/set_bit.js +17 -17
- package/build/src/abap/5_syntax/statements/set_handler.js +17 -17
- package/build/src/abap/5_syntax/statements/set_locale.js +17 -17
- package/build/src/abap/5_syntax/statements/set_parameter.js +13 -13
- package/build/src/abap/5_syntax/statements/set_pf_status.js +13 -13
- package/build/src/abap/5_syntax/statements/set_titlebar.js +13 -13
- package/build/src/abap/5_syntax/statements/shift.js +30 -30
- package/build/src/abap/5_syntax/statements/sort.js +47 -47
- package/build/src/abap/5_syntax/statements/split.js +41 -41
- package/build/src/abap/5_syntax/statements/static.js +29 -29
- package/build/src/abap/5_syntax/statements/submit.js +21 -21
- package/build/src/abap/5_syntax/statements/subtract.js +17 -17
- package/build/src/abap/5_syntax/statements/subtract_corresponding.js +17 -17
- package/build/src/abap/5_syntax/statements/syntax_check.js +17 -17
- package/build/src/abap/5_syntax/statements/system_call.js +13 -13
- package/build/src/abap/5_syntax/statements/tables.js +27 -27
- package/build/src/abap/5_syntax/statements/transfer.js +18 -18
- package/build/src/abap/5_syntax/statements/translate.js +17 -17
- package/build/src/abap/5_syntax/statements/truncate_dataset.js +13 -13
- package/build/src/abap/5_syntax/statements/type.js +26 -26
- package/build/src/abap/5_syntax/statements/unassign.js +19 -19
- package/build/src/abap/5_syntax/statements/unpack.js +17 -17
- package/build/src/abap/5_syntax/statements/update_database.js +46 -46
- package/build/src/abap/5_syntax/statements/wait.js +17 -17
- package/build/src/abap/5_syntax/statements/when.js +13 -13
- package/build/src/abap/5_syntax/statements/when_type.js +32 -32
- package/build/src/abap/5_syntax/statements/while.js +21 -21
- package/build/src/abap/5_syntax/statements/with.js +17 -17
- package/build/src/abap/5_syntax/statements/with_loop.js +17 -17
- package/build/src/abap/5_syntax/statements/write.js +35 -35
- package/build/src/abap/5_syntax/structures/class_data.js +29 -29
- package/build/src/abap/5_syntax/structures/constants.js +44 -44
- package/build/src/abap/5_syntax/structures/data.js +87 -87
- package/build/src/abap/5_syntax/structures/statics.js +77 -77
- package/build/src/abap/5_syntax/structures/type_enum.js +77 -77
- package/build/src/abap/5_syntax/structures/types.js +62 -62
- package/build/src/abap/5_syntax/syntax.js +453 -453
- package/build/src/abap/abap_file.js +45 -45
- package/build/src/abap/abap_parser.js +47 -47
- package/build/src/abap/artifacts.js +80 -80
- package/build/src/abap/flow/flow_graph.js +138 -138
- package/build/src/abap/flow/statement_flow.js +230 -230
- package/build/src/abap/nodes/_abstract_node.js +24 -24
- package/build/src/abap/nodes/_inode.js +2 -2
- package/build/src/abap/nodes/expression_node.js +231 -231
- package/build/src/abap/nodes/index.js +20 -20
- package/build/src/abap/nodes/statement_node.js +330 -330
- package/build/src/abap/nodes/structure_node.js +251 -251
- package/build/src/abap/nodes/token_node.js +36 -36
- package/build/src/abap/types/_aliases.js +2 -2
- package/build/src/abap/types/_class_attributes.js +2 -2
- package/build/src/abap/types/_class_definition.js +2 -2
- package/build/src/abap/types/_class_implementation.js +2 -2
- package/build/src/abap/types/_event_definition.js +2 -2
- package/build/src/abap/types/_form_definition.js +2 -2
- package/build/src/abap/types/_interface_definition.js +2 -2
- package/build/src/abap/types/_method_definition.js +2 -2
- package/build/src/abap/types/_method_definitions.js +2 -2
- package/build/src/abap/types/_method_parameters.js +2 -2
- package/build/src/abap/types/_type_definitions.js +2 -2
- package/build/src/abap/types/_typed_identifier.js +36 -36
- package/build/src/abap/types/alias.js +18 -18
- package/build/src/abap/types/aliases.js +60 -60
- package/build/src/abap/types/basic/_abstract_type.js +25 -25
- package/build/src/abap/types/basic/any_type.js +22 -22
- package/build/src/abap/types/basic/character_type.js +45 -45
- package/build/src/abap/types/basic/clike_type.js +22 -22
- package/build/src/abap/types/basic/csequence_type.js +22 -22
- package/build/src/abap/types/basic/data_reference_type.js +33 -33
- package/build/src/abap/types/basic/date_type.js +22 -22
- package/build/src/abap/types/basic/decfloat16_type.js +22 -22
- package/build/src/abap/types/basic/decfloat34_type.js +22 -22
- package/build/src/abap/types/basic/decfloat_type.js +22 -22
- package/build/src/abap/types/basic/enum_type.js +22 -22
- package/build/src/abap/types/basic/float_type.js +24 -24
- package/build/src/abap/types/basic/floating_point_type.js +33 -33
- package/build/src/abap/types/basic/generic_object_reference_type.js +22 -22
- package/build/src/abap/types/basic/hex_type.js +32 -32
- package/build/src/abap/types/basic/index.js +44 -44
- package/build/src/abap/types/basic/integer_type.js +22 -22
- package/build/src/abap/types/basic/numeric_generic_type.js +22 -22
- package/build/src/abap/types/basic/numeric_type.js +32 -32
- package/build/src/abap/types/basic/object_reference_type.js +33 -33
- package/build/src/abap/types/basic/packed_type.js +39 -39
- package/build/src/abap/types/basic/simple_type.js +22 -22
- package/build/src/abap/types/basic/string_type.js +22 -22
- package/build/src/abap/types/basic/structure_type.js +55 -55
- package/build/src/abap/types/basic/table_type.js +59 -59
- package/build/src/abap/types/basic/time_type.js +22 -22
- package/build/src/abap/types/basic/unknown_type.js +29 -29
- package/build/src/abap/types/basic/utc_long_type.js +22 -22
- package/build/src/abap/types/basic/void_type.js +29 -29
- package/build/src/abap/types/basic/xsequence_type.js +22 -22
- package/build/src/abap/types/basic/xstring_type.js +22 -22
- package/build/src/abap/types/class_attribute.js +14 -14
- package/build/src/abap/types/class_attributes.js +211 -211
- package/build/src/abap/types/class_constant.js +14 -14
- package/build/src/abap/types/class_definition.js +148 -148
- package/build/src/abap/types/class_implementation.js +34 -34
- package/build/src/abap/types/event_definition.js +32 -32
- package/build/src/abap/types/form_definition.js +81 -81
- package/build/src/abap/types/function_module_definition.js +92 -92
- package/build/src/abap/types/index.js +29 -29
- package/build/src/abap/types/interface_definition.js +99 -99
- package/build/src/abap/types/message.js +25 -25
- package/build/src/abap/types/method_definition.js +95 -95
- package/build/src/abap/types/method_definitions.js +60 -60
- package/build/src/abap/types/method_implementation.js +19 -19
- package/build/src/abap/types/method_parameters.js +242 -242
- package/build/src/abap/types/type_definitions.js +21 -21
- package/build/src/artifacts_objects.js +29 -29
- package/build/src/artifacts_rules.js +21 -21
- package/build/src/cds/artifacts.js +17 -17
- package/build/src/cds/cds_determine_types.js +22 -22
- package/build/src/cds/cds_lexer.js +154 -154
- package/build/src/cds/cds_parser.js +38 -38
- package/build/src/cds/expressions/cds_aggregate.js +13 -13
- package/build/src/cds/expressions/cds_annotate.js +11 -11
- package/build/src/cds/expressions/cds_annotation.js +12 -12
- package/build/src/cds/expressions/cds_annotation_array.js +14 -14
- package/build/src/cds/expressions/cds_annotation_object.js +15 -15
- package/build/src/cds/expressions/cds_annotation_simple.js +12 -12
- package/build/src/cds/expressions/cds_arithmetics.js +15 -15
- package/build/src/cds/expressions/cds_as.js +11 -11
- package/build/src/cds/expressions/cds_association.js +12 -12
- package/build/src/cds/expressions/cds_cardinality.js +11 -11
- package/build/src/cds/expressions/cds_case.js +15 -15
- package/build/src/cds/expressions/cds_cast.js +12 -12
- package/build/src/cds/expressions/cds_composition.js +12 -12
- package/build/src/cds/expressions/cds_condition.js +18 -18
- package/build/src/cds/expressions/cds_define_abstract.js +13 -13
- package/build/src/cds/expressions/cds_define_custom.js +14 -14
- package/build/src/cds/expressions/cds_define_projection.js +12 -12
- package/build/src/cds/expressions/cds_define_view.js +15 -15
- package/build/src/cds/expressions/cds_element.js +13 -13
- package/build/src/cds/expressions/cds_function.js +33 -33
- package/build/src/cds/expressions/cds_group_by.js +12 -12
- package/build/src/cds/expressions/cds_integer.js +10 -10
- package/build/src/cds/expressions/cds_join.js +12 -12
- package/build/src/cds/expressions/cds_name.js +11 -11
- package/build/src/cds/expressions/cds_parameters.js +13 -13
- package/build/src/cds/expressions/cds_parameters_select.js +14 -14
- package/build/src/cds/expressions/cds_provider_contract.js +10 -10
- package/build/src/cds/expressions/cds_relation.js +12 -12
- package/build/src/cds/expressions/cds_select.js +13 -13
- package/build/src/cds/expressions/cds_source.js +12 -12
- package/build/src/cds/expressions/cds_string.js +10 -10
- package/build/src/cds/expressions/cds_type.js +12 -12
- package/build/src/cds/expressions/cds_where.js +11 -11
- package/build/src/cds/expressions/cds_with_parameters.js +12 -12
- package/build/src/cds/expressions/index.js +50 -50
- package/build/src/config.js +134 -134
- package/build/src/ddic.js +389 -389
- package/build/src/ddic_references.js +90 -90
- package/build/src/ddl/artifacts.js +17 -17
- package/build/src/ddl/ddl_lexer.js +32 -32
- package/build/src/ddl/ddl_parser.js +60 -60
- package/build/src/ddl/expressions/ddl_include.js +11 -11
- package/build/src/ddl/expressions/ddl_name.js +10 -10
- package/build/src/ddl/expressions/ddl_structure.js +13 -13
- package/build/src/ddl/expressions/ddl_structure_field.js +12 -12
- package/build/src/ddl/expressions/ddl_table.js +13 -13
- package/build/src/ddl/expressions/ddl_table_field.js +12 -12
- package/build/src/ddl/expressions/ddl_type.js +10 -10
- package/build/src/ddl/expressions/index.js +23 -23
- package/build/src/edit_helper.js +251 -251
- package/build/src/files/_abstract_file.js +33 -33
- package/build/src/files/_ifile.js +2 -2
- package/build/src/files/memory_file.js +17 -17
- package/build/src/index.js +101 -101
- package/build/src/issue.js +126 -126
- package/build/src/lsp/_edit.js +50 -50
- package/build/src/lsp/_interfaces.js +2 -2
- package/build/src/lsp/_lookup.js +305 -305
- package/build/src/lsp/_lsp_utils.js +75 -75
- package/build/src/lsp/code_actions.js +79 -79
- package/build/src/lsp/definition.js +29 -29
- package/build/src/lsp/diagnostics.js +60 -60
- package/build/src/lsp/dump_scope.js +94 -94
- package/build/src/lsp/help.js +225 -225
- package/build/src/lsp/highlight.js +69 -69
- package/build/src/lsp/hover.js +45 -45
- package/build/src/lsp/implementation.js +66 -66
- package/build/src/lsp/language_server.js +129 -129
- package/build/src/lsp/references.js +99 -99
- package/build/src/lsp/rename.js +77 -77
- package/build/src/lsp/semantic.js +131 -131
- package/build/src/lsp/symbols.js +92 -92
- package/build/src/objects/_abap_object.js +85 -85
- package/build/src/objects/_abstract_object.js +110 -110
- package/build/src/objects/_iobject.js +2 -2
- package/build/src/objects/_unknown_object.js +33 -33
- package/build/src/objects/activation_variant.js +20 -20
- package/build/src/objects/api_release_state.js +20 -20
- package/build/src/objects/assignment_service_to_authorization_group.js +20 -20
- package/build/src/objects/authorization_check_field.js +71 -71
- package/build/src/objects/authorization_group.js +20 -20
- package/build/src/objects/authorization_object.js +20 -20
- package/build/src/objects/authorization_object_class.js +20 -20
- package/build/src/objects/authorization_object_extension.js +20 -20
- package/build/src/objects/behavior_definition.js +20 -20
- package/build/src/objects/bsp_application.js +20 -20
- package/build/src/objects/business_add_in_implementation.js +20 -20
- package/build/src/objects/business_catalog.js +20 -20
- package/build/src/objects/business_catalog_app_assignment.js +20 -20
- package/build/src/objects/business_configuration_set.js +20 -20
- package/build/src/objects/business_function_assignment.js +20 -20
- package/build/src/objects/business_function_set_assignment.js +20 -20
- package/build/src/objects/business_object_model.js +20 -20
- package/build/src/objects/cds_metadata_extension.js +47 -47
- package/build/src/objects/change_document.js +20 -20
- package/build/src/objects/chapter_of_book_structure.js +20 -20
- package/build/src/objects/checkpoint_group.js +20 -20
- package/build/src/objects/class.js +110 -110
- package/build/src/objects/classification.js +20 -20
- package/build/src/objects/communication_scenario.js +20 -20
- package/build/src/objects/composite_enhancement_implementation.js +20 -20
- package/build/src/objects/composite_enhancement_spot.js +20 -20
- package/build/src/objects/concepts_of_package.js +21 -21
- package/build/src/objects/customer_enhancement_project.js +20 -20
- package/build/src/objects/customizing_attributes.js +20 -20
- package/build/src/objects/customizing_img_activity.js +20 -20
- package/build/src/objects/customizing_transaction.js +20 -20
- package/build/src/objects/data_control.js +20 -20
- package/build/src/objects/data_definition.js +166 -166
- package/build/src/objects/data_element.js +97 -97
- package/build/src/objects/dialog_module.js +20 -20
- package/build/src/objects/documentation.js +20 -20
- package/build/src/objects/domain.js +81 -81
- package/build/src/objects/ecatt_test_configuration.js +20 -20
- package/build/src/objects/ecatt_test_data_container.js +20 -20
- package/build/src/objects/ecatt_test_script.js +20 -20
- package/build/src/objects/enhancement_implementation.js +20 -20
- package/build/src/objects/enhancement_spot.js +47 -47
- package/build/src/objects/event_binding.js +20 -20
- package/build/src/objects/extension_index.js +20 -20
- package/build/src/objects/field_catalog.js +20 -20
- package/build/src/objects/form_object_form.js +20 -20
- package/build/src/objects/form_object_interface.js +20 -20
- package/build/src/objects/format_type.js +20 -20
- package/build/src/objects/function_group.js +163 -163
- package/build/src/objects/gateway_model.js +20 -20
- package/build/src/objects/gateway_model_metadata.js +20 -20
- package/build/src/objects/gateway_project.js +20 -20
- package/build/src/objects/gateway_service.js +20 -20
- package/build/src/objects/gateway_service_groups_metadata.js +20 -20
- package/build/src/objects/gateway_vocabulary_annotation.js +20 -20
- package/build/src/objects/general_hierarchy_storage_extrension_name.js +20 -20
- package/build/src/objects/general_storage_structure.js +20 -20
- package/build/src/objects/general_text.js +20 -20
- package/build/src/objects/http_service.js +20 -20
- package/build/src/objects/iac_binary_data.js +20 -20
- package/build/src/objects/iac_language_resource.js +20 -20
- package/build/src/objects/iac_service.js +20 -20
- package/build/src/objects/iac_template.js +20 -20
- package/build/src/objects/iam_app.js +20 -20
- package/build/src/objects/icf_service.js +58 -58
- package/build/src/objects/idoc.js +20 -20
- package/build/src/objects/idoc_extension.js +20 -20
- package/build/src/objects/inbound_service.js +20 -20
- package/build/src/objects/index.js +130 -130
- package/build/src/objects/info_object.js +20 -20
- package/build/src/objects/interface.js +78 -78
- package/build/src/objects/lock_object.js +73 -73
- package/build/src/objects/maintenance_and_transport_object.js +86 -86
- package/build/src/objects/message_class.js +62 -62
- package/build/src/objects/messaging_channel.js +20 -20
- package/build/src/objects/mime_object.js +60 -60
- package/build/src/objects/namespace.js +21 -21
- package/build/src/objects/number_range.js +54 -54
- package/build/src/objects/object_characteristic.js +20 -20
- package/build/src/objects/package.js +20 -20
- package/build/src/objects/package_interface.js +20 -20
- package/build/src/objects/parameter.js +20 -20
- package/build/src/objects/personalization_object.js +20 -20
- package/build/src/objects/program.js +42 -42
- package/build/src/objects/proxy_object.js +20 -20
- package/build/src/objects/push_channel.js +20 -20
- package/build/src/objects/rename/_object_renamer.js +2 -2
- package/build/src/objects/rename/rename_data_element.js +26 -26
- package/build/src/objects/rename/rename_domain.js +24 -24
- package/build/src/objects/rename/rename_global_class.js +54 -54
- package/build/src/objects/rename/rename_global_interface.js +46 -46
- package/build/src/objects/rename/rename_table.js +26 -26
- package/build/src/objects/rename/rename_table_type.js +26 -26
- package/build/src/objects/rename/renamer.js +121 -121
- package/build/src/objects/rename/renamer_helper.js +147 -147
- package/build/src/objects/restriction_field.js +20 -20
- package/build/src/objects/restriction_type.js +20 -20
- package/build/src/objects/rfc_service.js +20 -20
- package/build/src/objects/sapscript.js +20 -20
- package/build/src/objects/sapscript_style.js +20 -20
- package/build/src/objects/screen_variant.js +20 -20
- package/build/src/objects/search_help.js +20 -20
- package/build/src/objects/service_binding.js +20 -20
- package/build/src/objects/service_definition.js +20 -20
- package/build/src/objects/shared_memory.js +20 -20
- package/build/src/objects/smart_form.js +20 -20
- package/build/src/objects/smart_style.js +20 -20
- package/build/src/objects/switch_assignment_hierarchy.js +20 -20
- package/build/src/objects/switch_assignments.js +20 -20
- package/build/src/objects/table.js +293 -293
- package/build/src/objects/table_type.js +159 -159
- package/build/src/objects/technical_job_definition.js +20 -20
- package/build/src/objects/transaction.js +20 -20
- package/build/src/objects/transaction_variant.js +20 -20
- package/build/src/objects/transformation.js +20 -20
- package/build/src/objects/type_pool.js +27 -27
- package/build/src/objects/view.js +112 -112
- package/build/src/objects/view_cluster.js +20 -20
- package/build/src/objects/virtual_end_point.js +20 -20
- package/build/src/objects/web_dynpro_application.js +20 -20
- package/build/src/objects/web_dynpro_application_configuration.js +20 -20
- package/build/src/objects/web_dynpro_component.js +20 -20
- package/build/src/objects/web_dynpro_component_configuration.js +20 -20
- package/build/src/objects/web_mime.js +50 -50
- package/build/src/position.js +45 -45
- package/build/src/pretty_printer/fix_keyword_case.js +57 -57
- package/build/src/pretty_printer/indent.js +227 -227
- package/build/src/pretty_printer/indentation_options.js +2 -2
- package/build/src/pretty_printer/pretty_printer.js +42 -42
- package/build/src/pretty_printer/remove_sequential_blanks.js +49 -49
- package/build/src/progress.js +2 -2
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +66 -66
- package/build/src/rules/_abap_rule.js +22 -22
- package/build/src/rules/_basic_rule_config.js +13 -13
- package/build/src/rules/_irule.js +20 -20
- package/build/src/rules/_naming_rule_config.js +16 -16
- package/build/src/rules/abapdoc.js +97 -97
- package/build/src/rules/align_parameters.js +320 -320
- package/build/src/rules/allowed_object_naming.js +55 -55
- package/build/src/rules/allowed_object_types.js +57 -57
- package/build/src/rules/ambiguous_statement.js +72 -72
- package/build/src/rules/avoid_use.js +119 -119
- package/build/src/rules/begin_end_names.js +84 -84
- package/build/src/rules/begin_single_include.js +76 -76
- package/build/src/rules/call_transaction_authority_check.js +58 -58
- package/build/src/rules/cds_comment_style.js +55 -55
- package/build/src/rules/cds_legacy_view.js +60 -60
- package/build/src/rules/cds_parser_error.js +46 -46
- package/build/src/rules/chain_mainly_declarations.js +180 -180
- package/build/src/rules/change_if_to_case.js +134 -134
- package/build/src/rules/check_abstract.js +65 -65
- package/build/src/rules/check_comments.js +74 -74
- package/build/src/rules/check_ddic.js +74 -74
- package/build/src/rules/check_include.js +46 -46
- package/build/src/rules/check_subrc.js +181 -181
- package/build/src/rules/check_syntax.js +52 -52
- package/build/src/rules/check_text_elements.js +92 -92
- package/build/src/rules/check_transformation_exists.js +59 -59
- package/build/src/rules/class_attribute_names.js +111 -111
- package/build/src/rules/classic_exceptions_overlap.js +60 -60
- package/build/src/rules/cloud_types.js +76 -76
- package/build/src/rules/colon_missing_space.js +54 -54
- package/build/src/rules/commented_code.js +108 -108
- package/build/src/rules/constant_classes.js +113 -113
- package/build/src/rules/constructor_visibility_public.js +56 -56
- package/build/src/rules/contains_tab.js +66 -66
- package/build/src/rules/cyclic_oo.js +159 -159
- package/build/src/rules/cyclomatic_complexity.js +49 -49
- package/build/src/rules/dangerous_statement.js +122 -122
- package/build/src/rules/db_operation_in_loop.js +69 -69
- package/build/src/rules/definitions_top.js +172 -172
- package/build/src/rules/description_empty.js +55 -55
- package/build/src/rules/double_space.js +182 -182
- package/build/src/rules/downport.js +2568 -2546
- package/build/src/rules/empty_line_in_statement.js +81 -81
- package/build/src/rules/empty_statement.js +49 -49
- package/build/src/rules/empty_structure.js +129 -129
- package/build/src/rules/exit_or_check.js +75 -75
- package/build/src/rules/expand_macros.js +75 -75
- package/build/src/rules/exporting.js +82 -82
- package/build/src/rules/forbidden_identifier.js +80 -80
- package/build/src/rules/forbidden_pseudo_and_pragma.js +131 -131
- package/build/src/rules/forbidden_void_type.js +101 -101
- package/build/src/rules/form_tables_obsolete.js +50 -50
- package/build/src/rules/fully_type_constants.js +66 -66
- package/build/src/rules/function_module_recommendations.js +89 -89
- package/build/src/rules/functional_writing.js +111 -111
- package/build/src/rules/global_class.js +73 -73
- package/build/src/rules/identical_conditions.js +132 -132
- package/build/src/rules/identical_contents.js +98 -98
- package/build/src/rules/identical_descriptions.js +91 -91
- package/build/src/rules/identical_form_names.js +55 -55
- package/build/src/rules/if_in_if.js +94 -94
- package/build/src/rules/implement_methods.js +247 -247
- package/build/src/rules/in_statement_indentation.js +105 -105
- package/build/src/rules/indentation.js +121 -121
- package/build/src/rules/index.js +168 -168
- package/build/src/rules/inline_data_old_versions.js +62 -62
- package/build/src/rules/intf_referencing_clas.js +77 -77
- package/build/src/rules/keep_single_parameter_on_one_line.js +152 -152
- package/build/src/rules/keyword_case.js +258 -258
- package/build/src/rules/line_break_multiple_parameters.js +74 -74
- package/build/src/rules/line_break_style.js +49 -49
- package/build/src/rules/line_length.js +55 -55
- package/build/src/rules/line_only_punc.js +83 -83
- package/build/src/rules/local_class_naming.js +78 -78
- package/build/src/rules/local_testclass_consistency.js +62 -62
- package/build/src/rules/local_variable_names.js +143 -143
- package/build/src/rules/main_file_contents.js +101 -101
- package/build/src/rules/many_parentheses.js +159 -159
- package/build/src/rules/max_one_method_parameter_per_line.js +54 -54
- package/build/src/rules/max_one_statement.js +66 -66
- package/build/src/rules/message_exists.js +86 -86
- package/build/src/rules/method_implemented_twice.js +74 -74
- package/build/src/rules/method_length.js +95 -95
- package/build/src/rules/method_overwrites_builtin.js +48 -48
- package/build/src/rules/method_parameter_names.js +117 -117
- package/build/src/rules/mix_returning.js +57 -57
- package/build/src/rules/modify_only_own_db_tables.js +91 -91
- package/build/src/rules/msag_consistency.js +57 -57
- package/build/src/rules/names_no_dash.js +88 -88
- package/build/src/rules/nesting.js +73 -73
- package/build/src/rules/newline_between_methods.js +89 -89
- package/build/src/rules/no_aliases.js +48 -48
- package/build/src/rules/no_chained_assignment.js +50 -50
- package/build/src/rules/no_external_form_calls.js +48 -48
- package/build/src/rules/no_inline_in_optional_branches.js +66 -66
- package/build/src/rules/no_public_attributes.js +92 -92
- package/build/src/rules/no_yoda_conditions.js +99 -99
- package/build/src/rules/nrob_consistency.js +57 -57
- package/build/src/rules/object_naming.js +151 -151
- package/build/src/rules/obsolete_statement.js +389 -389
- package/build/src/rules/omit_parameter_name.js +118 -118
- package/build/src/rules/omit_preceding_zeros.js +53 -53
- package/build/src/rules/omit_receiving.js +55 -55
- package/build/src/rules/parser_702_chaining.js +68 -68
- package/build/src/rules/parser_error.js +71 -71
- package/build/src/rules/parser_missing_space.js +233 -233
- package/build/src/rules/pragma_style.js +73 -73
- package/build/src/rules/prefer_corresponding.js +48 -48
- package/build/src/rules/prefer_inline.js +207 -207
- package/build/src/rules/prefer_is_not.js +93 -93
- package/build/src/rules/prefer_raise_exception_new.js +69 -69
- package/build/src/rules/prefer_returning_to_exporting.js +84 -84
- package/build/src/rules/prefer_xsdbool.js +54 -54
- package/build/src/rules/preferred_compare_operator.js +91 -91
- package/build/src/rules/prefix_is_current_class.js +112 -112
- package/build/src/rules/reduce_string_templates.js +81 -81
- package/build/src/rules/release_idoc.js +57 -57
- package/build/src/rules/remove_descriptions.js +117 -117
- package/build/src/rules/rfc_error_handling.js +70 -70
- package/build/src/rules/select_add_order_by.js +96 -96
- package/build/src/rules/select_performance.js +115 -115
- package/build/src/rules/selection_screen_naming.js +105 -105
- package/build/src/rules/sequential_blank.js +73 -73
- package/build/src/rules/short_case.js +69 -69
- package/build/src/rules/sicf_consistency.js +102 -102
- package/build/src/rules/slow_parameter_passing.js +87 -87
- package/build/src/rules/space_before_colon.js +60 -60
- package/build/src/rules/space_before_dot.js +91 -91
- package/build/src/rules/sql_escape_host_variables.js +89 -89
- package/build/src/rules/start_at_tab.js +73 -73
- package/build/src/rules/static_call_via_instance.js +79 -79
- package/build/src/rules/superclass_final.js +74 -74
- package/build/src/rules/superfluous_value.js +72 -72
- package/build/src/rules/sy_modification.js +54 -54
- package/build/src/rules/tabl_enhancement_category.js +48 -48
- package/build/src/rules/try_without_catch.js +53 -53
- package/build/src/rules/type_form_parameters.js +53 -53
- package/build/src/rules/types_naming.js +80 -80
- package/build/src/rules/uncaught_exception.js +222 -222
- package/build/src/rules/unknown_types.js +159 -159
- package/build/src/rules/unnecessary_chaining.js +71 -71
- package/build/src/rules/unnecessary_pragma.js +126 -126
- package/build/src/rules/unnecessary_return.js +57 -57
- package/build/src/rules/unreachable_code.js +110 -110
- package/build/src/rules/unsecure_fae.js +57 -57
- package/build/src/rules/unused_ddic.js +54 -54
- package/build/src/rules/unused_methods.js +180 -180
- package/build/src/rules/unused_types.js +177 -177
- package/build/src/rules/unused_variables.js +244 -244
- package/build/src/rules/use_bool_expression.js +112 -112
- package/build/src/rules/use_class_based_exceptions.js +47 -47
- package/build/src/rules/use_line_exists.js +100 -100
- package/build/src/rules/use_new.js +88 -88
- package/build/src/rules/when_others_last.js +60 -60
- package/build/src/rules/whitespace_end.js +51 -51
- package/build/src/rules/xml_consistency.js +81 -81
- package/build/src/rules_runner.js +106 -106
- package/build/src/severity.js +9 -9
- package/build/src/skip_logic.js +149 -149
- package/build/src/utils/_include_graph.js +2 -2
- package/build/src/utils/cyclomatic_complexity_stats.js +46 -46
- package/build/src/utils/excludeHelper.js +14 -14
- package/build/src/utils/form_length_stats.js +57 -57
- package/build/src/utils/include_graph.js +198 -198
- package/build/src/utils/method_length_stats.js +57 -57
- package/build/src/utils/name_validator.js +19 -19
- package/build/src/version.js +37 -37
- package/build/src/xml_utils.js +27 -27
- package/package.json +3 -3
|
@@ -1,881 +1,881 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BasicTypes = void 0;
|
|
4
|
-
/* eslint-disable default-case */
|
|
5
|
-
const _typed_identifier_1 = require("../types/_typed_identifier");
|
|
6
|
-
const Expressions = require("../2_statements/expressions");
|
|
7
|
-
const Statements = require("../2_statements/statements");
|
|
8
|
-
const Types = require("../types/basic");
|
|
9
|
-
const _scope_type_1 = require("./_scope_type");
|
|
10
|
-
const _object_oriented_1 = require("./_object_oriented");
|
|
11
|
-
const class_constant_1 = require("../types/class_constant");
|
|
12
|
-
const identifier_1 = require("../1_lexer/tokens/identifier");
|
|
13
|
-
const _reference_1 = require("./_reference");
|
|
14
|
-
const basic_1 = require("../types/basic");
|
|
15
|
-
const field_chain_1 = require("./expressions/field_chain");
|
|
16
|
-
const types_1 = require("../types");
|
|
17
|
-
const expressions_1 = require("../2_statements/expressions");
|
|
18
|
-
const _builtin_1 = require("./_builtin");
|
|
19
|
-
const position_1 = require("../../position");
|
|
20
|
-
class BasicTypes {
|
|
21
|
-
constructor(filename, scope) {
|
|
22
|
-
this.filename = filename;
|
|
23
|
-
this.scope = scope;
|
|
24
|
-
}
|
|
25
|
-
lookupQualifiedName(name) {
|
|
26
|
-
var _a;
|
|
27
|
-
// argh, todo, rewrite this entire method, more argh
|
|
28
|
-
if (name === undefined) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
const found = this.scope.findType(name);
|
|
32
|
-
if (found) {
|
|
33
|
-
return found;
|
|
34
|
-
}
|
|
35
|
-
if (name.includes("=>")) {
|
|
36
|
-
const split = name.split("=>");
|
|
37
|
-
const ooName = split[0];
|
|
38
|
-
const typeName = split[1];
|
|
39
|
-
const oo = this.scope.findObjectDefinition(ooName);
|
|
40
|
-
if (oo) {
|
|
41
|
-
if (typeName.includes("-")) {
|
|
42
|
-
const split = typeName.split("-");
|
|
43
|
-
const subTypeName = split[0];
|
|
44
|
-
const fieldName = split[1];
|
|
45
|
-
const stru = oo.getTypeDefinitions().getByName(subTypeName);
|
|
46
|
-
const struType = stru === null || stru === void 0 ? void 0 : stru.getType();
|
|
47
|
-
if (stru && struType instanceof basic_1.StructureType) {
|
|
48
|
-
const f = struType.getComponentByName(fieldName);
|
|
49
|
-
if (f) {
|
|
50
|
-
return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
const f = oo.getTypeDefinitions().getByName(typeName);
|
|
56
|
-
if (f) {
|
|
57
|
-
return f;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
else if (name.includes("-")) {
|
|
63
|
-
const split = name.split("-");
|
|
64
|
-
const typeName = split[0];
|
|
65
|
-
const fieldName = split[1];
|
|
66
|
-
const type = this.scope.findType(typeName);
|
|
67
|
-
if (type) {
|
|
68
|
-
const stru = type.getType();
|
|
69
|
-
if (stru instanceof basic_1.StructureType) {
|
|
70
|
-
const f = stru.getComponentByName(fieldName);
|
|
71
|
-
if (f) {
|
|
72
|
-
return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const lookup = this.scope.getDDIC().lookupNoVoid(name);
|
|
78
|
-
const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();
|
|
79
|
-
if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {
|
|
80
|
-
return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);
|
|
81
|
-
}
|
|
82
|
-
const builtin = this.scope.getDDIC().lookupBuiltinType(name);
|
|
83
|
-
if (builtin) {
|
|
84
|
-
return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);
|
|
85
|
-
}
|
|
86
|
-
const type = this.scope.findTypePoolType(name);
|
|
87
|
-
if (type) {
|
|
88
|
-
return type;
|
|
89
|
-
}
|
|
90
|
-
return undefined;
|
|
91
|
-
}
|
|
92
|
-
resolveLikeName(node, headerLogic = true) {
|
|
93
|
-
var _a;
|
|
94
|
-
if (node === undefined) {
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
let chain = node.findFirstExpression(Expressions.FieldChain);
|
|
98
|
-
if (chain === undefined) {
|
|
99
|
-
chain = node.findFirstExpression(Expressions.TypeName);
|
|
100
|
-
}
|
|
101
|
-
if (chain === undefined) {
|
|
102
|
-
chain = node.findFirstExpression(Expressions.FieldSub);
|
|
103
|
-
}
|
|
104
|
-
if (chain === undefined) {
|
|
105
|
-
chain = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
106
|
-
}
|
|
107
|
-
if (chain === undefined) {
|
|
108
|
-
throw new Error("resolveLikeName, chain undefined");
|
|
109
|
-
}
|
|
110
|
-
const fullName = chain.concatTokens();
|
|
111
|
-
const children = [...chain.getChildren()];
|
|
112
|
-
if (children.length === 0) {
|
|
113
|
-
return new Types.UnknownType("Type error, could not resolve \"" + fullName + "\", resolveLikeName1");
|
|
114
|
-
}
|
|
115
|
-
let type = undefined;
|
|
116
|
-
if (children[1] && (children[1].getFirstToken().getStr() === "=>" || children[1].getFirstToken().getStr() === "->")) {
|
|
117
|
-
type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
const name = children.shift().getFirstToken().getStr();
|
|
121
|
-
let found = this.scope.findVariable(name);
|
|
122
|
-
type = found === null || found === void 0 ? void 0 : found.getType();
|
|
123
|
-
if (found === undefined) {
|
|
124
|
-
found = this.scope.findExtraLikeType(name);
|
|
125
|
-
type = found === null || found === void 0 ? void 0 : found.getType();
|
|
126
|
-
}
|
|
127
|
-
if (found) {
|
|
128
|
-
this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
129
|
-
}
|
|
130
|
-
if (type === undefined) {
|
|
131
|
-
type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
|
|
132
|
-
}
|
|
133
|
-
if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {
|
|
134
|
-
this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
135
|
-
return new Types.VoidType(name);
|
|
136
|
-
}
|
|
137
|
-
while (children.length > 0) {
|
|
138
|
-
const child = children.shift();
|
|
139
|
-
if (child.getFirstToken().getStr() === "-") {
|
|
140
|
-
if (type instanceof Types.VoidType) {
|
|
141
|
-
return type;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
else if (child.concatTokens() === "[]") {
|
|
145
|
-
if (type instanceof Types.TableType) {
|
|
146
|
-
type = new basic_1.TableType(type.getRowType(), { withHeader: false });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
else { // field name
|
|
150
|
-
let sub = undefined;
|
|
151
|
-
if (type instanceof Types.TableType) {
|
|
152
|
-
type = type.getRowType();
|
|
153
|
-
}
|
|
154
|
-
if (type instanceof Types.StructureType) {
|
|
155
|
-
sub = type.getComponentByName(child.getFirstToken().getStr());
|
|
156
|
-
}
|
|
157
|
-
if (sub === undefined) {
|
|
158
|
-
return new Types.UnknownType("Type error, field not part of structure " + fullName);
|
|
159
|
-
}
|
|
160
|
-
type = sub;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (type instanceof Types.VoidType) {
|
|
164
|
-
return type;
|
|
165
|
-
}
|
|
166
|
-
else if (type instanceof basic_1.TableType
|
|
167
|
-
&& type.isWithHeader()
|
|
168
|
-
&& headerLogic === true) {
|
|
169
|
-
type = type.getRowType();
|
|
170
|
-
}
|
|
171
|
-
else if (type instanceof Types.TableType
|
|
172
|
-
&& type.isWithHeader() === true
|
|
173
|
-
&& type.getRowType() instanceof Types.VoidType) {
|
|
174
|
-
return type.getRowType();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
if (!type) {
|
|
178
|
-
return new Types.UnknownType("Type error, could not resolve \"" + fullName + "\", resolveLikeName2");
|
|
179
|
-
}
|
|
180
|
-
return type;
|
|
181
|
-
}
|
|
182
|
-
cloneType(type, qualifiedName) {
|
|
183
|
-
// nested types(containing "-") will inherit the qualified names if possible
|
|
184
|
-
// todo, this needs to be extended to all AbstractTypes instead of just CharacterType
|
|
185
|
-
if (type instanceof basic_1.CharacterType
|
|
186
|
-
&& qualifiedName
|
|
187
|
-
&& qualifiedName.includes("-") === false) {
|
|
188
|
-
type = type.cloneType(qualifiedName);
|
|
189
|
-
}
|
|
190
|
-
return type;
|
|
191
|
-
}
|
|
192
|
-
resolveTypeName(typeName, length, decimals, qualifiedName) {
|
|
193
|
-
var _a;
|
|
194
|
-
if (typeName === undefined) {
|
|
195
|
-
return undefined;
|
|
196
|
-
}
|
|
197
|
-
const chain = this.resolveTypeChain(typeName);
|
|
198
|
-
if (chain) {
|
|
199
|
-
return this.cloneType(chain, qualifiedName);
|
|
200
|
-
}
|
|
201
|
-
const chainText = typeName.concatTokens().toUpperCase();
|
|
202
|
-
const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);
|
|
203
|
-
if (f !== undefined) {
|
|
204
|
-
return f;
|
|
205
|
-
}
|
|
206
|
-
const typ = this.scope.findType(chainText);
|
|
207
|
-
if (typ) {
|
|
208
|
-
const token = typeName.getFirstToken();
|
|
209
|
-
if (chainText.includes("~")) {
|
|
210
|
-
const name = chainText.split("~")[0];
|
|
211
|
-
const idef = this.scope.findInterfaceDefinition(name);
|
|
212
|
-
if (idef) {
|
|
213
|
-
this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: "INTF", ooName: name });
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
217
|
-
return typ.getType();
|
|
218
|
-
}
|
|
219
|
-
const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();
|
|
220
|
-
if (type) {
|
|
221
|
-
// this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);
|
|
222
|
-
return type;
|
|
223
|
-
}
|
|
224
|
-
const ddic = this.scope.getDDIC().lookup(chainText);
|
|
225
|
-
if (ddic) {
|
|
226
|
-
this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });
|
|
227
|
-
if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {
|
|
228
|
-
this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
229
|
-
}
|
|
230
|
-
else if (ddic.type instanceof basic_1.VoidType) {
|
|
231
|
-
this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
232
|
-
}
|
|
233
|
-
return this.cloneType(ddic.type, qualifiedName);
|
|
234
|
-
}
|
|
235
|
-
return undefined;
|
|
236
|
-
}
|
|
237
|
-
simpleType(node, qualifiedNamePrefix) {
|
|
238
|
-
let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
239
|
-
if (nameExpr === undefined) {
|
|
240
|
-
nameExpr = node.findFirstExpression(Expressions.DefinitionName);
|
|
241
|
-
}
|
|
242
|
-
if (nameExpr === undefined) {
|
|
243
|
-
return undefined;
|
|
244
|
-
}
|
|
245
|
-
let name = nameExpr.getFirstToken();
|
|
246
|
-
if (nameExpr.countTokens() > 1) { // workaround for names with dashes
|
|
247
|
-
name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());
|
|
248
|
-
}
|
|
249
|
-
let qualifiedName = undefined;
|
|
250
|
-
if (node.get() instanceof Statements.Type) {
|
|
251
|
-
if (this.scope.isTypePool() === true) {
|
|
252
|
-
qualifiedName = name.getStr();
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
qualifiedName = (qualifiedNamePrefix || "") + name.getStr();
|
|
256
|
-
if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition
|
|
257
|
-
|| this.scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
258
|
-
qualifiedName = this.scope.getName() + "=>" + qualifiedName;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
else if (qualifiedNamePrefix) {
|
|
263
|
-
qualifiedName = qualifiedNamePrefix + qualifiedName;
|
|
264
|
-
}
|
|
265
|
-
const found = this.parseType(node, qualifiedName);
|
|
266
|
-
if (found) {
|
|
267
|
-
return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);
|
|
268
|
-
}
|
|
269
|
-
return undefined;
|
|
270
|
-
}
|
|
271
|
-
parseTable(node, name) {
|
|
272
|
-
var _a, _b, _c;
|
|
273
|
-
const typename = node.findFirstExpression(Expressions.TypeName);
|
|
274
|
-
const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
275
|
-
if (text === undefined) {
|
|
276
|
-
return undefined;
|
|
277
|
-
}
|
|
278
|
-
let type = undefined;
|
|
279
|
-
if (text.startsWith("TYPE STANDARD TABLE ") || text.startsWith("LIKE STANDARD TABLE ")) {
|
|
280
|
-
type = basic_1.TableAccessType.standard;
|
|
281
|
-
}
|
|
282
|
-
else if (text.startsWith("TYPE SORTED TABLE ") || text.startsWith("LIKE SORTED TABLE ")) {
|
|
283
|
-
type = basic_1.TableAccessType.sorted;
|
|
284
|
-
}
|
|
285
|
-
else if (text.startsWith("TYPE HASHED TABLE ") || text.startsWith("LIKE HASHED TABLE ")) {
|
|
286
|
-
type = basic_1.TableAccessType.hashed;
|
|
287
|
-
}
|
|
288
|
-
const typeTableKeys = node.findAllExpressions(expressions_1.TypeTableKey);
|
|
289
|
-
const firstKey = typeTableKeys[0];
|
|
290
|
-
const isNamed = (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpression(expressions_1.Field)) !== undefined;
|
|
291
|
-
const primaryKey = {
|
|
292
|
-
name: "primary_key",
|
|
293
|
-
type: type,
|
|
294
|
-
isUnique: isNamed ? false : (firstKey === null || firstKey === void 0 ? void 0 : firstKey.concatTokens().toUpperCase().includes("WITH UNIQUE ")) === true,
|
|
295
|
-
keyFields: [],
|
|
296
|
-
};
|
|
297
|
-
let start = 1;
|
|
298
|
-
if (isNamed === false) {
|
|
299
|
-
for (const k of (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpressions(expressions_1.FieldSub)) || []) {
|
|
300
|
-
primaryKey.keyFields.push(k.concatTokens().toUpperCase());
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
start = 0;
|
|
305
|
-
}
|
|
306
|
-
const secondaryKeys = [];
|
|
307
|
-
for (let i = start; i < typeTableKeys.length; i++) {
|
|
308
|
-
const row = typeTableKeys[i];
|
|
309
|
-
const name = (_b = row.findDirectExpression(expressions_1.Field)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
310
|
-
if (name === undefined) {
|
|
311
|
-
continue;
|
|
312
|
-
}
|
|
313
|
-
const secondary = {
|
|
314
|
-
name: name,
|
|
315
|
-
type: row.findDirectTokenByText("SORTED") ? basic_1.TableAccessType.sorted : basic_1.TableAccessType.hashed,
|
|
316
|
-
isUnique: (row === null || row === void 0 ? void 0 : row.concatTokens().toUpperCase().includes("WITH UNIQUE ")) === true,
|
|
317
|
-
keyFields: [],
|
|
318
|
-
};
|
|
319
|
-
for (const k of (row === null || row === void 0 ? void 0 : row.findDirectExpressions(expressions_1.FieldSub)) || []) {
|
|
320
|
-
secondary.keyFields.push(k.concatTokens().toUpperCase());
|
|
321
|
-
}
|
|
322
|
-
secondaryKeys.push(secondary);
|
|
323
|
-
}
|
|
324
|
-
const options = {
|
|
325
|
-
withHeader: text.includes(" WITH HEADER LINE"),
|
|
326
|
-
primaryKey: primaryKey,
|
|
327
|
-
secondary: secondaryKeys,
|
|
328
|
-
};
|
|
329
|
-
let found = undefined;
|
|
330
|
-
if (text.startsWith("TYPE TABLE OF REF TO ")
|
|
331
|
-
|| text.startsWith("TYPE STANDARD TABLE OF REF TO ")
|
|
332
|
-
|| text.startsWith("TYPE SORTED TABLE OF REF TO ")
|
|
333
|
-
|| text.startsWith("TYPE HASHED TABLE OF REF TO ")) {
|
|
334
|
-
found = this.resolveTypeRef(typename);
|
|
335
|
-
if (found) {
|
|
336
|
-
return new Types.TableType(found, options, name);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
else if (text.startsWith("TYPE TABLE OF ")
|
|
340
|
-
|| text.startsWith("TYPE STANDARD TABLE OF ")
|
|
341
|
-
|| text.startsWith("TYPE SORTED TABLE OF ")
|
|
342
|
-
|| text.startsWith("TYPE HASHED TABLE OF ")) {
|
|
343
|
-
found = this.resolveTypeName(typename);
|
|
344
|
-
if (found) {
|
|
345
|
-
return new Types.TableType(found, options, name);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
else if (text.startsWith("LIKE TABLE OF ")
|
|
349
|
-
|| text.startsWith("LIKE STANDARD TABLE OF ")
|
|
350
|
-
|| text.startsWith("LIKE SORTED TABLE OF ")
|
|
351
|
-
|| text.startsWith("LIKE HASHED TABLE OF ")) {
|
|
352
|
-
found = this.resolveLikeName(node);
|
|
353
|
-
if (found) {
|
|
354
|
-
return new Types.TableType(found, options, name);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
else if (text === "TYPE STANDARD TABLE"
|
|
358
|
-
|| text === "TYPE SORTED TABLE"
|
|
359
|
-
|| text === "TYPE HASHED TABLE"
|
|
360
|
-
|| text === "TYPE INDEX TABLE"
|
|
361
|
-
|| text === "TYPE ANY TABLE") {
|
|
362
|
-
return new Types.TableType(new Types.AnyType(), options);
|
|
363
|
-
}
|
|
364
|
-
else if (text.startsWith("TYPE RANGE OF ")) {
|
|
365
|
-
const sub = node.findFirstExpression(Expressions.TypeName);
|
|
366
|
-
found = this.resolveTypeName(sub);
|
|
367
|
-
if (found === undefined) {
|
|
368
|
-
return new Types.UnknownType("TYPE RANGE OF, could not resolve type");
|
|
369
|
-
}
|
|
370
|
-
const structure = new Types.StructureType([
|
|
371
|
-
{ name: "sign", type: new Types.CharacterType(1) },
|
|
372
|
-
{ name: "option", type: new Types.CharacterType(2) },
|
|
373
|
-
{ name: "low", type: found },
|
|
374
|
-
{ name: "high", type: found },
|
|
375
|
-
]);
|
|
376
|
-
return new Types.TableType(structure, options, name);
|
|
377
|
-
}
|
|
378
|
-
else if (text.startsWith("LIKE RANGE OF ")) {
|
|
379
|
-
const sub = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
380
|
-
found = this.resolveLikeName(sub);
|
|
381
|
-
if (found === undefined) {
|
|
382
|
-
return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
|
|
383
|
-
}
|
|
384
|
-
const structure = new Types.StructureType([
|
|
385
|
-
{ name: "sign", type: new Types.CharacterType(1) },
|
|
386
|
-
{ name: "option", type: new Types.CharacterType(2) },
|
|
387
|
-
{ name: "low", type: found },
|
|
388
|
-
{ name: "high", type: found },
|
|
389
|
-
], name);
|
|
390
|
-
return new Types.TableType(structure, options);
|
|
391
|
-
}
|
|
392
|
-
else if (typename && (text.startsWith("TYPE TABLE FOR CREATE ")
|
|
393
|
-
|| text.startsWith("TYPE TABLE FOR UPDATE "))) {
|
|
394
|
-
const name = typename.concatTokens();
|
|
395
|
-
const type = (_c = this.scope.getDDIC().lookupDDLS(name)) === null || _c === void 0 ? void 0 : _c.type;
|
|
396
|
-
if (type) {
|
|
397
|
-
return new Types.TableType(new basic_1.VoidType("RapTodo"), options);
|
|
398
|
-
}
|
|
399
|
-
else if (this.scope.getDDIC().inErrorNamespace(name)) {
|
|
400
|
-
return new Types.UnknownType(`DDLS ${name} not found`);
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
return new Types.VoidType(name);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
// fallback to old style syntax, OCCURS etc
|
|
407
|
-
return this.parseType(node, name);
|
|
408
|
-
}
|
|
409
|
-
parseType(node, qualifiedName) {
|
|
410
|
-
var _a, _b, _c, _d, _e, _f;
|
|
411
|
-
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
412
|
-
let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
413
|
-
if (text === undefined) {
|
|
414
|
-
text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
|
|
415
|
-
}
|
|
416
|
-
if (text === undefined) {
|
|
417
|
-
text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
|
|
418
|
-
if ((text === null || text === void 0 ? void 0 : text.startsWith("TYPE")) === false && (text === null || text === void 0 ? void 0 : text.startsWith("LIKE")) === false) {
|
|
419
|
-
text = "TYPE";
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
if (text === undefined) {
|
|
423
|
-
text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();
|
|
424
|
-
}
|
|
425
|
-
if (text === undefined
|
|
426
|
-
&& node.get() instanceof Statements.Parameter
|
|
427
|
-
&& node.findDirectTokenByText("LIKE")) {
|
|
428
|
-
text = "LIKE " + (typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens());
|
|
429
|
-
}
|
|
430
|
-
if (text === undefined) {
|
|
431
|
-
text = "TYPE";
|
|
432
|
-
}
|
|
433
|
-
let found = undefined;
|
|
434
|
-
if (text.startsWith("LIKE LINE OF ")) {
|
|
435
|
-
const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();
|
|
436
|
-
let e = node.findFirstExpression(Expressions.Type);
|
|
437
|
-
if (e === undefined) {
|
|
438
|
-
e = node.findFirstExpression(Expressions.FormParamType);
|
|
439
|
-
}
|
|
440
|
-
if (e === undefined) {
|
|
441
|
-
e = node.findFirstExpression(Expressions.FieldChain);
|
|
442
|
-
}
|
|
443
|
-
const type = this.resolveLikeName(e, false);
|
|
444
|
-
if (type === undefined) {
|
|
445
|
-
return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
|
|
446
|
-
}
|
|
447
|
-
else if (type instanceof Types.TableType) {
|
|
448
|
-
return type.getRowType();
|
|
449
|
-
}
|
|
450
|
-
else if (type instanceof Types.VoidType) {
|
|
451
|
-
return type;
|
|
452
|
-
}
|
|
453
|
-
else {
|
|
454
|
-
return new Types.UnknownType("Type error, not a table type " + name);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
else if (text.startsWith("LIKE REF TO ")) {
|
|
458
|
-
const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();
|
|
459
|
-
const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);
|
|
460
|
-
if (type === undefined) {
|
|
461
|
-
return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
|
|
462
|
-
}
|
|
463
|
-
return new Types.DataReference(type, name);
|
|
464
|
-
}
|
|
465
|
-
else if (text === "TYPE STANDARD TABLE"
|
|
466
|
-
|| text === "TYPE SORTED TABLE"
|
|
467
|
-
|| text === "TYPE HASHED TABLE"
|
|
468
|
-
|| text === "TYPE INDEX TABLE"
|
|
469
|
-
|| text === "TYPE ANY TABLE") {
|
|
470
|
-
return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes("WITH HEADER LINE") });
|
|
471
|
-
}
|
|
472
|
-
else if (text.startsWith("LIKE ")) {
|
|
473
|
-
let sub = node.findFirstExpression(Expressions.Type);
|
|
474
|
-
if (sub === undefined) {
|
|
475
|
-
sub = node.findFirstExpression(Expressions.FormParamType);
|
|
476
|
-
}
|
|
477
|
-
if (sub === undefined) {
|
|
478
|
-
sub = node.findFirstExpression(Expressions.TypeParam);
|
|
479
|
-
}
|
|
480
|
-
if (sub === undefined) {
|
|
481
|
-
sub = node.findFirstExpression(Expressions.FieldChain);
|
|
482
|
-
}
|
|
483
|
-
if (sub === undefined) {
|
|
484
|
-
sub = node.findFirstExpression(Expressions.TypeName);
|
|
485
|
-
}
|
|
486
|
-
found = this.resolveLikeName(sub);
|
|
487
|
-
if (found && this.isOccurs(node)) {
|
|
488
|
-
found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE") }, qualifiedName);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
else if (text.startsWith("TYPE LINE OF ")) {
|
|
492
|
-
const sub = node.findFirstExpression(Expressions.TypeName);
|
|
493
|
-
found = this.resolveTypeName(sub);
|
|
494
|
-
if (found instanceof _typed_identifier_1.TypedIdentifier) {
|
|
495
|
-
found = found.getType();
|
|
496
|
-
}
|
|
497
|
-
if (found instanceof Types.TableType) {
|
|
498
|
-
return found.getRowType();
|
|
499
|
-
}
|
|
500
|
-
else if (found instanceof Types.VoidType) {
|
|
501
|
-
return found;
|
|
502
|
-
}
|
|
503
|
-
else if (found instanceof Types.UnknownType) {
|
|
504
|
-
return new Types.UnknownType("TYPE LINE OF, unknown type, " + found.getError());
|
|
505
|
-
}
|
|
506
|
-
else {
|
|
507
|
-
return new Types.UnknownType("TYPE LINE OF, unexpected type, " + (found === null || found === void 0 ? void 0 : found.constructor.name));
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
else if (text.startsWith("TYPE REF TO ")) {
|
|
511
|
-
found = this.resolveTypeRef(typeName);
|
|
512
|
-
}
|
|
513
|
-
else if (text.startsWith("TYPE")) {
|
|
514
|
-
found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);
|
|
515
|
-
const concat = node.concatTokens().toUpperCase();
|
|
516
|
-
if (found && this.isOccurs(node)) {
|
|
517
|
-
found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE") }, qualifiedName);
|
|
518
|
-
}
|
|
519
|
-
else if (found && concat.includes(" WITH HEADER LINE")) {
|
|
520
|
-
if (found instanceof Types.VoidType) {
|
|
521
|
-
found = new Types.TableType(found, { withHeader: true });
|
|
522
|
-
}
|
|
523
|
-
else if (!(found instanceof Types.TableType)) {
|
|
524
|
-
throw new Error("WITH HEADER LINE can only be used with internal table");
|
|
525
|
-
}
|
|
526
|
-
else {
|
|
527
|
-
found = new Types.TableType(found.getRowType(), { withHeader: true });
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
if (found === undefined && typeName === undefined) {
|
|
531
|
-
let length = 1;
|
|
532
|
-
const len = node.findDirectExpression(Expressions.ConstantFieldLength);
|
|
533
|
-
if (len) {
|
|
534
|
-
const int = len.findDirectExpression(Expressions.Integer);
|
|
535
|
-
if (int) {
|
|
536
|
-
length = parseInt(int.concatTokens(), 10);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
found = new Types.CharacterType(length, { qualifiedName: qualifiedName }); // fallback
|
|
540
|
-
if (this.isOccurs(node)) {
|
|
541
|
-
found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE") }, qualifiedName);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
return found;
|
|
546
|
-
}
|
|
547
|
-
/////////////////////
|
|
548
|
-
isOccurs(node) {
|
|
549
|
-
var _a;
|
|
550
|
-
if (node.findDirectTokenByText("OCCURS")) {
|
|
551
|
-
return true;
|
|
552
|
-
}
|
|
553
|
-
else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText("OCCURS")) {
|
|
554
|
-
return true;
|
|
555
|
-
}
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
// todo, rewrite this method
|
|
559
|
-
resolveTypeChain(expr) {
|
|
560
|
-
var _a;
|
|
561
|
-
const chainText = expr.concatTokens().toUpperCase();
|
|
562
|
-
if (chainText.includes("=>") === false && chainText.includes("-") === false) {
|
|
563
|
-
return undefined;
|
|
564
|
-
}
|
|
565
|
-
let className;
|
|
566
|
-
let rest = chainText;
|
|
567
|
-
if (chainText.includes("=>")) {
|
|
568
|
-
const split = chainText.split("=>");
|
|
569
|
-
className = split[0];
|
|
570
|
-
rest = split[1];
|
|
571
|
-
}
|
|
572
|
-
else if (chainText.includes("->")) {
|
|
573
|
-
const split = chainText.split("->");
|
|
574
|
-
className = split[0];
|
|
575
|
-
rest = split[1];
|
|
576
|
-
}
|
|
577
|
-
const subs = rest.split("-");
|
|
578
|
-
let foundType = undefined;
|
|
579
|
-
if (className && chainText.includes("=>")) {
|
|
580
|
-
const split = chainText.split("=>");
|
|
581
|
-
const className = split[0];
|
|
582
|
-
// the prefix might be itself
|
|
583
|
-
if ((this.scope.getType() === _scope_type_1.ScopeType.Interface
|
|
584
|
-
|| this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)
|
|
585
|
-
&& this.scope.getName().toUpperCase() === className.toUpperCase()) {
|
|
586
|
-
const foundId = this.scope.findType(subs[0]);
|
|
587
|
-
foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();
|
|
588
|
-
if (foundType === undefined) {
|
|
589
|
-
return new Types.UnknownType("Could not resolve type " + chainText);
|
|
590
|
-
}
|
|
591
|
-
this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
// lookup in local and global scope
|
|
595
|
-
const obj = this.scope.findObjectDefinition(className);
|
|
596
|
-
if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {
|
|
597
|
-
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });
|
|
598
|
-
return new Types.VoidType(className);
|
|
599
|
-
}
|
|
600
|
-
else if (obj === undefined) {
|
|
601
|
-
return new Types.UnknownType("Could not resolve top " + className + ", resolveTypeChain");
|
|
602
|
-
}
|
|
603
|
-
const type = obj instanceof types_1.ClassDefinition ? "CLAS" : "INTF";
|
|
604
|
-
this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });
|
|
605
|
-
const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);
|
|
606
|
-
foundType = byName === null || byName === void 0 ? void 0 : byName.getType();
|
|
607
|
-
if (byName === undefined || foundType === undefined) {
|
|
608
|
-
return new Types.UnknownType(subs[0] + " not found in class or interface");
|
|
609
|
-
}
|
|
610
|
-
this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
else if (className && chainText.includes("->")) {
|
|
614
|
-
const varVar = this.scope.findVariable(className);
|
|
615
|
-
const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();
|
|
616
|
-
if (foo instanceof basic_1.ObjectReferenceType) {
|
|
617
|
-
const typeName = subs[0];
|
|
618
|
-
let id = foo.getIdentifier();
|
|
619
|
-
if (!(id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition)) {
|
|
620
|
-
const found = this.scope.findObjectDefinition(foo.getIdentifierName());
|
|
621
|
-
if (found) {
|
|
622
|
-
id = found;
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
return new Types.UnknownType(foo.getIdentifierName() + " not found in scope");
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
if (id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition) {
|
|
629
|
-
const type = id instanceof types_1.ClassDefinition ? "CLAS" : "INTF";
|
|
630
|
-
this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });
|
|
631
|
-
const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);
|
|
632
|
-
foundType = byName === null || byName === void 0 ? void 0 : byName.getType();
|
|
633
|
-
if (byName === undefined || foundType === undefined) {
|
|
634
|
-
return new Types.UnknownType(typeName + " not found in class or interface");
|
|
635
|
-
}
|
|
636
|
-
this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
637
|
-
}
|
|
638
|
-
else {
|
|
639
|
-
return new Types.UnknownType("Not an object reference, " + className + ", " + id.constructor.name);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
else if (foo === undefined) {
|
|
643
|
-
return new Types.UnknownType(className + " not found in scope");
|
|
644
|
-
}
|
|
645
|
-
else {
|
|
646
|
-
return new Types.UnknownType("Not an object reference, " + className + ", " + foo.constructor.name);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
const found = this.scope.findType(subs[0]);
|
|
651
|
-
foundType = found === null || found === void 0 ? void 0 : found.getType();
|
|
652
|
-
if (foundType === undefined) {
|
|
653
|
-
const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();
|
|
654
|
-
if (typePoolType) {
|
|
655
|
-
// this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);
|
|
656
|
-
foundType = typePoolType;
|
|
657
|
-
}
|
|
658
|
-
if (foundType === undefined) {
|
|
659
|
-
const f = this.scope.getDDIC().lookupTableOrView(subs[0]);
|
|
660
|
-
this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });
|
|
661
|
-
if (f.type instanceof _typed_identifier_1.TypedIdentifier) {
|
|
662
|
-
foundType = f.type.getType();
|
|
663
|
-
}
|
|
664
|
-
else {
|
|
665
|
-
foundType = f.type;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
else {
|
|
670
|
-
this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
671
|
-
}
|
|
672
|
-
if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {
|
|
673
|
-
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
674
|
-
return new Types.VoidType(subs[0]);
|
|
675
|
-
}
|
|
676
|
-
else if (foundType instanceof Types.VoidType) {
|
|
677
|
-
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
678
|
-
return foundType;
|
|
679
|
-
}
|
|
680
|
-
else if (foundType === undefined) {
|
|
681
|
-
return new Types.UnknownType("Unknown type " + subs[0]);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
subs.shift();
|
|
685
|
-
while (subs.length > 0) {
|
|
686
|
-
if (foundType instanceof Types.UnknownType
|
|
687
|
-
|| foundType instanceof Types.VoidType) {
|
|
688
|
-
return foundType;
|
|
689
|
-
}
|
|
690
|
-
else if (!(foundType instanceof Types.StructureType)) {
|
|
691
|
-
return new Types.UnknownType("Not a structured type");
|
|
692
|
-
}
|
|
693
|
-
foundType = foundType.getComponentByName(subs[0]);
|
|
694
|
-
if (foundType === undefined) {
|
|
695
|
-
return new Types.UnknownType(`Field "${subs[0]}" not found in structure`);
|
|
696
|
-
}
|
|
697
|
-
subs.shift();
|
|
698
|
-
}
|
|
699
|
-
return foundType;
|
|
700
|
-
}
|
|
701
|
-
resolveConstantValue(expr) {
|
|
702
|
-
var _a, _b;
|
|
703
|
-
// todo: rewrite this method
|
|
704
|
-
if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {
|
|
705
|
-
throw new Error("resolveConstantValue");
|
|
706
|
-
}
|
|
707
|
-
const firstNode = expr.getFirstChild();
|
|
708
|
-
const firstToken = firstNode.getFirstToken();
|
|
709
|
-
const firstName = firstToken.getStr();
|
|
710
|
-
if (firstNode.get() instanceof Expressions.Field) {
|
|
711
|
-
const found = this.scope.findVariable(firstName);
|
|
712
|
-
const val = found === null || found === void 0 ? void 0 : found.getValue();
|
|
713
|
-
if (typeof val === "string") {
|
|
714
|
-
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
715
|
-
return val;
|
|
716
|
-
}
|
|
717
|
-
else if ((found === null || found === void 0 ? void 0 : found.getType()) instanceof basic_1.StructureType) {
|
|
718
|
-
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
719
|
-
}
|
|
720
|
-
return undefined;
|
|
721
|
-
}
|
|
722
|
-
else if (firstNode.get() instanceof Expressions.ClassName
|
|
723
|
-
&& firstName.toLowerCase() === this.scope.getName().toLowerCase()
|
|
724
|
-
&& (this.scope.getType() === _scope_type_1.ScopeType.Interface
|
|
725
|
-
|| this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {
|
|
726
|
-
const children = expr.getChildren();
|
|
727
|
-
const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
728
|
-
const found = this.scope.findVariable(token.getStr());
|
|
729
|
-
const val = found === null || found === void 0 ? void 0 : found.getValue();
|
|
730
|
-
if (typeof val === "string") {
|
|
731
|
-
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
732
|
-
return val;
|
|
733
|
-
}
|
|
734
|
-
return undefined;
|
|
735
|
-
}
|
|
736
|
-
else if (firstNode.get() instanceof Expressions.ClassName) {
|
|
737
|
-
const obj = this.scope.findObjectDefinition(firstName);
|
|
738
|
-
if (obj === undefined) {
|
|
739
|
-
if (this.scope.existsObject(firstName).found === true) {
|
|
740
|
-
return undefined;
|
|
741
|
-
}
|
|
742
|
-
else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {
|
|
743
|
-
throw new Error("resolveConstantValue, not found: " + firstName);
|
|
744
|
-
}
|
|
745
|
-
else {
|
|
746
|
-
this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });
|
|
747
|
-
return undefined;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
const children = expr.getChildren();
|
|
751
|
-
const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();
|
|
752
|
-
const attr = token.getStr();
|
|
753
|
-
const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);
|
|
754
|
-
if (c instanceof class_constant_1.ClassConstant) {
|
|
755
|
-
this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
756
|
-
const val = c.getValue();
|
|
757
|
-
if (typeof val === "string") {
|
|
758
|
-
return val;
|
|
759
|
-
}
|
|
760
|
-
else if (typeof val === "object" && children[4]) {
|
|
761
|
-
const name = children[4].getFirstToken().getStr();
|
|
762
|
-
if (val[name] !== undefined) {
|
|
763
|
-
return val[name];
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
return undefined;
|
|
767
|
-
}
|
|
768
|
-
throw new Error("resolveConstantValue, constant not found " + attr);
|
|
769
|
-
}
|
|
770
|
-
else {
|
|
771
|
-
throw new Error("resolveConstantValue, unexpected structure");
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
resolveTypeRef(chain) {
|
|
775
|
-
var _a;
|
|
776
|
-
if (chain === undefined) {
|
|
777
|
-
return undefined;
|
|
778
|
-
}
|
|
779
|
-
const name = chain.getFirstToken().getStr();
|
|
780
|
-
if (chain.getAllTokens().length === 1) {
|
|
781
|
-
if (name.toUpperCase() === "OBJECT") {
|
|
782
|
-
return new Types.GenericObjectReferenceType();
|
|
783
|
-
}
|
|
784
|
-
const search = this.scope.existsObject(name);
|
|
785
|
-
if (search.found === true && search.id) {
|
|
786
|
-
this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });
|
|
787
|
-
return new Types.ObjectReferenceType(search.id, name);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
const found = this.resolveTypeName(chain);
|
|
791
|
-
if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {
|
|
792
|
-
return new Types.DataReference(found);
|
|
793
|
-
}
|
|
794
|
-
else if (chain.concatTokens().toUpperCase() === "DATA") {
|
|
795
|
-
return new Types.DataReference(new Types.AnyType());
|
|
796
|
-
}
|
|
797
|
-
if (this.scope.isBadiDef(name) === true) {
|
|
798
|
-
return new Types.VoidType(name);
|
|
799
|
-
}
|
|
800
|
-
if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {
|
|
801
|
-
// this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);
|
|
802
|
-
return new Types.VoidType(name);
|
|
803
|
-
}
|
|
804
|
-
return new Types.UnknownType("REF, unable to resolve " + name);
|
|
805
|
-
}
|
|
806
|
-
findValue(node) {
|
|
807
|
-
const val = node.findFirstExpression(Expressions.Value);
|
|
808
|
-
if (val === undefined) {
|
|
809
|
-
throw new Error("VALUE missing in expression");
|
|
810
|
-
}
|
|
811
|
-
if (val.concatTokens().toUpperCase() === "VALUE IS INITIAL") {
|
|
812
|
-
return undefined;
|
|
813
|
-
}
|
|
814
|
-
const constant = val.findFirstExpression(Expressions.Constant);
|
|
815
|
-
if (constant) {
|
|
816
|
-
return constant.concatTokens();
|
|
817
|
-
}
|
|
818
|
-
const chain = val.findFirstExpression(Expressions.SimpleFieldChain);
|
|
819
|
-
if (chain) {
|
|
820
|
-
return this.resolveConstantValue(chain);
|
|
821
|
-
}
|
|
822
|
-
throw new Error("findValue, unexpected");
|
|
823
|
-
}
|
|
824
|
-
findDecimals(node) {
|
|
825
|
-
var _a, _b;
|
|
826
|
-
const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
827
|
-
if (dec) {
|
|
828
|
-
return parseInt(dec, 10);
|
|
829
|
-
}
|
|
830
|
-
return undefined;
|
|
831
|
-
}
|
|
832
|
-
findLength(node) {
|
|
833
|
-
const val = node.findFirstExpression(Expressions.Length);
|
|
834
|
-
const flen = node.findFirstExpression(Expressions.ConstantFieldLength);
|
|
835
|
-
if (val && flen) {
|
|
836
|
-
throw new Error("Only specify length once");
|
|
837
|
-
}
|
|
838
|
-
if (flen) {
|
|
839
|
-
const cintExpr = flen.findFirstExpression(Expressions.Integer);
|
|
840
|
-
if (cintExpr) {
|
|
841
|
-
return this.parseInt(cintExpr.concatTokens());
|
|
842
|
-
}
|
|
843
|
-
const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);
|
|
844
|
-
if (cchain) {
|
|
845
|
-
const val = this.resolveConstantValue(cchain);
|
|
846
|
-
return this.parseInt(val);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
if (val === undefined) {
|
|
850
|
-
return 1;
|
|
851
|
-
}
|
|
852
|
-
const intExpr = val.findFirstExpression(Expressions.Integer);
|
|
853
|
-
if (intExpr) {
|
|
854
|
-
return this.parseInt(intExpr.concatTokens());
|
|
855
|
-
}
|
|
856
|
-
const strExpr = val.findFirstExpression(Expressions.ConstantString);
|
|
857
|
-
if (strExpr) {
|
|
858
|
-
return this.parseInt(strExpr.concatTokens());
|
|
859
|
-
}
|
|
860
|
-
const chain = val.findFirstExpression(Expressions.SimpleFieldChain);
|
|
861
|
-
if (chain) {
|
|
862
|
-
const val = this.resolveConstantValue(chain);
|
|
863
|
-
return this.parseInt(val);
|
|
864
|
-
}
|
|
865
|
-
throw new Error("Unexpected, findLength");
|
|
866
|
-
}
|
|
867
|
-
parseInt(text) {
|
|
868
|
-
if (text === undefined) {
|
|
869
|
-
return undefined;
|
|
870
|
-
}
|
|
871
|
-
if (text.startsWith("'")) {
|
|
872
|
-
text = text.split("'")[1];
|
|
873
|
-
}
|
|
874
|
-
else if (text.startsWith("`")) {
|
|
875
|
-
text = text.split("`")[1];
|
|
876
|
-
}
|
|
877
|
-
return parseInt(text, 10);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
exports.BasicTypes = BasicTypes;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasicTypes = void 0;
|
|
4
|
+
/* eslint-disable default-case */
|
|
5
|
+
const _typed_identifier_1 = require("../types/_typed_identifier");
|
|
6
|
+
const Expressions = require("../2_statements/expressions");
|
|
7
|
+
const Statements = require("../2_statements/statements");
|
|
8
|
+
const Types = require("../types/basic");
|
|
9
|
+
const _scope_type_1 = require("./_scope_type");
|
|
10
|
+
const _object_oriented_1 = require("./_object_oriented");
|
|
11
|
+
const class_constant_1 = require("../types/class_constant");
|
|
12
|
+
const identifier_1 = require("../1_lexer/tokens/identifier");
|
|
13
|
+
const _reference_1 = require("./_reference");
|
|
14
|
+
const basic_1 = require("../types/basic");
|
|
15
|
+
const field_chain_1 = require("./expressions/field_chain");
|
|
16
|
+
const types_1 = require("../types");
|
|
17
|
+
const expressions_1 = require("../2_statements/expressions");
|
|
18
|
+
const _builtin_1 = require("./_builtin");
|
|
19
|
+
const position_1 = require("../../position");
|
|
20
|
+
class BasicTypes {
|
|
21
|
+
constructor(filename, scope) {
|
|
22
|
+
this.filename = filename;
|
|
23
|
+
this.scope = scope;
|
|
24
|
+
}
|
|
25
|
+
lookupQualifiedName(name) {
|
|
26
|
+
var _a;
|
|
27
|
+
// argh, todo, rewrite this entire method, more argh
|
|
28
|
+
if (name === undefined) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const found = this.scope.findType(name);
|
|
32
|
+
if (found) {
|
|
33
|
+
return found;
|
|
34
|
+
}
|
|
35
|
+
if (name.includes("=>")) {
|
|
36
|
+
const split = name.split("=>");
|
|
37
|
+
const ooName = split[0];
|
|
38
|
+
const typeName = split[1];
|
|
39
|
+
const oo = this.scope.findObjectDefinition(ooName);
|
|
40
|
+
if (oo) {
|
|
41
|
+
if (typeName.includes("-")) {
|
|
42
|
+
const split = typeName.split("-");
|
|
43
|
+
const subTypeName = split[0];
|
|
44
|
+
const fieldName = split[1];
|
|
45
|
+
const stru = oo.getTypeDefinitions().getByName(subTypeName);
|
|
46
|
+
const struType = stru === null || stru === void 0 ? void 0 : stru.getType();
|
|
47
|
+
if (stru && struType instanceof basic_1.StructureType) {
|
|
48
|
+
const f = struType.getComponentByName(fieldName);
|
|
49
|
+
if (f) {
|
|
50
|
+
return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const f = oo.getTypeDefinitions().getByName(typeName);
|
|
56
|
+
if (f) {
|
|
57
|
+
return f;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else if (name.includes("-")) {
|
|
63
|
+
const split = name.split("-");
|
|
64
|
+
const typeName = split[0];
|
|
65
|
+
const fieldName = split[1];
|
|
66
|
+
const type = this.scope.findType(typeName);
|
|
67
|
+
if (type) {
|
|
68
|
+
const stru = type.getType();
|
|
69
|
+
if (stru instanceof basic_1.StructureType) {
|
|
70
|
+
const f = stru.getComponentByName(fieldName);
|
|
71
|
+
if (f) {
|
|
72
|
+
return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const lookup = this.scope.getDDIC().lookupNoVoid(name);
|
|
78
|
+
const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();
|
|
79
|
+
if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {
|
|
80
|
+
return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);
|
|
81
|
+
}
|
|
82
|
+
const builtin = this.scope.getDDIC().lookupBuiltinType(name);
|
|
83
|
+
if (builtin) {
|
|
84
|
+
return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);
|
|
85
|
+
}
|
|
86
|
+
const type = this.scope.findTypePoolType(name);
|
|
87
|
+
if (type) {
|
|
88
|
+
return type;
|
|
89
|
+
}
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
resolveLikeName(node, headerLogic = true) {
|
|
93
|
+
var _a;
|
|
94
|
+
if (node === undefined) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
let chain = node.findFirstExpression(Expressions.FieldChain);
|
|
98
|
+
if (chain === undefined) {
|
|
99
|
+
chain = node.findFirstExpression(Expressions.TypeName);
|
|
100
|
+
}
|
|
101
|
+
if (chain === undefined) {
|
|
102
|
+
chain = node.findFirstExpression(Expressions.FieldSub);
|
|
103
|
+
}
|
|
104
|
+
if (chain === undefined) {
|
|
105
|
+
chain = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
106
|
+
}
|
|
107
|
+
if (chain === undefined) {
|
|
108
|
+
throw new Error("resolveLikeName, chain undefined");
|
|
109
|
+
}
|
|
110
|
+
const fullName = chain.concatTokens();
|
|
111
|
+
const children = [...chain.getChildren()];
|
|
112
|
+
if (children.length === 0) {
|
|
113
|
+
return new Types.UnknownType("Type error, could not resolve \"" + fullName + "\", resolveLikeName1");
|
|
114
|
+
}
|
|
115
|
+
let type = undefined;
|
|
116
|
+
if (children[1] && (children[1].getFirstToken().getStr() === "=>" || children[1].getFirstToken().getStr() === "->")) {
|
|
117
|
+
type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
const name = children.shift().getFirstToken().getStr();
|
|
121
|
+
let found = this.scope.findVariable(name);
|
|
122
|
+
type = found === null || found === void 0 ? void 0 : found.getType();
|
|
123
|
+
if (found === undefined) {
|
|
124
|
+
found = this.scope.findExtraLikeType(name);
|
|
125
|
+
type = found === null || found === void 0 ? void 0 : found.getType();
|
|
126
|
+
}
|
|
127
|
+
if (found) {
|
|
128
|
+
this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
129
|
+
}
|
|
130
|
+
if (type === undefined) {
|
|
131
|
+
type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
|
|
132
|
+
}
|
|
133
|
+
if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {
|
|
134
|
+
this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
135
|
+
return new Types.VoidType(name);
|
|
136
|
+
}
|
|
137
|
+
while (children.length > 0) {
|
|
138
|
+
const child = children.shift();
|
|
139
|
+
if (child.getFirstToken().getStr() === "-") {
|
|
140
|
+
if (type instanceof Types.VoidType) {
|
|
141
|
+
return type;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else if (child.concatTokens() === "[]") {
|
|
145
|
+
if (type instanceof Types.TableType) {
|
|
146
|
+
type = new basic_1.TableType(type.getRowType(), { withHeader: false });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else { // field name
|
|
150
|
+
let sub = undefined;
|
|
151
|
+
if (type instanceof Types.TableType) {
|
|
152
|
+
type = type.getRowType();
|
|
153
|
+
}
|
|
154
|
+
if (type instanceof Types.StructureType) {
|
|
155
|
+
sub = type.getComponentByName(child.getFirstToken().getStr());
|
|
156
|
+
}
|
|
157
|
+
if (sub === undefined) {
|
|
158
|
+
return new Types.UnknownType("Type error, field not part of structure " + fullName);
|
|
159
|
+
}
|
|
160
|
+
type = sub;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (type instanceof Types.VoidType) {
|
|
164
|
+
return type;
|
|
165
|
+
}
|
|
166
|
+
else if (type instanceof basic_1.TableType
|
|
167
|
+
&& type.isWithHeader()
|
|
168
|
+
&& headerLogic === true) {
|
|
169
|
+
type = type.getRowType();
|
|
170
|
+
}
|
|
171
|
+
else if (type instanceof Types.TableType
|
|
172
|
+
&& type.isWithHeader() === true
|
|
173
|
+
&& type.getRowType() instanceof Types.VoidType) {
|
|
174
|
+
return type.getRowType();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (!type) {
|
|
178
|
+
return new Types.UnknownType("Type error, could not resolve \"" + fullName + "\", resolveLikeName2");
|
|
179
|
+
}
|
|
180
|
+
return type;
|
|
181
|
+
}
|
|
182
|
+
cloneType(type, qualifiedName) {
|
|
183
|
+
// nested types(containing "-") will inherit the qualified names if possible
|
|
184
|
+
// todo, this needs to be extended to all AbstractTypes instead of just CharacterType
|
|
185
|
+
if (type instanceof basic_1.CharacterType
|
|
186
|
+
&& qualifiedName
|
|
187
|
+
&& qualifiedName.includes("-") === false) {
|
|
188
|
+
type = type.cloneType(qualifiedName);
|
|
189
|
+
}
|
|
190
|
+
return type;
|
|
191
|
+
}
|
|
192
|
+
resolveTypeName(typeName, length, decimals, qualifiedName) {
|
|
193
|
+
var _a;
|
|
194
|
+
if (typeName === undefined) {
|
|
195
|
+
return undefined;
|
|
196
|
+
}
|
|
197
|
+
const chain = this.resolveTypeChain(typeName);
|
|
198
|
+
if (chain) {
|
|
199
|
+
return this.cloneType(chain, qualifiedName);
|
|
200
|
+
}
|
|
201
|
+
const chainText = typeName.concatTokens().toUpperCase();
|
|
202
|
+
const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);
|
|
203
|
+
if (f !== undefined) {
|
|
204
|
+
return f;
|
|
205
|
+
}
|
|
206
|
+
const typ = this.scope.findType(chainText);
|
|
207
|
+
if (typ) {
|
|
208
|
+
const token = typeName.getFirstToken();
|
|
209
|
+
if (chainText.includes("~")) {
|
|
210
|
+
const name = chainText.split("~")[0];
|
|
211
|
+
const idef = this.scope.findInterfaceDefinition(name);
|
|
212
|
+
if (idef) {
|
|
213
|
+
this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: "INTF", ooName: name });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
217
|
+
return typ.getType();
|
|
218
|
+
}
|
|
219
|
+
const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();
|
|
220
|
+
if (type) {
|
|
221
|
+
// this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);
|
|
222
|
+
return type;
|
|
223
|
+
}
|
|
224
|
+
const ddic = this.scope.getDDIC().lookup(chainText);
|
|
225
|
+
if (ddic) {
|
|
226
|
+
this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });
|
|
227
|
+
if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {
|
|
228
|
+
this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
229
|
+
}
|
|
230
|
+
else if (ddic.type instanceof basic_1.VoidType) {
|
|
231
|
+
this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
232
|
+
}
|
|
233
|
+
return this.cloneType(ddic.type, qualifiedName);
|
|
234
|
+
}
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
simpleType(node, qualifiedNamePrefix) {
|
|
238
|
+
let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
239
|
+
if (nameExpr === undefined) {
|
|
240
|
+
nameExpr = node.findFirstExpression(Expressions.DefinitionName);
|
|
241
|
+
}
|
|
242
|
+
if (nameExpr === undefined) {
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
let name = nameExpr.getFirstToken();
|
|
246
|
+
if (nameExpr.countTokens() > 1) { // workaround for names with dashes
|
|
247
|
+
name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());
|
|
248
|
+
}
|
|
249
|
+
let qualifiedName = undefined;
|
|
250
|
+
if (node.get() instanceof Statements.Type) {
|
|
251
|
+
if (this.scope.isTypePool() === true) {
|
|
252
|
+
qualifiedName = name.getStr();
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
qualifiedName = (qualifiedNamePrefix || "") + name.getStr();
|
|
256
|
+
if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition
|
|
257
|
+
|| this.scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
258
|
+
qualifiedName = this.scope.getName() + "=>" + qualifiedName;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else if (qualifiedNamePrefix) {
|
|
263
|
+
qualifiedName = qualifiedNamePrefix + qualifiedName;
|
|
264
|
+
}
|
|
265
|
+
const found = this.parseType(node, qualifiedName);
|
|
266
|
+
if (found) {
|
|
267
|
+
return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);
|
|
268
|
+
}
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
parseTable(node, name) {
|
|
272
|
+
var _a, _b, _c;
|
|
273
|
+
const typename = node.findFirstExpression(Expressions.TypeName);
|
|
274
|
+
const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
275
|
+
if (text === undefined) {
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
let type = undefined;
|
|
279
|
+
if (text.startsWith("TYPE STANDARD TABLE ") || text.startsWith("LIKE STANDARD TABLE ")) {
|
|
280
|
+
type = basic_1.TableAccessType.standard;
|
|
281
|
+
}
|
|
282
|
+
else if (text.startsWith("TYPE SORTED TABLE ") || text.startsWith("LIKE SORTED TABLE ")) {
|
|
283
|
+
type = basic_1.TableAccessType.sorted;
|
|
284
|
+
}
|
|
285
|
+
else if (text.startsWith("TYPE HASHED TABLE ") || text.startsWith("LIKE HASHED TABLE ")) {
|
|
286
|
+
type = basic_1.TableAccessType.hashed;
|
|
287
|
+
}
|
|
288
|
+
const typeTableKeys = node.findAllExpressions(expressions_1.TypeTableKey);
|
|
289
|
+
const firstKey = typeTableKeys[0];
|
|
290
|
+
const isNamed = (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpression(expressions_1.Field)) !== undefined;
|
|
291
|
+
const primaryKey = {
|
|
292
|
+
name: "primary_key",
|
|
293
|
+
type: type,
|
|
294
|
+
isUnique: isNamed ? false : (firstKey === null || firstKey === void 0 ? void 0 : firstKey.concatTokens().toUpperCase().includes("WITH UNIQUE ")) === true,
|
|
295
|
+
keyFields: [],
|
|
296
|
+
};
|
|
297
|
+
let start = 1;
|
|
298
|
+
if (isNamed === false) {
|
|
299
|
+
for (const k of (firstKey === null || firstKey === void 0 ? void 0 : firstKey.findDirectExpressions(expressions_1.FieldSub)) || []) {
|
|
300
|
+
primaryKey.keyFields.push(k.concatTokens().toUpperCase());
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
start = 0;
|
|
305
|
+
}
|
|
306
|
+
const secondaryKeys = [];
|
|
307
|
+
for (let i = start; i < typeTableKeys.length; i++) {
|
|
308
|
+
const row = typeTableKeys[i];
|
|
309
|
+
const name = (_b = row.findDirectExpression(expressions_1.Field)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
310
|
+
if (name === undefined) {
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
const secondary = {
|
|
314
|
+
name: name,
|
|
315
|
+
type: row.findDirectTokenByText("SORTED") ? basic_1.TableAccessType.sorted : basic_1.TableAccessType.hashed,
|
|
316
|
+
isUnique: (row === null || row === void 0 ? void 0 : row.concatTokens().toUpperCase().includes("WITH UNIQUE ")) === true,
|
|
317
|
+
keyFields: [],
|
|
318
|
+
};
|
|
319
|
+
for (const k of (row === null || row === void 0 ? void 0 : row.findDirectExpressions(expressions_1.FieldSub)) || []) {
|
|
320
|
+
secondary.keyFields.push(k.concatTokens().toUpperCase());
|
|
321
|
+
}
|
|
322
|
+
secondaryKeys.push(secondary);
|
|
323
|
+
}
|
|
324
|
+
const options = {
|
|
325
|
+
withHeader: text.includes(" WITH HEADER LINE"),
|
|
326
|
+
primaryKey: primaryKey,
|
|
327
|
+
secondary: secondaryKeys,
|
|
328
|
+
};
|
|
329
|
+
let found = undefined;
|
|
330
|
+
if (text.startsWith("TYPE TABLE OF REF TO ")
|
|
331
|
+
|| text.startsWith("TYPE STANDARD TABLE OF REF TO ")
|
|
332
|
+
|| text.startsWith("TYPE SORTED TABLE OF REF TO ")
|
|
333
|
+
|| text.startsWith("TYPE HASHED TABLE OF REF TO ")) {
|
|
334
|
+
found = this.resolveTypeRef(typename);
|
|
335
|
+
if (found) {
|
|
336
|
+
return new Types.TableType(found, options, name);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
else if (text.startsWith("TYPE TABLE OF ")
|
|
340
|
+
|| text.startsWith("TYPE STANDARD TABLE OF ")
|
|
341
|
+
|| text.startsWith("TYPE SORTED TABLE OF ")
|
|
342
|
+
|| text.startsWith("TYPE HASHED TABLE OF ")) {
|
|
343
|
+
found = this.resolveTypeName(typename);
|
|
344
|
+
if (found) {
|
|
345
|
+
return new Types.TableType(found, options, name);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
else if (text.startsWith("LIKE TABLE OF ")
|
|
349
|
+
|| text.startsWith("LIKE STANDARD TABLE OF ")
|
|
350
|
+
|| text.startsWith("LIKE SORTED TABLE OF ")
|
|
351
|
+
|| text.startsWith("LIKE HASHED TABLE OF ")) {
|
|
352
|
+
found = this.resolveLikeName(node);
|
|
353
|
+
if (found) {
|
|
354
|
+
return new Types.TableType(found, options, name);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
else if (text === "TYPE STANDARD TABLE"
|
|
358
|
+
|| text === "TYPE SORTED TABLE"
|
|
359
|
+
|| text === "TYPE HASHED TABLE"
|
|
360
|
+
|| text === "TYPE INDEX TABLE"
|
|
361
|
+
|| text === "TYPE ANY TABLE") {
|
|
362
|
+
return new Types.TableType(new Types.AnyType(), options);
|
|
363
|
+
}
|
|
364
|
+
else if (text.startsWith("TYPE RANGE OF ")) {
|
|
365
|
+
const sub = node.findFirstExpression(Expressions.TypeName);
|
|
366
|
+
found = this.resolveTypeName(sub);
|
|
367
|
+
if (found === undefined) {
|
|
368
|
+
return new Types.UnknownType("TYPE RANGE OF, could not resolve type");
|
|
369
|
+
}
|
|
370
|
+
const structure = new Types.StructureType([
|
|
371
|
+
{ name: "sign", type: new Types.CharacterType(1) },
|
|
372
|
+
{ name: "option", type: new Types.CharacterType(2) },
|
|
373
|
+
{ name: "low", type: found },
|
|
374
|
+
{ name: "high", type: found },
|
|
375
|
+
]);
|
|
376
|
+
return new Types.TableType(structure, options, name);
|
|
377
|
+
}
|
|
378
|
+
else if (text.startsWith("LIKE RANGE OF ")) {
|
|
379
|
+
const sub = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
380
|
+
found = this.resolveLikeName(sub);
|
|
381
|
+
if (found === undefined) {
|
|
382
|
+
return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
|
|
383
|
+
}
|
|
384
|
+
const structure = new Types.StructureType([
|
|
385
|
+
{ name: "sign", type: new Types.CharacterType(1) },
|
|
386
|
+
{ name: "option", type: new Types.CharacterType(2) },
|
|
387
|
+
{ name: "low", type: found },
|
|
388
|
+
{ name: "high", type: found },
|
|
389
|
+
], name);
|
|
390
|
+
return new Types.TableType(structure, options);
|
|
391
|
+
}
|
|
392
|
+
else if (typename && (text.startsWith("TYPE TABLE FOR CREATE ")
|
|
393
|
+
|| text.startsWith("TYPE TABLE FOR UPDATE "))) {
|
|
394
|
+
const name = typename.concatTokens();
|
|
395
|
+
const type = (_c = this.scope.getDDIC().lookupDDLS(name)) === null || _c === void 0 ? void 0 : _c.type;
|
|
396
|
+
if (type) {
|
|
397
|
+
return new Types.TableType(new basic_1.VoidType("RapTodo"), options);
|
|
398
|
+
}
|
|
399
|
+
else if (this.scope.getDDIC().inErrorNamespace(name)) {
|
|
400
|
+
return new Types.UnknownType(`DDLS ${name} not found`);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
return new Types.VoidType(name);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
// fallback to old style syntax, OCCURS etc
|
|
407
|
+
return this.parseType(node, name);
|
|
408
|
+
}
|
|
409
|
+
parseType(node, qualifiedName) {
|
|
410
|
+
var _a, _b, _c, _d, _e, _f;
|
|
411
|
+
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
412
|
+
let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
413
|
+
if (text === undefined) {
|
|
414
|
+
text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
|
|
415
|
+
}
|
|
416
|
+
if (text === undefined) {
|
|
417
|
+
text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
|
|
418
|
+
if ((text === null || text === void 0 ? void 0 : text.startsWith("TYPE")) === false && (text === null || text === void 0 ? void 0 : text.startsWith("LIKE")) === false) {
|
|
419
|
+
text = "TYPE";
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (text === undefined) {
|
|
423
|
+
text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();
|
|
424
|
+
}
|
|
425
|
+
if (text === undefined
|
|
426
|
+
&& node.get() instanceof Statements.Parameter
|
|
427
|
+
&& node.findDirectTokenByText("LIKE")) {
|
|
428
|
+
text = "LIKE " + (typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens());
|
|
429
|
+
}
|
|
430
|
+
if (text === undefined) {
|
|
431
|
+
text = "TYPE";
|
|
432
|
+
}
|
|
433
|
+
let found = undefined;
|
|
434
|
+
if (text.startsWith("LIKE LINE OF ")) {
|
|
435
|
+
const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();
|
|
436
|
+
let e = node.findFirstExpression(Expressions.Type);
|
|
437
|
+
if (e === undefined) {
|
|
438
|
+
e = node.findFirstExpression(Expressions.FormParamType);
|
|
439
|
+
}
|
|
440
|
+
if (e === undefined) {
|
|
441
|
+
e = node.findFirstExpression(Expressions.FieldChain);
|
|
442
|
+
}
|
|
443
|
+
const type = this.resolveLikeName(e, false);
|
|
444
|
+
if (type === undefined) {
|
|
445
|
+
return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
|
|
446
|
+
}
|
|
447
|
+
else if (type instanceof Types.TableType) {
|
|
448
|
+
return type.getRowType();
|
|
449
|
+
}
|
|
450
|
+
else if (type instanceof Types.VoidType) {
|
|
451
|
+
return type;
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
return new Types.UnknownType("Type error, not a table type " + name);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
else if (text.startsWith("LIKE REF TO ")) {
|
|
458
|
+
const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();
|
|
459
|
+
const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);
|
|
460
|
+
if (type === undefined) {
|
|
461
|
+
return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
|
|
462
|
+
}
|
|
463
|
+
return new Types.DataReference(type, name);
|
|
464
|
+
}
|
|
465
|
+
else if (text === "TYPE STANDARD TABLE"
|
|
466
|
+
|| text === "TYPE SORTED TABLE"
|
|
467
|
+
|| text === "TYPE HASHED TABLE"
|
|
468
|
+
|| text === "TYPE INDEX TABLE"
|
|
469
|
+
|| text === "TYPE ANY TABLE") {
|
|
470
|
+
return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes("WITH HEADER LINE") });
|
|
471
|
+
}
|
|
472
|
+
else if (text.startsWith("LIKE ")) {
|
|
473
|
+
let sub = node.findFirstExpression(Expressions.Type);
|
|
474
|
+
if (sub === undefined) {
|
|
475
|
+
sub = node.findFirstExpression(Expressions.FormParamType);
|
|
476
|
+
}
|
|
477
|
+
if (sub === undefined) {
|
|
478
|
+
sub = node.findFirstExpression(Expressions.TypeParam);
|
|
479
|
+
}
|
|
480
|
+
if (sub === undefined) {
|
|
481
|
+
sub = node.findFirstExpression(Expressions.FieldChain);
|
|
482
|
+
}
|
|
483
|
+
if (sub === undefined) {
|
|
484
|
+
sub = node.findFirstExpression(Expressions.TypeName);
|
|
485
|
+
}
|
|
486
|
+
found = this.resolveLikeName(sub);
|
|
487
|
+
if (found && this.isOccurs(node)) {
|
|
488
|
+
found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE") }, qualifiedName);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
else if (text.startsWith("TYPE LINE OF ")) {
|
|
492
|
+
const sub = node.findFirstExpression(Expressions.TypeName);
|
|
493
|
+
found = this.resolveTypeName(sub);
|
|
494
|
+
if (found instanceof _typed_identifier_1.TypedIdentifier) {
|
|
495
|
+
found = found.getType();
|
|
496
|
+
}
|
|
497
|
+
if (found instanceof Types.TableType) {
|
|
498
|
+
return found.getRowType();
|
|
499
|
+
}
|
|
500
|
+
else if (found instanceof Types.VoidType) {
|
|
501
|
+
return found;
|
|
502
|
+
}
|
|
503
|
+
else if (found instanceof Types.UnknownType) {
|
|
504
|
+
return new Types.UnknownType("TYPE LINE OF, unknown type, " + found.getError());
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
return new Types.UnknownType("TYPE LINE OF, unexpected type, " + (found === null || found === void 0 ? void 0 : found.constructor.name));
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
else if (text.startsWith("TYPE REF TO ")) {
|
|
511
|
+
found = this.resolveTypeRef(typeName);
|
|
512
|
+
}
|
|
513
|
+
else if (text.startsWith("TYPE")) {
|
|
514
|
+
found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);
|
|
515
|
+
const concat = node.concatTokens().toUpperCase();
|
|
516
|
+
if (found && this.isOccurs(node)) {
|
|
517
|
+
found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE") }, qualifiedName);
|
|
518
|
+
}
|
|
519
|
+
else if (found && concat.includes(" WITH HEADER LINE")) {
|
|
520
|
+
if (found instanceof Types.VoidType) {
|
|
521
|
+
found = new Types.TableType(found, { withHeader: true });
|
|
522
|
+
}
|
|
523
|
+
else if (!(found instanceof Types.TableType)) {
|
|
524
|
+
throw new Error("WITH HEADER LINE can only be used with internal table");
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
found = new Types.TableType(found.getRowType(), { withHeader: true });
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
if (found === undefined && typeName === undefined) {
|
|
531
|
+
let length = 1;
|
|
532
|
+
const len = node.findDirectExpression(Expressions.ConstantFieldLength);
|
|
533
|
+
if (len) {
|
|
534
|
+
const int = len.findDirectExpression(Expressions.Integer);
|
|
535
|
+
if (int) {
|
|
536
|
+
length = parseInt(int.concatTokens(), 10);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
found = new Types.CharacterType(length, { qualifiedName: qualifiedName }); // fallback
|
|
540
|
+
if (this.isOccurs(node)) {
|
|
541
|
+
found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE") }, qualifiedName);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return found;
|
|
546
|
+
}
|
|
547
|
+
/////////////////////
|
|
548
|
+
isOccurs(node) {
|
|
549
|
+
var _a;
|
|
550
|
+
if (node.findDirectTokenByText("OCCURS")) {
|
|
551
|
+
return true;
|
|
552
|
+
}
|
|
553
|
+
else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText("OCCURS")) {
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
558
|
+
// todo, rewrite this method
|
|
559
|
+
resolveTypeChain(expr) {
|
|
560
|
+
var _a;
|
|
561
|
+
const chainText = expr.concatTokens().toUpperCase();
|
|
562
|
+
if (chainText.includes("=>") === false && chainText.includes("-") === false) {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
let className;
|
|
566
|
+
let rest = chainText;
|
|
567
|
+
if (chainText.includes("=>")) {
|
|
568
|
+
const split = chainText.split("=>");
|
|
569
|
+
className = split[0];
|
|
570
|
+
rest = split[1];
|
|
571
|
+
}
|
|
572
|
+
else if (chainText.includes("->")) {
|
|
573
|
+
const split = chainText.split("->");
|
|
574
|
+
className = split[0];
|
|
575
|
+
rest = split[1];
|
|
576
|
+
}
|
|
577
|
+
const subs = rest.split("-");
|
|
578
|
+
let foundType = undefined;
|
|
579
|
+
if (className && chainText.includes("=>")) {
|
|
580
|
+
const split = chainText.split("=>");
|
|
581
|
+
const className = split[0];
|
|
582
|
+
// the prefix might be itself
|
|
583
|
+
if ((this.scope.getType() === _scope_type_1.ScopeType.Interface
|
|
584
|
+
|| this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)
|
|
585
|
+
&& this.scope.getName().toUpperCase() === className.toUpperCase()) {
|
|
586
|
+
const foundId = this.scope.findType(subs[0]);
|
|
587
|
+
foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();
|
|
588
|
+
if (foundType === undefined) {
|
|
589
|
+
return new Types.UnknownType("Could not resolve type " + chainText);
|
|
590
|
+
}
|
|
591
|
+
this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
// lookup in local and global scope
|
|
595
|
+
const obj = this.scope.findObjectDefinition(className);
|
|
596
|
+
if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {
|
|
597
|
+
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });
|
|
598
|
+
return new Types.VoidType(className);
|
|
599
|
+
}
|
|
600
|
+
else if (obj === undefined) {
|
|
601
|
+
return new Types.UnknownType("Could not resolve top " + className + ", resolveTypeChain");
|
|
602
|
+
}
|
|
603
|
+
const type = obj instanceof types_1.ClassDefinition ? "CLAS" : "INTF";
|
|
604
|
+
this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });
|
|
605
|
+
const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);
|
|
606
|
+
foundType = byName === null || byName === void 0 ? void 0 : byName.getType();
|
|
607
|
+
if (byName === undefined || foundType === undefined) {
|
|
608
|
+
return new Types.UnknownType(subs[0] + " not found in class or interface");
|
|
609
|
+
}
|
|
610
|
+
this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
else if (className && chainText.includes("->")) {
|
|
614
|
+
const varVar = this.scope.findVariable(className);
|
|
615
|
+
const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();
|
|
616
|
+
if (foo instanceof basic_1.ObjectReferenceType) {
|
|
617
|
+
const typeName = subs[0];
|
|
618
|
+
let id = foo.getIdentifier();
|
|
619
|
+
if (!(id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition)) {
|
|
620
|
+
const found = this.scope.findObjectDefinition(foo.getIdentifierName());
|
|
621
|
+
if (found) {
|
|
622
|
+
id = found;
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
return new Types.UnknownType(foo.getIdentifierName() + " not found in scope");
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
if (id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition) {
|
|
629
|
+
const type = id instanceof types_1.ClassDefinition ? "CLAS" : "INTF";
|
|
630
|
+
this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });
|
|
631
|
+
const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);
|
|
632
|
+
foundType = byName === null || byName === void 0 ? void 0 : byName.getType();
|
|
633
|
+
if (byName === undefined || foundType === undefined) {
|
|
634
|
+
return new Types.UnknownType(typeName + " not found in class or interface");
|
|
635
|
+
}
|
|
636
|
+
this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
return new Types.UnknownType("Not an object reference, " + className + ", " + id.constructor.name);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
else if (foo === undefined) {
|
|
643
|
+
return new Types.UnknownType(className + " not found in scope");
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
return new Types.UnknownType("Not an object reference, " + className + ", " + foo.constructor.name);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
const found = this.scope.findType(subs[0]);
|
|
651
|
+
foundType = found === null || found === void 0 ? void 0 : found.getType();
|
|
652
|
+
if (foundType === undefined) {
|
|
653
|
+
const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();
|
|
654
|
+
if (typePoolType) {
|
|
655
|
+
// this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);
|
|
656
|
+
foundType = typePoolType;
|
|
657
|
+
}
|
|
658
|
+
if (foundType === undefined) {
|
|
659
|
+
const f = this.scope.getDDIC().lookupTableOrView(subs[0]);
|
|
660
|
+
this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });
|
|
661
|
+
if (f.type instanceof _typed_identifier_1.TypedIdentifier) {
|
|
662
|
+
foundType = f.type.getType();
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
foundType = f.type;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
671
|
+
}
|
|
672
|
+
if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {
|
|
673
|
+
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
674
|
+
return new Types.VoidType(subs[0]);
|
|
675
|
+
}
|
|
676
|
+
else if (foundType instanceof Types.VoidType) {
|
|
677
|
+
this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
|
|
678
|
+
return foundType;
|
|
679
|
+
}
|
|
680
|
+
else if (foundType === undefined) {
|
|
681
|
+
return new Types.UnknownType("Unknown type " + subs[0]);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
subs.shift();
|
|
685
|
+
while (subs.length > 0) {
|
|
686
|
+
if (foundType instanceof Types.UnknownType
|
|
687
|
+
|| foundType instanceof Types.VoidType) {
|
|
688
|
+
return foundType;
|
|
689
|
+
}
|
|
690
|
+
else if (!(foundType instanceof Types.StructureType)) {
|
|
691
|
+
return new Types.UnknownType("Not a structured type");
|
|
692
|
+
}
|
|
693
|
+
foundType = foundType.getComponentByName(subs[0]);
|
|
694
|
+
if (foundType === undefined) {
|
|
695
|
+
return new Types.UnknownType(`Field "${subs[0]}" not found in structure`);
|
|
696
|
+
}
|
|
697
|
+
subs.shift();
|
|
698
|
+
}
|
|
699
|
+
return foundType;
|
|
700
|
+
}
|
|
701
|
+
resolveConstantValue(expr) {
|
|
702
|
+
var _a, _b;
|
|
703
|
+
// todo: rewrite this method
|
|
704
|
+
if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {
|
|
705
|
+
throw new Error("resolveConstantValue");
|
|
706
|
+
}
|
|
707
|
+
const firstNode = expr.getFirstChild();
|
|
708
|
+
const firstToken = firstNode.getFirstToken();
|
|
709
|
+
const firstName = firstToken.getStr();
|
|
710
|
+
if (firstNode.get() instanceof Expressions.Field) {
|
|
711
|
+
const found = this.scope.findVariable(firstName);
|
|
712
|
+
const val = found === null || found === void 0 ? void 0 : found.getValue();
|
|
713
|
+
if (typeof val === "string") {
|
|
714
|
+
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
715
|
+
return val;
|
|
716
|
+
}
|
|
717
|
+
else if ((found === null || found === void 0 ? void 0 : found.getType()) instanceof basic_1.StructureType) {
|
|
718
|
+
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
719
|
+
}
|
|
720
|
+
return undefined;
|
|
721
|
+
}
|
|
722
|
+
else if (firstNode.get() instanceof Expressions.ClassName
|
|
723
|
+
&& firstName.toLowerCase() === this.scope.getName().toLowerCase()
|
|
724
|
+
&& (this.scope.getType() === _scope_type_1.ScopeType.Interface
|
|
725
|
+
|| this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {
|
|
726
|
+
const children = expr.getChildren();
|
|
727
|
+
const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
728
|
+
const found = this.scope.findVariable(token.getStr());
|
|
729
|
+
const val = found === null || found === void 0 ? void 0 : found.getValue();
|
|
730
|
+
if (typeof val === "string") {
|
|
731
|
+
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
732
|
+
return val;
|
|
733
|
+
}
|
|
734
|
+
return undefined;
|
|
735
|
+
}
|
|
736
|
+
else if (firstNode.get() instanceof Expressions.ClassName) {
|
|
737
|
+
const obj = this.scope.findObjectDefinition(firstName);
|
|
738
|
+
if (obj === undefined) {
|
|
739
|
+
if (this.scope.existsObject(firstName).found === true) {
|
|
740
|
+
return undefined;
|
|
741
|
+
}
|
|
742
|
+
else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {
|
|
743
|
+
throw new Error("resolveConstantValue, not found: " + firstName);
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });
|
|
747
|
+
return undefined;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
const children = expr.getChildren();
|
|
751
|
+
const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();
|
|
752
|
+
const attr = token.getStr();
|
|
753
|
+
const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);
|
|
754
|
+
if (c instanceof class_constant_1.ClassConstant) {
|
|
755
|
+
this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
756
|
+
const val = c.getValue();
|
|
757
|
+
if (typeof val === "string") {
|
|
758
|
+
return val;
|
|
759
|
+
}
|
|
760
|
+
else if (typeof val === "object" && children[4]) {
|
|
761
|
+
const name = children[4].getFirstToken().getStr();
|
|
762
|
+
if (val[name] !== undefined) {
|
|
763
|
+
return val[name];
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
return undefined;
|
|
767
|
+
}
|
|
768
|
+
throw new Error("resolveConstantValue, constant not found " + attr);
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
throw new Error("resolveConstantValue, unexpected structure");
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
resolveTypeRef(chain) {
|
|
775
|
+
var _a;
|
|
776
|
+
if (chain === undefined) {
|
|
777
|
+
return undefined;
|
|
778
|
+
}
|
|
779
|
+
const name = chain.getFirstToken().getStr();
|
|
780
|
+
if (chain.getAllTokens().length === 1) {
|
|
781
|
+
if (name.toUpperCase() === "OBJECT") {
|
|
782
|
+
return new Types.GenericObjectReferenceType();
|
|
783
|
+
}
|
|
784
|
+
const search = this.scope.existsObject(name);
|
|
785
|
+
if (search.found === true && search.id) {
|
|
786
|
+
this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });
|
|
787
|
+
return new Types.ObjectReferenceType(search.id, name);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
const found = this.resolveTypeName(chain);
|
|
791
|
+
if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {
|
|
792
|
+
return new Types.DataReference(found);
|
|
793
|
+
}
|
|
794
|
+
else if (chain.concatTokens().toUpperCase() === "DATA") {
|
|
795
|
+
return new Types.DataReference(new Types.AnyType());
|
|
796
|
+
}
|
|
797
|
+
if (this.scope.isBadiDef(name) === true) {
|
|
798
|
+
return new Types.VoidType(name);
|
|
799
|
+
}
|
|
800
|
+
if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {
|
|
801
|
+
// this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);
|
|
802
|
+
return new Types.VoidType(name);
|
|
803
|
+
}
|
|
804
|
+
return new Types.UnknownType("REF, unable to resolve " + name);
|
|
805
|
+
}
|
|
806
|
+
findValue(node) {
|
|
807
|
+
const val = node.findFirstExpression(Expressions.Value);
|
|
808
|
+
if (val === undefined) {
|
|
809
|
+
throw new Error("VALUE missing in expression");
|
|
810
|
+
}
|
|
811
|
+
if (val.concatTokens().toUpperCase() === "VALUE IS INITIAL") {
|
|
812
|
+
return undefined;
|
|
813
|
+
}
|
|
814
|
+
const constant = val.findFirstExpression(Expressions.Constant);
|
|
815
|
+
if (constant) {
|
|
816
|
+
return constant.concatTokens();
|
|
817
|
+
}
|
|
818
|
+
const chain = val.findFirstExpression(Expressions.SimpleFieldChain);
|
|
819
|
+
if (chain) {
|
|
820
|
+
return this.resolveConstantValue(chain);
|
|
821
|
+
}
|
|
822
|
+
throw new Error("findValue, unexpected");
|
|
823
|
+
}
|
|
824
|
+
findDecimals(node) {
|
|
825
|
+
var _a, _b;
|
|
826
|
+
const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
827
|
+
if (dec) {
|
|
828
|
+
return parseInt(dec, 10);
|
|
829
|
+
}
|
|
830
|
+
return undefined;
|
|
831
|
+
}
|
|
832
|
+
findLength(node) {
|
|
833
|
+
const val = node.findFirstExpression(Expressions.Length);
|
|
834
|
+
const flen = node.findFirstExpression(Expressions.ConstantFieldLength);
|
|
835
|
+
if (val && flen) {
|
|
836
|
+
throw new Error("Only specify length once");
|
|
837
|
+
}
|
|
838
|
+
if (flen) {
|
|
839
|
+
const cintExpr = flen.findFirstExpression(Expressions.Integer);
|
|
840
|
+
if (cintExpr) {
|
|
841
|
+
return this.parseInt(cintExpr.concatTokens());
|
|
842
|
+
}
|
|
843
|
+
const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);
|
|
844
|
+
if (cchain) {
|
|
845
|
+
const val = this.resolveConstantValue(cchain);
|
|
846
|
+
return this.parseInt(val);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
if (val === undefined) {
|
|
850
|
+
return 1;
|
|
851
|
+
}
|
|
852
|
+
const intExpr = val.findFirstExpression(Expressions.Integer);
|
|
853
|
+
if (intExpr) {
|
|
854
|
+
return this.parseInt(intExpr.concatTokens());
|
|
855
|
+
}
|
|
856
|
+
const strExpr = val.findFirstExpression(Expressions.ConstantString);
|
|
857
|
+
if (strExpr) {
|
|
858
|
+
return this.parseInt(strExpr.concatTokens());
|
|
859
|
+
}
|
|
860
|
+
const chain = val.findFirstExpression(Expressions.SimpleFieldChain);
|
|
861
|
+
if (chain) {
|
|
862
|
+
const val = this.resolveConstantValue(chain);
|
|
863
|
+
return this.parseInt(val);
|
|
864
|
+
}
|
|
865
|
+
throw new Error("Unexpected, findLength");
|
|
866
|
+
}
|
|
867
|
+
parseInt(text) {
|
|
868
|
+
if (text === undefined) {
|
|
869
|
+
return undefined;
|
|
870
|
+
}
|
|
871
|
+
if (text.startsWith("'")) {
|
|
872
|
+
text = text.split("'")[1];
|
|
873
|
+
}
|
|
874
|
+
else if (text.startsWith("`")) {
|
|
875
|
+
text = text.split("`")[1];
|
|
876
|
+
}
|
|
877
|
+
return parseInt(text, 10);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
exports.BasicTypes = BasicTypes;
|
|
881
881
|
//# sourceMappingURL=basic_types.js.map
|