@abaplint/core 2.105.17 → 2.105.19

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.
Files changed (108) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +11 -3
  3. package/build/adhoc/syntax_performance.js +165 -165
  4. package/build/src/abap/2_statements/expressions/raise_with.js +1 -1
  5. package/build/src/abap/5_syntax/_current_scope.js +22 -3
  6. package/build/src/abap/5_syntax/expressions/raise_with.js +1 -1
  7. package/build/src/abap/5_syntax/expressions/source.js +11 -0
  8. package/build/src/abap/5_syntax/spaghetti_scope.js +4 -1
  9. package/build/src/abap/5_syntax/statements/class_deferred.js +1 -1
  10. package/build/src/abap/5_syntax/statements/interface_deferred.js +1 -1
  11. package/build/src/abap/flow/flow_graph.js +7 -7
  12. package/build/src/lsp/help.js +7 -7
  13. package/build/src/registry.js +1 -1
  14. package/build/src/rules/7bit_ascii.js +4 -4
  15. package/build/src/rules/abapdoc.js +4 -4
  16. package/build/src/rules/align_parameters.js +40 -40
  17. package/build/src/rules/ambiguous_statement.js +6 -6
  18. package/build/src/rules/avoid_use.js +10 -10
  19. package/build/src/rules/begin_end_names.js +4 -4
  20. package/build/src/rules/begin_single_include.js +12 -12
  21. package/build/src/rules/call_transaction_authority_check.js +3 -3
  22. package/build/src/rules/cds_comment_style.js +4 -4
  23. package/build/src/rules/cds_legacy_view.js +4 -4
  24. package/build/src/rules/chain_mainly_declarations.js +4 -4
  25. package/build/src/rules/change_if_to_case.js +8 -8
  26. package/build/src/rules/check_abstract.js +2 -2
  27. package/build/src/rules/check_comments.js +4 -4
  28. package/build/src/rules/check_include.js +3 -3
  29. package/build/src/rules/check_subrc.js +8 -8
  30. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  31. package/build/src/rules/commented_code.js +1 -1
  32. package/build/src/rules/constructor_visibility_public.js +4 -4
  33. package/build/src/rules/contains_tab.js +2 -2
  34. package/build/src/rules/cyclic_oo.js +4 -4
  35. package/build/src/rules/dangerous_statement.js +1 -1
  36. package/build/src/rules/definitions_top.js +6 -6
  37. package/build/src/rules/downport.js +84 -84
  38. package/build/src/rules/easy_to_find_messages.js +6 -6
  39. package/build/src/rules/empty_line_in_statement.js +2 -2
  40. package/build/src/rules/empty_structure.js +6 -0
  41. package/build/src/rules/exit_or_check.js +3 -3
  42. package/build/src/rules/expand_macros.js +5 -5
  43. package/build/src/rules/exporting.js +1 -1
  44. package/build/src/rules/forbidden_identifier.js +1 -1
  45. package/build/src/rules/forbidden_void_type.js +2 -2
  46. package/build/src/rules/fully_type_itabs.js +1 -1
  47. package/build/src/rules/functional_writing.js +17 -17
  48. package/build/src/rules/global_class.js +8 -8
  49. package/build/src/rules/identical_conditions.js +2 -2
  50. package/build/src/rules/identical_contents.js +20 -14
  51. package/build/src/rules/identical_descriptions.js +6 -6
  52. package/build/src/rules/if_in_if.js +35 -35
  53. package/build/src/rules/implement_methods.js +3 -3
  54. package/build/src/rules/in_statement_indentation.js +11 -11
  55. package/build/src/rules/intf_referencing_clas.js +3 -3
  56. package/build/src/rules/line_break_style.js +2 -2
  57. package/build/src/rules/line_length.js +1 -1
  58. package/build/src/rules/line_only_punc.js +1 -1
  59. package/build/src/rules/local_variable_names.js +2 -2
  60. package/build/src/rules/main_file_contents.js +4 -4
  61. package/build/src/rules/many_parentheses.js +10 -10
  62. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  63. package/build/src/rules/max_one_statement.js +5 -5
  64. package/build/src/rules/method_length.js +2 -2
  65. package/build/src/rules/method_overwrites_builtin.js +4 -4
  66. package/build/src/rules/nesting.js +1 -1
  67. package/build/src/rules/no_chained_assignment.js +1 -1
  68. package/build/src/rules/no_external_form_calls.js +2 -2
  69. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  70. package/build/src/rules/no_prefixes.js +6 -6
  71. package/build/src/rules/no_public_attributes.js +1 -1
  72. package/build/src/rules/no_yoda_conditions.js +4 -4
  73. package/build/src/rules/nrob_consistency.js +2 -2
  74. package/build/src/rules/obsolete_statement.js +51 -51
  75. package/build/src/rules/omit_parameter_name.js +3 -3
  76. package/build/src/rules/omit_receiving.js +13 -13
  77. package/build/src/rules/parser_702_chaining.js +2 -2
  78. package/build/src/rules/parser_error.js +2 -2
  79. package/build/src/rules/parser_missing_space.js +1 -1
  80. package/build/src/rules/prefer_inline.js +16 -16
  81. package/build/src/rules/prefer_is_not.js +9 -9
  82. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  83. package/build/src/rules/prefer_returning_to_exporting.js +1 -1
  84. package/build/src/rules/prefer_xsdbool.js +2 -2
  85. package/build/src/rules/reduce_procedural_code.js +17 -17
  86. package/build/src/rules/remove_descriptions.js +4 -4
  87. package/build/src/rules/rfc_error_handling.js +9 -9
  88. package/build/src/rules/select_add_order_by.js +5 -5
  89. package/build/src/rules/select_performance.js +5 -5
  90. package/build/src/rules/select_single_full_key.js +2 -2
  91. package/build/src/rules/sicf_consistency.js +2 -2
  92. package/build/src/rules/space_before_dot.js +2 -2
  93. package/build/src/rules/sql_value_conversion.js +6 -6
  94. package/build/src/rules/start_at_tab.js +1 -1
  95. package/build/src/rules/strict_sql.js +6 -6
  96. package/build/src/rules/sy_modification.js +3 -3
  97. package/build/src/rules/tabl_enhancement_category.js +2 -2
  98. package/build/src/rules/type_form_parameters.js +2 -2
  99. package/build/src/rules/unnecessary_chaining.js +1 -1
  100. package/build/src/rules/unnecessary_pragma.js +29 -29
  101. package/build/src/rules/unnecessary_return.js +11 -11
  102. package/build/src/rules/unused_methods.js +11 -11
  103. package/build/src/rules/unused_variables.js +12 -12
  104. package/build/src/rules/use_bool_expression.js +8 -8
  105. package/build/src/rules/use_line_exists.js +6 -6
  106. package/build/src/rules/use_new.js +4 -4
  107. package/build/src/rules/when_others_last.js +6 -6
  108. package/package.json +70 -70
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # @abaplint/core
2
-
3
- [abaplint](https://abaplint.org) core library
4
-
5
- Exposes functionality like the parser and rules, which can be used in other projects.
6
-
1
+ # @abaplint/core
2
+
3
+ [abaplint](https://abaplint.org) core library
4
+
5
+ Exposes functionality like the parser and rules, which can be used in other projects.
6
+
7
7
  For more information see https://github.com/abaplint/abaplint
@@ -1378,7 +1378,7 @@ export declare class CurrentScope {
1378
1378
  addInterfaceDefinition(i: IInterfaceDefinition): void;
1379
1379
  addNamedIdentifier(name: string, identifier: TypedIdentifier): void;
1380
1380
  addIdentifier(identifier: TypedIdentifier | undefined): void;
1381
- addDeferred(token: Token | undefined): void;
1381
+ addDeferred(token: Token | undefined, type: "CLAS" | "INTF"): void;
1382
1382
  addListPrefix(identifiers: readonly TypedIdentifier[], prefix: string): void;
1383
1383
  addList(identifiers: readonly TypedIdentifier[]): void;
1384
1384
  addReference(usage: Token | undefined, referencing: Identifier | undefined, type: ReferenceType | ReferenceType[] | undefined, filename: string, extra?: IReferenceExtras): void;
@@ -1631,6 +1631,11 @@ declare class Default extends Expression {
1631
1631
  getRunnable(): IStatementRunnable;
1632
1632
  }
1633
1633
 
1634
+ declare type DeferredInformation = {
1635
+ token: Token;
1636
+ ooType: "CLAS" | "INTF";
1637
+ };
1638
+
1634
1639
  declare class Define implements IStructure {
1635
1640
  getMatcher(): IStructureRunnable;
1636
1641
  }
@@ -3705,7 +3710,7 @@ declare interface IScopeData {
3705
3710
  [name: string]: TypedIdentifier;
3706
3711
  };
3707
3712
  deferred: {
3708
- [name: string]: Token;
3713
+ [name: string]: DeferredInformation;
3709
3714
  };
3710
3715
  cdefs: {
3711
3716
  [name: string]: IClassDefinition;
@@ -5702,7 +5707,10 @@ export declare class SpaghettiScopeNode extends ScopeData implements ISpaghettiS
5702
5707
  end: Position;
5703
5708
  };
5704
5709
  setEnd(end: Position): void;
5705
- findDeferred(name: string): Identifier | undefined;
5710
+ findDeferred(name: string): {
5711
+ id: Identifier | undefined;
5712
+ ooType: "CLAS" | "INTF";
5713
+ } | undefined;
5706
5714
  findClassDefinition(name: string): IClassDefinition | undefined;
5707
5715
  listClassDefinitions(): IClassDefinition[];
5708
5716
  listInterfaceDefinitions(): IInterfaceDefinition[];
@@ -5,175 +5,175 @@ const fs = require("fs");
5
5
  console.log("========================");
6
6
  const file1 = new src_1.MemoryFile("abapgit.prog.abap", fs.readFileSync("./lexer_performance.abap", "utf-8"));
7
7
  const reg = new src_1.Registry().addFile(file1);
8
- reg.addFile(new src_1.MemoryFile("cx_root.clas.abap", `
9
- CLASS cx_root DEFINITION ABSTRACT PUBLIC.
10
- PUBLIC SECTION.
11
- DATA previous TYPE REF TO cx_root.
12
- DATA textid TYPE c LENGTH 32.
13
-
14
- METHODS constructor
15
- IMPORTING
16
- textid LIKE textid OPTIONAL
17
- previous TYPE REF TO cx_root OPTIONAL.
18
-
19
- METHODS get_source_position
20
- EXPORTING
21
- program_name TYPE string
22
- include_name TYPE string
23
- source_line TYPE i.
24
-
25
- INTERFACES if_message.
26
- ALIASES get_longtext FOR if_message~get_longtext.
27
- ALIASES get_text FOR if_message~get_text.
28
-
29
- ENDCLASS.
30
-
31
- CLASS cx_root IMPLEMENTATION.
32
-
33
- METHOD constructor.
34
- ENDMETHOD.
35
-
36
- METHOD get_source_position.
37
- ENDMETHOD.
38
-
39
- METHOD if_message~get_longtext.
40
- ENDMETHOD.
41
-
42
- METHOD if_message~get_text.
43
- ENDMETHOD.
44
-
8
+ reg.addFile(new src_1.MemoryFile("cx_root.clas.abap", `
9
+ CLASS cx_root DEFINITION ABSTRACT PUBLIC.
10
+ PUBLIC SECTION.
11
+ DATA previous TYPE REF TO cx_root.
12
+ DATA textid TYPE c LENGTH 32.
13
+
14
+ METHODS constructor
15
+ IMPORTING
16
+ textid LIKE textid OPTIONAL
17
+ previous TYPE REF TO cx_root OPTIONAL.
18
+
19
+ METHODS get_source_position
20
+ EXPORTING
21
+ program_name TYPE string
22
+ include_name TYPE string
23
+ source_line TYPE i.
24
+
25
+ INTERFACES if_message.
26
+ ALIASES get_longtext FOR if_message~get_longtext.
27
+ ALIASES get_text FOR if_message~get_text.
28
+
29
+ ENDCLASS.
30
+
31
+ CLASS cx_root IMPLEMENTATION.
32
+
33
+ METHOD constructor.
34
+ ENDMETHOD.
35
+
36
+ METHOD get_source_position.
37
+ ENDMETHOD.
38
+
39
+ METHOD if_message~get_longtext.
40
+ ENDMETHOD.
41
+
42
+ METHOD if_message~get_text.
43
+ ENDMETHOD.
44
+
45
45
  ENDCLASS.`));
46
- reg.addFile(new src_1.MemoryFile("cx_static_check.clas.abap", `
47
- CLASS cx_static_check DEFINITION PUBLIC INHERITING FROM cx_root.
48
- PUBLIC SECTION.
49
- METHODS constructor
50
- IMPORTING
51
- textid LIKE textid OPTIONAL
52
- previous TYPE REF TO cx_root OPTIONAL.
53
- ENDCLASS.
54
-
55
- CLASS cx_static_check IMPLEMENTATION.
56
- METHOD constructor.
57
- ENDMETHOD.
46
+ reg.addFile(new src_1.MemoryFile("cx_static_check.clas.abap", `
47
+ CLASS cx_static_check DEFINITION PUBLIC INHERITING FROM cx_root.
48
+ PUBLIC SECTION.
49
+ METHODS constructor
50
+ IMPORTING
51
+ textid LIKE textid OPTIONAL
52
+ previous TYPE REF TO cx_root OPTIONAL.
53
+ ENDCLASS.
54
+
55
+ CLASS cx_static_check IMPLEMENTATION.
56
+ METHOD constructor.
57
+ ENDMETHOD.
58
58
  ENDCLASS.`));
59
- reg.addFile(new src_1.MemoryFile("if_message.intf.abap", `
60
- INTERFACE if_message PUBLIC.
61
- METHODS get_text RETURNING VALUE(result) TYPE string.
62
-
63
- METHODS get_longtext
64
- IMPORTING preserve_newlines TYPE abap_bool OPTIONAL
65
- RETURNING VALUE(result) TYPE string.
59
+ reg.addFile(new src_1.MemoryFile("if_message.intf.abap", `
60
+ INTERFACE if_message PUBLIC.
61
+ METHODS get_text RETURNING VALUE(result) TYPE string.
62
+
63
+ METHODS get_longtext
64
+ IMPORTING preserve_newlines TYPE abap_bool OPTIONAL
65
+ RETURNING VALUE(result) TYPE string.
66
66
  ENDINTERFACE.`));
67
- reg.addFile(new src_1.MemoryFile("if_t100_message.intf.abap", `
68
- INTERFACE if_t100_message PUBLIC.
69
-
70
- DATA t100key TYPE scx_t100key.
71
-
72
- CONSTANTS:
73
- BEGIN OF default_textid,
74
- msgid TYPE symsgid VALUE 'AB',
75
- msgno TYPE symsgno VALUE '123',
76
- attr1 TYPE scx_attrname VALUE '',
77
- attr2 TYPE scx_attrname VALUE '',
78
- attr3 TYPE scx_attrname VALUE '',
79
- attr4 TYPE scx_attrname VALUE '',
80
- END OF default_textid.
81
-
67
+ reg.addFile(new src_1.MemoryFile("if_t100_message.intf.abap", `
68
+ INTERFACE if_t100_message PUBLIC.
69
+
70
+ DATA t100key TYPE scx_t100key.
71
+
72
+ CONSTANTS:
73
+ BEGIN OF default_textid,
74
+ msgid TYPE symsgid VALUE 'AB',
75
+ msgno TYPE symsgno VALUE '123',
76
+ attr1 TYPE scx_attrname VALUE '',
77
+ attr2 TYPE scx_attrname VALUE '',
78
+ attr3 TYPE scx_attrname VALUE '',
79
+ attr4 TYPE scx_attrname VALUE '',
80
+ END OF default_textid.
81
+
82
82
  ENDINTERFACE.`));
83
- reg.setConfig(new src_1.Config(`
84
- {
85
- "global": {
86
- "files": "/src/**/*.*"
87
- },
88
- "dependencies": [],
89
- "syntax": {
90
- "version": "v702",
91
- "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)",
92
- "globalConstants": [
93
- "abap_func_exporting",
94
- "abap_func_tables",
95
- "cssf_formtype_text",
96
- "icon_abap",
97
- "icon_adopt",
98
- "icon_change",
99
- "icon_create",
100
- "icon_delete",
101
- "icon_display_text",
102
- "icon_folder",
103
- "icon_led_green",
104
- "icon_led_inactive",
105
- "icon_led_red",
106
- "icon_led_yellow",
107
- "icon_message_information",
108
- "icon_okay",
109
- "icon_set_state",
110
- "icon_stack",
111
- "icon_system_help",
112
- "icon_workflow_fork",
113
- "seoc_category_exception",
114
- "seoc_category_webdynpro_class",
115
- "seoc_exposure_private",
116
- "seoc_exposure_protected",
117
- "seoc_exposure_public",
118
- "seoc_state_implemented",
119
- "seoc_version_active",
120
- "seoc_version_deleted",
121
- "seoc_version_inactive",
122
- "seok_access_free",
123
- "seok_access_modify",
124
- "seox_false",
125
- "seok_pgmid_r3tr",
126
- "seoo_cmptype_type",
127
- "seoo_cmptype_event",
128
- "seoo_cmptype_method",
129
- "seoo_cmptype_attribute",
130
- "seop_ext_class_locals_def",
131
- "seop_ext_class_locals_imp",
132
- "seop_ext_class_macros",
133
- "seop_ext_class_testclasses",
134
- "seop_incextapp_definition",
135
- "seop_incextapp_implementation",
136
- "seop_incextapp_macros",
137
- "seop_incextapp_testclasses",
138
- "seos_scotype_exception",
139
- "seos_scotype_parameter",
140
- "seox_true",
141
- "sews_c_vif_version",
142
- "skwfc_obtype_folder",
143
- "skwfc_obtype_loio",
144
- "so2_controller",
145
- "icon_no_status",
146
- "icon_package_standard",
147
- "srext_ext_class_pool",
148
- "srext_ext_interface_pool",
149
- "ststc_c_type_dialog",
150
- "ststc_c_type_object",
151
- "ststc_c_type_parameters",
152
- "ststc_c_type_report",
153
- "swbm_c_op_delete_no_dialog",
154
- "swbm_c_type_ddic_db_tabxinx",
155
- "swbm_c_type_wdy_application",
156
- "swbm_version_active",
157
- "swbm_version_inactive",
158
- "wbmr_c_skwf_folder_class",
159
- "wdyn_limu_component_controller",
160
- "wdyn_limu_component_definition",
161
- "wdyn_limu_component_view"
162
- ]
163
- },
164
- "rules": {
165
- "begin_end_names": true,
166
- "check_ddic": true,
167
- "check_include": true,
168
- "check_syntax": true,
169
- "global_class": true,
170
- "implement_methods": true,
171
- "method_implemented_twice": true,
172
- "parser_error": true,
173
- "superclass_final": true,
174
- "unknown_types": true,
175
- "xml_consistency": true
176
- }
83
+ reg.setConfig(new src_1.Config(`
84
+ {
85
+ "global": {
86
+ "files": "/src/**/*.*"
87
+ },
88
+ "dependencies": [],
89
+ "syntax": {
90
+ "version": "v702",
91
+ "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)",
92
+ "globalConstants": [
93
+ "abap_func_exporting",
94
+ "abap_func_tables",
95
+ "cssf_formtype_text",
96
+ "icon_abap",
97
+ "icon_adopt",
98
+ "icon_change",
99
+ "icon_create",
100
+ "icon_delete",
101
+ "icon_display_text",
102
+ "icon_folder",
103
+ "icon_led_green",
104
+ "icon_led_inactive",
105
+ "icon_led_red",
106
+ "icon_led_yellow",
107
+ "icon_message_information",
108
+ "icon_okay",
109
+ "icon_set_state",
110
+ "icon_stack",
111
+ "icon_system_help",
112
+ "icon_workflow_fork",
113
+ "seoc_category_exception",
114
+ "seoc_category_webdynpro_class",
115
+ "seoc_exposure_private",
116
+ "seoc_exposure_protected",
117
+ "seoc_exposure_public",
118
+ "seoc_state_implemented",
119
+ "seoc_version_active",
120
+ "seoc_version_deleted",
121
+ "seoc_version_inactive",
122
+ "seok_access_free",
123
+ "seok_access_modify",
124
+ "seox_false",
125
+ "seok_pgmid_r3tr",
126
+ "seoo_cmptype_type",
127
+ "seoo_cmptype_event",
128
+ "seoo_cmptype_method",
129
+ "seoo_cmptype_attribute",
130
+ "seop_ext_class_locals_def",
131
+ "seop_ext_class_locals_imp",
132
+ "seop_ext_class_macros",
133
+ "seop_ext_class_testclasses",
134
+ "seop_incextapp_definition",
135
+ "seop_incextapp_implementation",
136
+ "seop_incextapp_macros",
137
+ "seop_incextapp_testclasses",
138
+ "seos_scotype_exception",
139
+ "seos_scotype_parameter",
140
+ "seox_true",
141
+ "sews_c_vif_version",
142
+ "skwfc_obtype_folder",
143
+ "skwfc_obtype_loio",
144
+ "so2_controller",
145
+ "icon_no_status",
146
+ "icon_package_standard",
147
+ "srext_ext_class_pool",
148
+ "srext_ext_interface_pool",
149
+ "ststc_c_type_dialog",
150
+ "ststc_c_type_object",
151
+ "ststc_c_type_parameters",
152
+ "ststc_c_type_report",
153
+ "swbm_c_op_delete_no_dialog",
154
+ "swbm_c_type_ddic_db_tabxinx",
155
+ "swbm_c_type_wdy_application",
156
+ "swbm_version_active",
157
+ "swbm_version_inactive",
158
+ "wbmr_c_skwf_folder_class",
159
+ "wdyn_limu_component_controller",
160
+ "wdyn_limu_component_definition",
161
+ "wdyn_limu_component_view"
162
+ ]
163
+ },
164
+ "rules": {
165
+ "begin_end_names": true,
166
+ "check_ddic": true,
167
+ "check_include": true,
168
+ "check_syntax": true,
169
+ "global_class": true,
170
+ "implement_methods": true,
171
+ "method_implemented_twice": true,
172
+ "parser_error": true,
173
+ "superclass_final": true,
174
+ "unknown_types": true,
175
+ "xml_consistency": true
176
+ }
177
177
  }`));
178
178
  reg.parse();
179
179
  console.log("run syntax logic,");
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
5
5
  const _1 = require(".");
6
6
  class RaiseWith extends combi_1.Expression {
7
7
  getRunnable() {
8
- const wit = (0, combi_1.seq)("WITH", _1.SimpleSource3, (0, combi_1.opt)(_1.SimpleSource3), (0, combi_1.opt)(_1.SimpleSource3), (0, combi_1.opt)(_1.SimpleSource3));
8
+ const wit = (0, combi_1.seq)("WITH", _1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
9
9
  return wit;
10
10
  }
11
11
  }
@@ -126,11 +126,11 @@ class CurrentScope {
126
126
  }
127
127
  this.addNamedIdentifier(identifier.getName(), identifier);
128
128
  }
129
- addDeferred(token) {
129
+ addDeferred(token, type) {
130
130
  if (token === undefined) {
131
131
  return;
132
132
  }
133
- this.current.getData().deferred[token.getStr().toUpperCase()] = token;
133
+ this.current.getData().deferred[token.getStr().toUpperCase()] = { token, ooType: type };
134
134
  }
135
135
  addListPrefix(identifiers, prefix) {
136
136
  for (const id of identifiers) {
@@ -235,7 +235,16 @@ class CurrentScope {
235
235
  }
236
236
  const def = (_c = this.current) === null || _c === void 0 ? void 0 : _c.findDeferred(name);
237
237
  if (def !== undefined) {
238
- return { id: def };
238
+ let rttiName = prefixRTTI;
239
+ switch (def.ooType) {
240
+ case "INTF":
241
+ rttiName = rttiName + "\\INTERFACE=" + name;
242
+ break;
243
+ default:
244
+ rttiName = rttiName + "\\CLASS=" + name;
245
+ break;
246
+ }
247
+ return { id: def.id, ooType: def.ooType, RTTIName: rttiName };
239
248
  }
240
249
  return undefined;
241
250
  }
@@ -265,6 +274,11 @@ class CurrentScope {
265
274
  if (typePoolName.length <= 1 || typePoolName.length > 5) {
266
275
  return undefined;
267
276
  }
277
+ if (this.parentObj.getType() === "TYPE"
278
+ && this.parentObj.getName().toUpperCase() === typePoolName.toUpperCase()) {
279
+ // dont recurse into itself
280
+ return undefined;
281
+ }
268
282
  const typePool = this.reg.getObject("TYPE", typePoolName);
269
283
  if (typePool === undefined) {
270
284
  return undefined;
@@ -282,6 +296,11 @@ class CurrentScope {
282
296
  if (typePoolName.length <= 2 || typePoolName.length > 5) {
283
297
  return undefined;
284
298
  }
299
+ if (this.parentObj.getType() === "TYPE"
300
+ && this.parentObj.getName().toUpperCase() === typePoolName.toUpperCase()) {
301
+ // dont recurse into itself
302
+ return undefined;
303
+ }
285
304
  if (new ddic_1.DDIC(this.reg).lookupNoVoid(name) !== undefined) {
286
305
  // this is tricky, it should not do recursion when parsing the type pool itself,
287
306
  // think about DTEL ABAP_ENCOD vs TYPE ABAP
@@ -5,7 +5,7 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const source_1 = require("./source");
6
6
  class RaiseWith {
7
7
  runSyntax(node, scope, filename) {
8
- for (const f of node.findDirectExpressions(Expressions.SimpleSource3)) {
8
+ for (const f of node.findDirectExpressions(Expressions.SimpleSource1)) {
9
9
  new source_1.Source().runSyntax(f, scope, filename);
10
10
  }
11
11
  }
@@ -97,6 +97,11 @@ class Source {
97
97
  else {
98
98
  this.addIfInferred(node, scope, filename, foundType);
99
99
  }
100
+ children.shift();
101
+ children.shift();
102
+ children.shift();
103
+ children.shift();
104
+ this.traverseRemainingChildren(children, scope, filename);
100
105
  return foundType ? foundType : bodyType;
101
106
  }
102
107
  case "CONV":
@@ -213,6 +218,12 @@ class Source {
213
218
  return context;
214
219
  }
215
220
  ////////////////////////////////
221
+ traverseRemainingChildren(children, scope, filename) {
222
+ const last = children[children.length - 1];
223
+ if (last && last.get() instanceof Expressions.Source) {
224
+ new Source().runSyntax(last, scope, filename);
225
+ }
226
+ }
216
227
  infer(context, found) {
217
228
  if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
218
229
  return context;
@@ -61,7 +61,10 @@ class SpaghettiScopeNode extends ScopeData {
61
61
  while (search !== undefined) {
62
62
  const found = search.getData().deferred[name.toUpperCase()];
63
63
  if (found) {
64
- return new _identifier_1.Identifier(found, search.identifier.filename);
64
+ return {
65
+ id: new _identifier_1.Identifier(found.token, search.identifier.filename),
66
+ ooType: found.ooType,
67
+ };
65
68
  }
66
69
  search = search.getParent();
67
70
  }
@@ -6,7 +6,7 @@ class ClassDeferred {
6
6
  runSyntax(node, scope, _filename) {
7
7
  var _a;
8
8
  const name = (_a = node.findFirstExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
9
- scope.addDeferred(name);
9
+ scope.addDeferred(name, "CLAS");
10
10
  }
11
11
  }
12
12
  exports.ClassDeferred = ClassDeferred;
@@ -6,7 +6,7 @@ class InterfaceDeferred {
6
6
  runSyntax(node, scope, _filename) {
7
7
  var _a;
8
8
  const name = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
9
- scope.addDeferred(name);
9
+ scope.addDeferred(name, "INTF");
10
10
  }
11
11
  }
12
12
  exports.InterfaceDeferred = InterfaceDeferred;
@@ -84,13 +84,13 @@ class FlowGraph {
84
84
  this.label = label;
85
85
  }
86
86
  toDigraph() {
87
- return `digraph G {
88
- labelloc="t";
89
- label="${this.label}";
90
- graph [fontname = "helvetica"];
91
- node [fontname = "helvetica", shape="box"];
92
- edge [fontname = "helvetica"];
93
- ${this.toTextEdges()}
87
+ return `digraph G {
88
+ labelloc="t";
89
+ label="${this.label}";
90
+ graph [fontname = "helvetica"];
91
+ node [fontname = "helvetica", shape="box"];
92
+ edge [fontname = "helvetica"];
93
+ ${this.toTextEdges()}
94
94
  }`;
95
95
  }
96
96
  listSources(node) {
@@ -19,13 +19,13 @@ class Help {
19
19
  /////////////////////////////////////////////////
20
20
  static dumpABAP(file, reg, textDocument, position) {
21
21
  let content = "";
22
- content = `
23
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
24
- <a href="#_statements" rel="no-refresh">Statements</a> |
25
- <a href="#_structure" rel="no-refresh">Structure</a> |
26
- <a href="#_files" rel="no-refresh">Files</a> |
27
- <a href="#_info" rel="no-refresh">Info Dump</a>
28
- <hr>
22
+ content = `
23
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
24
+ <a href="#_statements" rel="no-refresh">Statements</a> |
25
+ <a href="#_structure" rel="no-refresh">Structure</a> |
26
+ <a href="#_files" rel="no-refresh">Files</a> |
27
+ <a href="#_info" rel="no-refresh">Info Dump</a>
28
+ <hr>
29
29
  ` +
30
30
  "<tt>" + textDocument.uri + " (" +
31
31
  (position.line + 1) + ", " +
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.105.17";
68
+ return "2.105.19";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -17,10 +17,10 @@ class SevenBitAscii {
17
17
  key: "7bit_ascii",
18
18
  title: "Check for 7bit ascii",
19
19
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
20
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
21
-
22
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
23
-
20
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
21
+
22
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
23
+
24
24
  Checkes files with extensions ".abap" and ".asddls"`,
25
25
  tags: [_irule_1.RuleTag.SingleFile],
26
26
  };
@@ -28,10 +28,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
28
28
  key: "abapdoc",
29
29
  title: "Check abapdoc",
30
30
  shortDescription: `Various checks regarding abapdoc.`,
31
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
32
-
33
- Plus class and interface definitions.
34
-
31
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
32
+
33
+ Plus class and interface definitions.
34
+
35
35
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
36
36
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
37
37
  };