@abaplint/core 2.110.1 → 2.110.3

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 (116) hide show
  1. package/README.md +6 -6
  2. package/build/adhoc/syntax_performance.js +165 -165
  3. package/build/src/abap/2_statements/combi.js +18 -18
  4. package/build/src/abap/2_statements/expand_macros.js +1 -0
  5. package/build/src/abap/2_statements/expressions/sql_case.js +3 -2
  6. package/build/src/abap/2_statements/expressions/sql_function.js +9 -8
  7. package/build/src/abap/3_structures/structures/_combi.js +7 -8
  8. package/build/src/abap/3_structures/structures/class_definition.js +1 -2
  9. package/build/src/abap/flow/flow_graph.js +7 -7
  10. package/build/src/edit_helper.js +3 -3
  11. package/build/src/lsp/help.js +7 -7
  12. package/build/src/registry.js +1 -1
  13. package/build/src/rules/7bit_ascii.js +4 -4
  14. package/build/src/rules/abapdoc.js +4 -4
  15. package/build/src/rules/align_parameters.js +40 -40
  16. package/build/src/rules/align_type_expressions.js +28 -28
  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 +13 -13
  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 +82 -82
  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 -6
  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 +12 -12
  50. package/build/src/rules/identical_contents.js +14 -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/indentation.js +16 -16
  56. package/build/src/rules/intf_referencing_clas.js +3 -3
  57. package/build/src/rules/invalid_table_index.js +2 -2
  58. package/build/src/rules/line_break_style.js +2 -2
  59. package/build/src/rules/line_length.js +1 -1
  60. package/build/src/rules/line_only_punc.js +1 -1
  61. package/build/src/rules/local_variable_names.js +6 -6
  62. package/build/src/rules/main_file_contents.js +4 -4
  63. package/build/src/rules/many_parentheses.js +10 -10
  64. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  65. package/build/src/rules/max_one_statement.js +5 -5
  66. package/build/src/rules/method_length.js +2 -2
  67. package/build/src/rules/method_overwrites_builtin.js +12 -12
  68. package/build/src/rules/mix_returning.js +6 -6
  69. package/build/src/rules/nesting.js +1 -1
  70. package/build/src/rules/no_chained_assignment.js +1 -1
  71. package/build/src/rules/no_external_form_calls.js +2 -2
  72. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  73. package/build/src/rules/no_prefixes.js +6 -6
  74. package/build/src/rules/no_public_attributes.js +1 -1
  75. package/build/src/rules/no_yoda_conditions.js +4 -4
  76. package/build/src/rules/nrob_consistency.js +2 -2
  77. package/build/src/rules/obsolete_statement.js +51 -51
  78. package/build/src/rules/omit_parameter_name.js +3 -3
  79. package/build/src/rules/omit_receiving.js +13 -13
  80. package/build/src/rules/parser_702_chaining.js +2 -2
  81. package/build/src/rules/parser_error.js +2 -2
  82. package/build/src/rules/parser_missing_space.js +1 -1
  83. package/build/src/rules/prefer_inline.js +16 -16
  84. package/build/src/rules/prefer_is_not.js +9 -9
  85. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  86. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  87. package/build/src/rules/prefer_xsdbool.js +2 -2
  88. package/build/src/rules/preferred_compare_operator.js +2 -2
  89. package/build/src/rules/reduce_procedural_code.js +17 -17
  90. package/build/src/rules/remove_descriptions.js +4 -4
  91. package/build/src/rules/rfc_error_handling.js +7 -7
  92. package/build/src/rules/select_add_order_by.js +5 -5
  93. package/build/src/rules/select_performance.js +5 -5
  94. package/build/src/rules/select_single_full_key.js +2 -2
  95. package/build/src/rules/sicf_consistency.js +2 -2
  96. package/build/src/rules/slow_parameter_passing.js +16 -16
  97. package/build/src/rules/space_before_dot.js +2 -2
  98. package/build/src/rules/sql_value_conversion.js +6 -6
  99. package/build/src/rules/start_at_tab.js +1 -1
  100. package/build/src/rules/strict_sql.js +6 -6
  101. package/build/src/rules/sy_modification.js +3 -3
  102. package/build/src/rules/tabl_enhancement_category.js +2 -2
  103. package/build/src/rules/type_form_parameters.js +2 -2
  104. package/build/src/rules/unnecessary_pragma.js +29 -29
  105. package/build/src/rules/unnecessary_return.js +11 -11
  106. package/build/src/rules/unused_macros.js +6 -6
  107. package/build/src/rules/unused_methods.js +11 -11
  108. package/build/src/rules/unused_variables.js +12 -12
  109. package/build/src/rules/use_bool_expression.js +8 -8
  110. package/build/src/rules/use_class_based_exceptions.js +8 -8
  111. package/build/src/rules/use_line_exists.js +6 -6
  112. package/build/src/rules/use_new.js +4 -4
  113. package/build/src/rules/when_others_last.js +6 -6
  114. package/build/src/version.js +2 -2
  115. package/build/src/xml_utils.js +2 -3
  116. 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
@@ -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,");
@@ -1,6 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.failStar = exports.failCombinator = exports.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;
3
+ exports.Combi = exports.Expression = void 0;
4
+ exports.str = str;
5
+ exports.regex = regex;
6
+ exports.tok = tok;
7
+ exports.seq = seq;
8
+ exports.alt = alt;
9
+ exports.altPrio = altPrio;
10
+ exports.opt = opt;
11
+ exports.optPrio = optPrio;
12
+ exports.per = per;
13
+ exports.star = star;
14
+ exports.starPrio = starPrio;
15
+ exports.plus = plus;
16
+ exports.plusPrio = plusPrio;
17
+ exports.ver = ver;
18
+ exports.verNot = verNot;
19
+ exports.failCombinator = failCombinator;
20
+ exports.failStar = failStar;
4
21
  const Tokens = require("../1_lexer/tokens");
5
22
  const nodes_1 = require("../nodes");
6
23
  const version_1 = require("../../version");
@@ -813,15 +830,12 @@ function str(s) {
813
830
  return new Word(s);
814
831
  }
815
832
  }
816
- exports.str = str;
817
833
  function regex(r) {
818
834
  return new Regex(r);
819
835
  }
820
- exports.regex = regex;
821
836
  function tok(t) {
822
837
  return new Token(t.name);
823
838
  }
824
- exports.tok = tok;
825
839
  const expressionSingletons = {};
826
840
  const stringSingletons = {};
827
841
  function map(s) {
@@ -850,63 +864,49 @@ function seq(first, second, ...rest) {
850
864
  list.push(...rest.map(map));
851
865
  return new Sequence(list);
852
866
  }
853
- exports.seq = seq;
854
867
  function alt(first, second, ...rest) {
855
868
  const list = [map(first), map(second)];
856
869
  list.push(...rest.map(map));
857
870
  return new Alternative(list);
858
871
  }
859
- exports.alt = alt;
860
872
  function altPrio(first, second, ...rest) {
861
873
  const list = [map(first), map(second)];
862
874
  list.push(...rest.map(map));
863
875
  return new AlternativePriority(list);
864
876
  }
865
- exports.altPrio = altPrio;
866
877
  function opt(first) {
867
878
  return new Optional(map(first));
868
879
  }
869
- exports.opt = opt;
870
880
  function optPrio(first) {
871
881
  return new OptionalPriority(map(first));
872
882
  }
873
- exports.optPrio = optPrio;
874
883
  function per(first, second, ...rest) {
875
884
  const list = [map(first), map(second)];
876
885
  list.push(...rest.map(map));
877
886
  return new Permutation(list);
878
887
  }
879
- exports.per = per;
880
888
  function star(first) {
881
889
  return new Star(map(first));
882
890
  }
883
- exports.star = star;
884
891
  function starPrio(first) {
885
892
  return new StarPriority(map(first));
886
893
  }
887
- exports.starPrio = starPrio;
888
894
  function plus(first) {
889
895
  return new Plus(map(first));
890
896
  }
891
- exports.plus = plus;
892
897
  function plusPrio(first) {
893
898
  return new PlusPriority(map(first));
894
899
  }
895
- exports.plusPrio = plusPrio;
896
900
  function ver(version, first, or) {
897
901
  return new Vers(version, map(first), or);
898
902
  }
899
- exports.ver = ver;
900
903
  function verNot(version, first) {
901
904
  return new VersNot(version, map(first));
902
905
  }
903
- exports.verNot = verNot;
904
906
  function failCombinator() {
905
907
  return new FailCombinator();
906
908
  }
907
- exports.failCombinator = failCombinator;
908
909
  function failStar() {
909
910
  return new FailStar();
910
911
  }
911
- exports.failStar = failStar;
912
912
  //# sourceMappingURL=combi.js.map
@@ -75,6 +75,7 @@ class ExpandMacros {
75
75
  else if (type instanceof Statements.Include) {
76
76
  const includeName = (_b = statement.findDirectExpression(Expressions.IncludeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
77
77
  // todo, this does not take function module includes into account
78
+ // todo, workaround for cyclic includes?
78
79
  const prog = (_c = this.reg) === null || _c === void 0 ? void 0 : _c.getObject("PROG", includeName);
79
80
  if (prog) {
80
81
  prog.parse(this.version, this.globalMacros, this.reg);
@@ -13,8 +13,9 @@ class SQLCase extends combi_1.Expression {
13
13
  getRunnable() {
14
14
  const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
15
15
  const sub = (0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
16
- const when = (0, combi_1.seq)("WHEN", (0, combi_1.alt)(constant_1.Constant, sql_cond_1.SQLCond), "THEN", (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource), (0, combi_1.starPrio)(sub));
17
- const els = (0, combi_1.seq)("ELSE", sql_source_1.SQLSource);
16
+ const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource);
17
+ const when = (0, combi_1.seq)("WHEN", (0, combi_1.alt)(constant_1.Constant, sql_cond_1.SQLCond), "THEN", sourc, (0, combi_1.starPrio)(sub));
18
+ const els = (0, combi_1.seq)("ELSE", sourc);
18
19
  return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)(sql_field_name_1.SQLFieldName), (0, combi_1.plus)(when), (0, combi_1.optPrio)(els), "END"));
19
20
  }
20
21
  }
@@ -14,21 +14,22 @@ const sql_aggregation_1 = require("./sql_aggregation");
14
14
  class SQLFunction extends combi_1.Expression {
15
15
  getRunnable() {
16
16
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
17
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.alt)(simple_source3_1.SimpleSource3, paren)));
18
- const param = (0, combi_1.alt)(sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, SQLFunction, constant_1.Constant, sql_aggregation_1.SQLAggregation, at);
17
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, paren)));
18
+ const param = (0, combi_1.altPrio)(SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
19
19
  const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), "FLTP", "NUMC", "INT8");
20
+ const commaParam = (0, combi_1.seq)(",", param);
20
21
  const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("abs", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
21
22
  const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("cast", (0, combi_1.tok)(tokens_1.ParenLeftW), param, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
22
23
  const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("ceil", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
23
- const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
24
- const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
25
- const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
24
+ const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
25
+ const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
26
+ const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
26
27
  const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("floor", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
27
28
  const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("length", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
28
29
  const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("lower", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
29
- const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
30
- const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
31
- const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param, ",", param, (0, combi_1.tok)(tokens_1.WParenRightW)));
30
+ const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
31
+ const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
32
+ const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
32
33
  const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("upper", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
33
34
  const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("uuid", (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
34
35
  return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round);
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sub = exports.sta = exports.star = exports.opt = exports.beginEnd = exports.alt = exports.seq = void 0;
3
+ exports.seq = seq;
4
+ exports.alt = alt;
5
+ exports.beginEnd = beginEnd;
6
+ exports.opt = opt;
7
+ exports.star = star;
8
+ exports.sta = sta;
9
+ exports.sub = sub;
4
10
  const nodes_1 = require("../../nodes");
5
11
  const _statement_1 = require("../../2_statements/statements/_statement");
6
12
  class Sequence {
@@ -308,27 +314,21 @@ class SubStatement {
308
314
  function seq(first, ...rest) {
309
315
  return new Sequence([first].concat(rest));
310
316
  }
311
- exports.seq = seq;
312
317
  function alt(first, ...rest) {
313
318
  return new Alternative([first].concat(rest));
314
319
  }
315
- exports.alt = alt;
316
320
  function beginEnd(begin, body, end) {
317
321
  return new Sequence([begin, body, end]);
318
322
  }
319
- exports.beginEnd = beginEnd;
320
323
  function opt(o) {
321
324
  return new Optional(o);
322
325
  }
323
- exports.opt = opt;
324
326
  function star(s) {
325
327
  return new Star(s);
326
328
  }
327
- exports.star = star;
328
329
  function sta(s) {
329
330
  return new SubStatement(s);
330
331
  }
331
- exports.sta = sta;
332
332
  const singletons = {};
333
333
  function sub(s) {
334
334
  if (singletons[s.name] === undefined) {
@@ -336,5 +336,4 @@ function sub(s) {
336
336
  }
337
337
  return singletons[s.name];
338
338
  }
339
- exports.sub = sub;
340
339
  //# sourceMappingURL=_combi.js.map
@@ -6,10 +6,9 @@ const _combi_1 = require("./_combi");
6
6
  const private_section_1 = require("./private_section");
7
7
  const protected_section_1 = require("./protected_section");
8
8
  const public_section_1 = require("./public_section");
9
- const statements_1 = require("../../2_statements/statements");
10
9
  class ClassDefinition {
11
10
  getMatcher() {
12
- const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(statements_1.SetExtendedCheck)), (0, _combi_1.star)((0, _combi_1.sta)(statements_1.TypePools)), (0, _combi_1.opt)((0, _combi_1.sub)(public_section_1.PublicSection)), (0, _combi_1.opt)((0, _combi_1.sub)(protected_section_1.ProtectedSection)), (0, _combi_1.opt)((0, _combi_1.sub)(private_section_1.PrivateSection)), (0, _combi_1.opt)((0, _combi_1.sta)(statements_1.SetExtendedCheck)));
11
+ const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.TypePools)), (0, _combi_1.opt)((0, _combi_1.sub)(public_section_1.PublicSection)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.Include)), (0, _combi_1.opt)((0, _combi_1.sub)(protected_section_1.ProtectedSection)), (0, _combi_1.opt)((0, _combi_1.sub)(private_section_1.PrivateSection)), (0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)));
13
12
  return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.ClassDefinition), body, (0, _combi_1.sta)(Statements.EndClass));
14
13
  }
15
14
  }
@@ -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) {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyEditList = exports.applyEditSingle = exports.EditHelper = exports.EditDraft = void 0;
3
+ exports.EditHelper = exports.EditDraft = void 0;
4
+ exports.applyEditSingle = applyEditSingle;
5
+ exports.applyEditList = applyEditList;
4
6
  const position_1 = require("./position");
5
7
  const memory_file_1 = require("./files/memory_file");
6
8
  class EditDraft {
@@ -218,7 +220,6 @@ function applyEditSingle(reg, edit) {
218
220
  reg.updateFile(result);
219
221
  }
220
222
  }
221
- exports.applyEditSingle = applyEditSingle;
222
223
  /** returns list of filenames which were changed */
223
224
  function applyEditList(reg, edits) {
224
225
  const ret = [];
@@ -248,5 +249,4 @@ function applyEditList(reg, edits) {
248
249
  }
249
250
  return ret;
250
251
  }
251
- exports.applyEditList = applyEditList;
252
252
  //# sourceMappingURL=edit_helper.js.map
@@ -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) + ", " +
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.110.1";
70
+ return "2.110.3";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;