@abaplint/core 2.119.23 → 2.119.25

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 (127) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +5 -0
  3. package/build/src/abap/2_statements/expressions/index.js +2 -0
  4. package/build/src/abap/2_statements/expressions/sql_aggregation.js +23 -11
  5. package/build/src/abap/2_statements/expressions/sql_compare.js +1 -1
  6. package/build/src/abap/2_statements/expressions/sql_field.js +10 -3
  7. package/build/src/abap/2_statements/expressions/sql_function.js +2 -1
  8. package/build/src/abap/2_statements/expressions/sql_function_input.js +5 -3
  9. package/build/src/abap/2_statements/expressions/sql_over.js +25 -0
  10. package/build/src/abap/5_syntax/expressions/source.js +1 -1
  11. package/build/src/abap/5_syntax/statements/data.js +5 -2
  12. package/build/src/lsp/help.js +10 -10
  13. package/build/src/objects/_abap_object.js +5 -3
  14. package/build/src/registry.js +1 -1
  15. package/build/src/rules/7bit_ascii.js +4 -4
  16. package/build/src/rules/abapdoc.js +4 -4
  17. package/build/src/rules/add_test_attributes.js +20 -20
  18. package/build/src/rules/align_parameters.js +40 -40
  19. package/build/src/rules/align_type_expressions.js +28 -28
  20. package/build/src/rules/ambiguous_statement.js +7 -7
  21. package/build/src/rules/avoid_use.js +10 -10
  22. package/build/src/rules/begin_end_names.js +4 -4
  23. package/build/src/rules/begin_single_include.js +13 -13
  24. package/build/src/rules/call_transaction_authority_check.js +3 -3
  25. package/build/src/rules/cds_association_name.js +6 -6
  26. package/build/src/rules/cds_comment_style.js +4 -4
  27. package/build/src/rules/cds_field_order.js +12 -12
  28. package/build/src/rules/cds_legacy_view.js +4 -4
  29. package/build/src/rules/cds_naming.js +7 -7
  30. package/build/src/rules/chain_mainly_declarations.js +4 -4
  31. package/build/src/rules/change_if_to_case.js +8 -8
  32. package/build/src/rules/check_abstract.js +2 -2
  33. package/build/src/rules/check_comments.js +4 -4
  34. package/build/src/rules/check_include.js +4 -4
  35. package/build/src/rules/check_subrc.js +8 -8
  36. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  37. package/build/src/rules/commented_code.js +1 -1
  38. package/build/src/rules/constructor_visibility_public.js +4 -4
  39. package/build/src/rules/contains_tab.js +2 -2
  40. package/build/src/rules/cyclic_oo.js +4 -4
  41. package/build/src/rules/dangerous_statement.js +1 -1
  42. package/build/src/rules/definitions_top.js +6 -6
  43. package/build/src/rules/downport.js +83 -83
  44. package/build/src/rules/easy_to_find_messages.js +6 -6
  45. package/build/src/rules/empty_event.js +6 -6
  46. package/build/src/rules/empty_line_in_statement.js +2 -2
  47. package/build/src/rules/empty_structure.js +6 -6
  48. package/build/src/rules/exit_or_check.js +3 -3
  49. package/build/src/rules/expand_macros.js +5 -5
  50. package/build/src/rules/exporting.js +1 -1
  51. package/build/src/rules/forbidden_identifier.js +1 -1
  52. package/build/src/rules/forbidden_void_type.js +2 -2
  53. package/build/src/rules/fully_type_itabs.js +2 -2
  54. package/build/src/rules/function_module_recommendations.js +39 -0
  55. package/build/src/rules/functional_writing.js +17 -17
  56. package/build/src/rules/global_class.js +10 -10
  57. package/build/src/rules/identical_conditions.js +12 -12
  58. package/build/src/rules/identical_contents.js +14 -14
  59. package/build/src/rules/identical_descriptions.js +6 -6
  60. package/build/src/rules/identical_move.js +2 -2
  61. package/build/src/rules/if_in_if.js +35 -35
  62. package/build/src/rules/implement_methods.js +3 -3
  63. package/build/src/rules/implicit_start_of_selection.js +4 -4
  64. package/build/src/rules/in_statement_indentation.js +11 -11
  65. package/build/src/rules/indentation.js +16 -16
  66. package/build/src/rules/intf_referencing_clas.js +3 -3
  67. package/build/src/rules/invalid_table_index.js +2 -2
  68. package/build/src/rules/line_break_style.js +2 -2
  69. package/build/src/rules/line_length.js +1 -1
  70. package/build/src/rules/line_only_punc.js +1 -1
  71. package/build/src/rules/local_variable_names.js +6 -6
  72. package/build/src/rules/macro_naming.js +2 -2
  73. package/build/src/rules/main_file_contents.js +4 -4
  74. package/build/src/rules/many_parentheses.js +10 -10
  75. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  76. package/build/src/rules/max_one_statement.js +5 -5
  77. package/build/src/rules/method_length.js +2 -2
  78. package/build/src/rules/method_overwrites_builtin.js +12 -12
  79. package/build/src/rules/mix_returning.js +8 -8
  80. package/build/src/rules/nesting.js +1 -1
  81. package/build/src/rules/no_chained_assignment.js +1 -1
  82. package/build/src/rules/no_external_form_calls.js +2 -2
  83. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  84. package/build/src/rules/no_prefixes.js +6 -6
  85. package/build/src/rules/no_public_attributes.js +1 -1
  86. package/build/src/rules/no_yoda_conditions.js +4 -4
  87. package/build/src/rules/nrob_consistency.js +2 -2
  88. package/build/src/rules/obsolete_statement.js +51 -51
  89. package/build/src/rules/omit_parameter_name.js +3 -3
  90. package/build/src/rules/omit_receiving.js +13 -13
  91. package/build/src/rules/parser_702_chaining.js +2 -2
  92. package/build/src/rules/parser_error.js +2 -2
  93. package/build/src/rules/parser_missing_space.js +1 -1
  94. package/build/src/rules/prefer_inline.js +16 -16
  95. package/build/src/rules/prefer_is_not.js +9 -9
  96. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  97. package/build/src/rules/prefer_returning_to_exporting.js +4 -4
  98. package/build/src/rules/prefer_xsdbool.js +2 -2
  99. package/build/src/rules/preferred_compare_operator.js +2 -2
  100. package/build/src/rules/reduce_procedural_code.js +17 -17
  101. package/build/src/rules/remove_descriptions.js +4 -4
  102. package/build/src/rules/rfc_error_handling.js +7 -7
  103. package/build/src/rules/select_add_order_by.js +5 -5
  104. package/build/src/rules/select_performance.js +5 -5
  105. package/build/src/rules/select_single_full_key.js +2 -2
  106. package/build/src/rules/sicf_consistency.js +2 -2
  107. package/build/src/rules/slow_parameter_passing.js +16 -16
  108. package/build/src/rules/space_before_dot.js +2 -2
  109. package/build/src/rules/sql_value_conversion.js +6 -6
  110. package/build/src/rules/start_at_tab.js +1 -1
  111. package/build/src/rules/strict_sql.js +6 -6
  112. package/build/src/rules/sy_modification.js +6 -6
  113. package/build/src/rules/tabl_enhancement_category.js +2 -2
  114. package/build/src/rules/tables_declared_locally.js +2 -2
  115. package/build/src/rules/type_form_parameters.js +2 -2
  116. package/build/src/rules/unnecessary_pragma.js +29 -29
  117. package/build/src/rules/unnecessary_return.js +11 -11
  118. package/build/src/rules/unused_macros.js +6 -6
  119. package/build/src/rules/unused_methods.js +12 -12
  120. package/build/src/rules/unused_variables.js +12 -12
  121. package/build/src/rules/use_bool_expression.js +8 -8
  122. package/build/src/rules/use_class_based_exceptions.js +8 -8
  123. package/build/src/rules/use_line_exists.js +6 -6
  124. package/build/src/rules/use_new.js +4 -4
  125. package/build/src/rules/when_others_last.js +6 -6
  126. package/build/src/rules/xml_consistency.js +3 -3
  127. 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
@@ -2592,6 +2592,7 @@ declare namespace Expressions {
2592
2592
  SQLIntoTable,
2593
2593
  SQLJoin,
2594
2594
  SQLOrderBy,
2595
+ SQLOver,
2595
2596
  SQLPath,
2596
2597
  SQLSourceNoSpace,
2597
2598
  SQLSourceSimple,
@@ -6472,6 +6473,10 @@ declare class SQLOrderBy extends Expression {
6472
6473
  getRunnable(): IStatementRunnable;
6473
6474
  }
6474
6475
 
6476
+ declare class SQLOver extends Expression {
6477
+ getRunnable(): IStatementRunnable;
6478
+ }
6479
+
6475
6480
  declare class SQLPath extends Expression {
6476
6481
  getRunnable(): IStatementRunnable;
6477
6482
  }
@@ -205,6 +205,8 @@ __exportStar(require("./sql_into_structure"), exports);
205
205
  __exportStar(require("./sql_into_table"), exports);
206
206
  __exportStar(require("./sql_join"), exports);
207
207
  __exportStar(require("./sql_order_by"), exports);
208
+ __exportStar(require("./sql_over"), exports);
209
+ __exportStar(require("./sql_over"), exports);
208
210
  __exportStar(require("./sql_path"), exports);
209
211
  __exportStar(require("./sql_source_no_space"), exports);
210
212
  __exportStar(require("./sql_source_simple"), exports);
@@ -3,19 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SQLAggregation = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const tokens_1 = require("../../1_lexer/tokens");
6
- const _1 = require(".");
7
- const dynamic_1 = require("./dynamic");
8
- const sql_arithmetics_1 = require("./sql_arithmetics");
6
+ const version_1 = require("../../../version");
7
+ const sql_function_input_1 = require("./sql_function_input");
8
+ const sql_field_name_1 = require("./sql_field_name");
9
+ const sql_over_1 = require("./sql_over");
10
+ const lparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
11
+ const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
9
12
  class SQLAggregation extends combi_1.Expression {
10
13
  getRunnable() {
11
- const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(_1.SQLCase, sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction));
12
- const fparen = (0, combi_1.seq)("(", _1.Field, ")");
13
- const count = (0, combi_1.seq)("COUNT", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", _1.Field, fparen), ")");
14
- const max = (0, combi_1.seq)("MAX", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
15
- const min = (0, combi_1.seq)("MIN", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
16
- const sum = (0, combi_1.seq)("SUM", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
17
- const avg = (0, combi_1.seq)("AVG", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
18
- return (0, combi_1.altPrio)(count, max, min, sum, avg);
14
+ const arg = (0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v740sp08, sql_function_input_1.SQLFunctionInput), sql_field_name_1.SQLFieldName);
15
+ const avgRparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
16
+ const lenDecimals = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ",", sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW));
17
+ const avgCastType = (0, combi_1.altPrio)((0, combi_1.seq)("DEC", lenDecimals), (0, combi_1.seq)("CURR", lenDecimals), (0, combi_1.seq)("QUAN", lenDecimals), "D16N", "D34N", "FLTP");
18
+ const count = (0, combi_1.seq)("COUNT", lparen, (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", arg), rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
19
+ const max = (0, combi_1.seq)("MAX", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
20
+ const min = (0, combi_1.seq)("MIN", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
21
+ const sum = (0, combi_1.seq)("SUM", lparen, (0, combi_1.optPrio)("DISTINCT"), arg, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
22
+ const avg = (0, combi_1.seq)("AVG", (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)("DISTINCT"), arg, (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("AS", avgCastType))), avgRparen, (0, combi_1.optPrio)(sql_over_1.SQLOver));
23
+ const rank = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("ROW_NUMBER", "RANK", "DENSE_RANK"), lparen, rparen, sql_over_1.SQLOver));
24
+ const leadLag = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("LEAD", "LAG"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput)))), rparen, sql_over_1.SQLOver));
25
+ const firstLastValue = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("FIRST_VALUE", "LAST_VALUE"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, sql_over_1.SQLOver));
26
+ const stringAgg = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("STRING_AGG", (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.optPrio)((0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput)), rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
27
+ const ntile = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("NTILE", (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, sql_over_1.SQLOver));
28
+ const corr = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("CORR_SPEARMAN", "CORR"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ",", sql_function_input_1.SQLFunctionInput, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
29
+ const stat = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.altPrio)("PRODUCT", "MEDIAN", "VAR", "STDDEV"), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, rparen, (0, combi_1.optPrio)(sql_over_1.SQLOver)));
30
+ return (0, combi_1.altPrio)(rank, leadLag, firstLastValue, stringAgg, ntile, corr, stat, count, max, min, sum, avg);
19
31
  }
20
32
  }
21
33
  exports.SQLAggregation = SQLAggregation;
@@ -17,7 +17,7 @@ class SQLCompare extends combi_1.Expression {
17
17
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)), version_1.Version.OpenABAP);
18
18
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
19
19
  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)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
20
- const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
20
+ const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
21
21
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
22
22
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
23
23
  }
@@ -13,10 +13,17 @@ class SQLField extends combi_1.Expression {
13
13
  const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleFieldChain2, atParen)), version_1.Version.OpenABAP);
14
14
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
15
15
  const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
16
- const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
16
+ const fieldNoAgg = (0, combi_1.altPrio)(_1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
17
+ const field = (0, combi_1.altPrio)(_1.SQLAggregation, fieldNoAgg);
17
18
  const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
18
- const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
19
- const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
19
+ const parenFieldNoAgg = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), fieldNoAgg, (0, combi_1.tok)(tokens_1.WParenRightW));
20
+ // arithmetic without aggregates as operands: from v740sp05
21
+ const subNoAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenFieldNoAgg, fieldNoAgg)));
22
+ const arithNoAgg = (0, combi_1.ver)(version_1.Version.v740sp05, subNoAgg);
23
+ // arithmetic with aggregates as operands: from v754
24
+ const subWithAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
25
+ const arithWithAgg = (0, combi_1.ver)(version_1.Version.v754, subWithAgg);
26
+ const arith = (0, combi_1.altPrio)(arithWithAgg, arithNoAgg);
20
27
  const arithSequence = (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith));
21
28
  const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
22
29
  return (0, combi_1.seq)((0, combi_1.altPrio)(parenArithSequence, arithSequence), (0, combi_1.optPrio)(as));
@@ -40,7 +40,8 @@ class SQLFunction extends combi_1.Expression {
40
40
  const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
41
41
  const right = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^right$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
42
42
  const left = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^left$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
43
- return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months);
43
+ const division = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^division$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
44
+ return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months, division);
44
45
  }
45
46
  }
46
47
  exports.SQLFunction = SQLFunction;
@@ -11,11 +11,13 @@ const simple_source3_1 = require("./simple_source3");
11
11
  const source_1 = require("./source");
12
12
  const sql_aggregation_1 = require("./sql_aggregation");
13
13
  const sql_function_1 = require("./sql_function");
14
+ const sql_case_1 = require("./sql_case");
14
15
  class SQLFunctionInput extends combi_1.Expression {
15
16
  getRunnable() {
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.altPrio)(simple_source3_1.SimpleSource3, paren)));
18
- const param = (0, combi_1.altPrio)(sql_function_1.SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
17
+ const hostParen = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
18
+ 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, hostParen)));
19
+ const parenInput = (0, combi_1.seq)("(", SQLFunctionInput, ")");
20
+ const param = (0, combi_1.altPrio)(parenInput, sql_case_1.SQLCase, sql_function_1.SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
19
21
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/", "&&");
20
22
  return (0, combi_1.seq)(param, (0, combi_1.starPrio)((0, combi_1.seq)(operator, param)));
21
23
  }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SQLOver = void 0;
4
+ const version_1 = require("../../../version");
5
+ const tokens_1 = require("../../1_lexer/tokens");
6
+ const combi_1 = require("../combi");
7
+ const sql_function_input_1 = require("./sql_function_input");
8
+ const sql_source_1 = require("./sql_source");
9
+ const sql_order_by_1 = require("./sql_order_by");
10
+ const lparen = (0, combi_1.tok)(tokens_1.ParenLeftW);
11
+ const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight));
12
+ class SQLOver extends combi_1.Expression {
13
+ getRunnable() {
14
+ const partitionBy = (0, combi_1.seq)("PARTITION", "BY", (0, combi_1.plus)((0, combi_1.seq)(sql_function_input_1.SQLFunctionInput, (0, combi_1.opt)(","))));
15
+ const unboundedPreceding = (0, combi_1.seq)("UNBOUNDED", "PRECEDING");
16
+ const unboundedFollowing = (0, combi_1.seq)("UNBOUNDED", "FOLLOWING");
17
+ const currentRow = (0, combi_1.seq)("CURRENT", "ROW");
18
+ const numBound = (0, combi_1.seq)(sql_source_1.SQLSource, (0, combi_1.altPrio)("PRECEDING", "FOLLOWING"));
19
+ const bound = (0, combi_1.altPrio)(unboundedPreceding, unboundedFollowing, currentRow, numBound);
20
+ const windowFrameSpec = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("ROWS", "BETWEEN", bound, "AND", bound));
21
+ return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("OVER", lparen, (0, combi_1.optPrio)(partitionBy), (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), (0, combi_1.optPrio)(windowFrameSpec), rparen));
22
+ }
23
+ }
24
+ exports.SQLOver = SQLOver;
25
+ //# sourceMappingURL=sql_over.js.map
@@ -303,7 +303,7 @@ class Source {
303
303
  if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
304
304
  return context;
305
305
  }
306
- else if (context instanceof basic_1.IntegerType && (found === null || found === void 0 ? void 0 : found.isGeneric())) {
306
+ else if ((context instanceof basic_1.IntegerType || context instanceof basic_1.FloatType) && (found === null || found === void 0 ? void 0 : found.isGeneric())) {
307
307
  return context;
308
308
  }
309
309
  else {
@@ -13,7 +13,7 @@ class Data {
13
13
  const dd = node.findFirstExpression(Expressions.DataDefinition);
14
14
  if (dd) {
15
15
  const id = data_definition_1.DataDefinition.runSyntax(dd, input);
16
- if (id && this.isOnlyDigits(id.getName())) {
16
+ if (id && this.isOnlyDigits(id.getName()) && this.allowOnlyDigitsName(node, input) === false) {
17
17
  const message = "not possible to have a name with only digits";
18
18
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, id.getToken(), message));
19
19
  return new _typed_identifier_1.TypedIdentifier(id.getToken(), input.filename, basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey));
@@ -27,7 +27,7 @@ class Data {
27
27
  return id;
28
28
  }
29
29
  if (name) {
30
- if (this.isOnlyDigits(name.concatTokens())) {
30
+ if (this.isOnlyDigits(name.concatTokens()) && this.allowOnlyDigitsName(node, input) === false) {
31
31
  const message = "not possible to have a name with only digits";
32
32
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, name.getFirstToken(), message));
33
33
  }
@@ -38,6 +38,9 @@ class Data {
38
38
  isOnlyDigits(name) {
39
39
  return /^[0-9]+$/.test(name);
40
40
  }
41
+ allowOnlyDigitsName(node, input) {
42
+ return input.scope.isAnyOO() === false && node.getColon() !== undefined;
43
+ }
41
44
  }
42
45
  exports.Data = Data;
43
46
  //# sourceMappingURL=data.js.map
@@ -51,13 +51,13 @@ class Help {
51
51
  }
52
52
  static dumpABAP(file, reg, textDocument, position) {
53
53
  let content = "";
54
- content = `
55
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
56
- <a href="#_statements" rel="no-refresh">Statements</a> |
57
- <a href="#_structure" rel="no-refresh">Structure</a> |
58
- <a href="#_files" rel="no-refresh">Files</a> |
59
- <a href="#_info" rel="no-refresh">Info Dump</a>
60
- <hr>
54
+ content = `
55
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
56
+ <a href="#_statements" rel="no-refresh">Statements</a> |
57
+ <a href="#_structure" rel="no-refresh">Structure</a> |
58
+ <a href="#_files" rel="no-refresh">Files</a> |
59
+ <a href="#_info" rel="no-refresh">Info Dump</a>
60
+ <hr>
61
61
  ` +
62
62
  "<tt>" + textDocument.uri + " (" +
63
63
  (position.line + 1) + ", " +
@@ -212,9 +212,9 @@ class Help {
212
212
  return ret + "</ul>";
213
213
  }
214
214
  static tokens(file) {
215
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
216
- <td><b>Row</b></td><td><b>Column</b></td>
217
- <td><b>vRow</b></td><td><b>vColumn</b></td>
215
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
216
+ <td><b>Row</b></td><td><b>Column</b></td>
217
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
218
218
  </tr>`;
219
219
  for (const token of file.getTokens()) {
220
220
  const tStart = token.getStart();
@@ -104,9 +104,11 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
104
104
  }
105
105
  for (const t of (0, xml_utils_1.xmlToArray)(parsed.abapGit["asx:abap"]["asx:values"].TPOOL.item)) {
106
106
  const id = (_e = t.ID) === null || _e === void 0 ? void 0 : _e.toUpperCase();
107
- if (id === undefined
108
- || (id !== "R" && t.KEY === undefined)) {
109
- throw new Error("findTexts, undefined");
107
+ if (id === undefined) {
108
+ continue;
109
+ }
110
+ if (id !== "R" && t.KEY === undefined) {
111
+ continue;
110
112
  }
111
113
  const key = (_g = ((_f = t.KEY) !== null && _f !== void 0 ? _f : t.ID)) === null || _g === void 0 ? void 0 : _g.toUpperCase();
112
114
  if (key === undefined) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.119.23";
77
+ return "2.119.25";
78
78
  }
79
79
  getDDICReferences() {
80
80
  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
  badExample: `WRITE '뽑'.`,
@@ -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
  };
@@ -21,27 +21,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
21
21
  title: "Add test attributes for tests classes with test methods",
22
22
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
23
23
  tags: [_irule_1.RuleTag.SingleFile],
24
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
25
- PUBLIC SECTION.
26
- PROTECTED SECTION.
27
- PRIVATE SECTION.
28
- METHODS test FOR TESTING RAISING cx_static_check.
29
- ENDCLASS.
30
-
31
- CLASS ltcl_test1 IMPLEMENTATION.
32
- METHOD test.
33
- ENDMETHOD.
24
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
25
+ PUBLIC SECTION.
26
+ PROTECTED SECTION.
27
+ PRIVATE SECTION.
28
+ METHODS test FOR TESTING RAISING cx_static_check.
29
+ ENDCLASS.
30
+
31
+ CLASS ltcl_test1 IMPLEMENTATION.
32
+ METHOD test.
33
+ ENDMETHOD.
34
34
  ENDCLASS.`,
35
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
36
- PUBLIC SECTION.
37
- PROTECTED SECTION.
38
- PRIVATE SECTION.
39
- METHODS test FOR TESTING RAISING cx_static_check.
40
- ENDCLASS.
41
-
42
- CLASS ltcl_test2 IMPLEMENTATION.
43
- METHOD test.
44
- ENDMETHOD.
35
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
36
+ PUBLIC SECTION.
37
+ PROTECTED SECTION.
38
+ PRIVATE SECTION.
39
+ METHODS test FOR TESTING RAISING cx_static_check.
40
+ ENDCLASS.
41
+
42
+ CLASS ltcl_test2 IMPLEMENTATION.
43
+ METHOD test.
44
+ ENDMETHOD.
45
45
  ENDCLASS.`,
46
46
  };
47
47
  }
@@ -22,49 +22,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
22
22
  key: "align_parameters",
23
23
  title: "Align Parameters",
24
24
  shortDescription: `Checks for vertially aligned parameters`,
25
- extendedInformation: `Checks:
26
- * function module calls
27
- * method calls
28
- * VALUE constructors
29
- * NEW constructors
30
- * RAISE EXCEPTION statements
31
- * CREATE OBJECT statements
32
- * RAISE EVENT statements
33
-
34
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
35
-
36
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
37
-
38
- If parameters are on the same row, no issues are reported, see
25
+ extendedInformation: `Checks:
26
+ * function module calls
27
+ * method calls
28
+ * VALUE constructors
29
+ * NEW constructors
30
+ * RAISE EXCEPTION statements
31
+ * CREATE OBJECT statements
32
+ * RAISE EVENT statements
33
+
34
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
35
+
36
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
37
+
38
+ If parameters are on the same row, no issues are reported, see
39
39
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
40
40
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
41
- badExample: `CALL FUNCTION 'FOOBAR'
42
- EXPORTING
43
- foo = 2
44
- parameter = 3.
45
-
46
- foobar( moo = 1
47
- param = 1 ).
48
-
49
- foo = VALUE #(
50
- foo = bar
41
+ badExample: `CALL FUNCTION 'FOOBAR'
42
+ EXPORTING
43
+ foo = 2
44
+ parameter = 3.
45
+
46
+ foobar( moo = 1
47
+ param = 1 ).
48
+
49
+ foo = VALUE #(
50
+ foo = bar
51
51
  moo = 2 ).`,
52
- goodExample: `CALL FUNCTION 'FOOBAR'
53
- EXPORTING
54
- foo = 2
55
- parameter = 3.
56
-
57
- foobar( moo = 1
58
- param = 1 ).
59
-
60
- foo = VALUE #(
61
- foo = bar
62
- moo = 2 ).
63
-
64
- DATA(sdf) = VALUE type(
65
- common_val = 2
66
- another_common = 5
67
- ( row_value = 4
52
+ goodExample: `CALL FUNCTION 'FOOBAR'
53
+ EXPORTING
54
+ foo = 2
55
+ parameter = 3.
56
+
57
+ foobar( moo = 1
58
+ param = 1 ).
59
+
60
+ foo = VALUE #(
61
+ foo = bar
62
+ moo = 2 ).
63
+
64
+ DATA(sdf) = VALUE type(
65
+ common_val = 2
66
+ another_common = 5
67
+ ( row_value = 4
68
68
  value_foo = 5 ) ).`,
69
69
  };
70
70
  }
@@ -30,37 +30,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
30
30
  key: "align_type_expressions",
31
31
  title: "Align TYPE expressions",
32
32
  shortDescription: `Align TYPE expressions in statements`,
33
- extendedInformation: `
34
- Currently works for METHODS + BEGIN OF
35
-
36
- If BEGIN OF has an INCLUDE TYPE its ignored
37
-
38
- Also note that clean ABAP does not recommend aligning TYPE clauses:
33
+ extendedInformation: `
34
+ Currently works for METHODS + BEGIN OF
35
+
36
+ If BEGIN OF has an INCLUDE TYPE its ignored
37
+
38
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
39
39
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
40
40
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
41
- badExample: `
42
- TYPES: BEGIN OF foo,
43
- bar TYPE i,
44
- foobar TYPE i,
45
- END OF foo.
46
-
47
- INTERFACE lif.
48
- METHODS bar
49
- IMPORTING
50
- foo TYPE i
51
- foobar TYPE i.
41
+ badExample: `
42
+ TYPES: BEGIN OF foo,
43
+ bar TYPE i,
44
+ foobar TYPE i,
45
+ END OF foo.
46
+
47
+ INTERFACE lif.
48
+ METHODS bar
49
+ IMPORTING
50
+ foo TYPE i
51
+ foobar TYPE i.
52
52
  ENDINTERFACE.`,
53
- goodExample: `
54
- TYPES: BEGIN OF foo,
55
- bar TYPE i,
56
- foobar TYPE i,
57
- END OF foo.
58
-
59
- INTERFACE lif.
60
- METHODS bar
61
- IMPORTING
62
- foo TYPE i
63
- foobar TYPE i.
53
+ goodExample: `
54
+ TYPES: BEGIN OF foo,
55
+ bar TYPE i,
56
+ foobar TYPE i,
57
+ END OF foo.
58
+
59
+ INTERFACE lif.
60
+ METHODS bar
61
+ IMPORTING
62
+ foo TYPE i
63
+ foobar TYPE i.
64
64
  ENDINTERFACE.`,
65
65
  };
66
66
  }
@@ -20,16 +20,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
20
20
  return {
21
21
  key: "ambiguous_statement",
22
22
  title: "Check for ambigious statements",
23
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
24
- Add "TABLE" keyword or "@" for escaping SQL variables
25
-
23
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
24
+ Add "TABLE" keyword or "@" for escaping SQL variables
25
+
26
26
  Only works if the target version is 740sp05 or above`,
27
27
  tags: [_irule_1.RuleTag.SingleFile],
28
- badExample: `DELETE foo FROM bar.
28
+ badExample: `DELETE foo FROM bar.
29
29
  MODIFY foo FROM bar.`,
30
- goodExample: `DELETE foo FROM @bar.
31
- DELETE TABLE itab FROM 2.
32
- MODIFY zfoo FROM @wa.
30
+ goodExample: `DELETE foo FROM @bar.
31
+ DELETE TABLE itab FROM 2.
32
+ MODIFY zfoo FROM @wa.
33
33
  MODIFY TABLE foo FROM bar.`,
34
34
  };
35
35
  }
@@ -44,16 +44,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
44
44
  key: "avoid_use",
45
45
  title: "Avoid use of certain statements",
46
46
  shortDescription: `Detects usage of certain statements.`,
47
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
48
-
49
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
50
-
51
- STATICS: use CLASS-DATA instead
52
-
53
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54
-
55
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
56
-
47
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
48
+
49
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
50
+
51
+ STATICS: use CLASS-DATA instead
52
+
53
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54
+
55
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
56
+
57
57
  BREAK points`,
58
58
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
59
59
  };
@@ -24,11 +24,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
24
24
  title: "Check BEGIN END names",
25
25
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
26
26
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
27
- badExample: `DATA: BEGIN OF stru,
28
- field TYPE i,
27
+ badExample: `DATA: BEGIN OF stru,
28
+ field TYPE i,
29
29
  END OF structure_not_the_same.`,
30
- goodExample: `DATA: BEGIN OF stru,
31
- field TYPE i,
30
+ goodExample: `DATA: BEGIN OF stru,
31
+ field TYPE i,
32
32
  END OF stru.`,
33
33
  };
34
34
  }
@@ -21,20 +21,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
21
21
  title: "BEGIN contains single INCLUDE",
22
22
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
23
23
  tags: [_irule_1.RuleTag.SingleFile],
24
- badExample: `TYPES: BEGIN OF dummy1.
25
- INCLUDE TYPE dselc.
26
- TYPES: END OF dummy1.
27
-
28
- DATA BEGIN OF foo.
29
- INCLUDE STRUCTURE syst.
30
- DATA END OF foo.
31
-
32
- STATICS BEGIN OF bar.
33
- INCLUDE STRUCTURE syst.
24
+ badExample: `TYPES: BEGIN OF dummy1.
25
+ INCLUDE TYPE dselc.
26
+ TYPES: END OF dummy1.
27
+
28
+ DATA BEGIN OF foo.
29
+ INCLUDE STRUCTURE syst.
30
+ DATA END OF foo.
31
+
32
+ STATICS BEGIN OF bar.
33
+ INCLUDE STRUCTURE syst.
34
34
  STATICS END OF bar.`,
35
- goodExample: `DATA BEGIN OF foo.
36
- DATA field TYPE i.
37
- INCLUDE STRUCTURE dselc.
35
+ goodExample: `DATA BEGIN OF foo.
36
+ DATA field TYPE i.
37
+ INCLUDE STRUCTURE dselc.
38
38
  DATA END OF foo.`,
39
39
  };
40
40
  }