@abaplint/core 2.105.4 → 2.105.5

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 (111) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +37 -11
  3. package/build/src/abap/5_syntax/_builtin.js +202 -193
  4. package/build/src/abap/5_syntax/_current_scope.js +15 -11
  5. package/build/src/abap/5_syntax/basic_types.js +2 -2
  6. package/build/src/abap/5_syntax/expressions/field_chain.js +2 -2
  7. package/build/src/abap/5_syntax/expressions/method_call_param.js +7 -2
  8. package/build/src/abap/5_syntax/expressions/target.js +11 -0
  9. package/build/src/abap/5_syntax/spaghetti_scope.js +8 -21
  10. package/build/src/abap/5_syntax/statements/catch.js +3 -3
  11. package/build/src/abap/5_syntax/statements/class_local_friends.js +1 -1
  12. package/build/src/abap/5_syntax/statements/raise.js +2 -2
  13. package/build/src/abap/flow/flow_graph.js +7 -7
  14. package/build/src/abap/types/basic/void_type.js +2 -2
  15. package/build/src/lsp/help.js +7 -7
  16. package/build/src/objects/neptune_api.js +1 -1
  17. package/build/src/registry.js +1 -1
  18. package/build/src/rules/7bit_ascii.js +4 -4
  19. package/build/src/rules/abapdoc.js +4 -4
  20. package/build/src/rules/align_parameters.js +40 -40
  21. package/build/src/rules/ambiguous_statement.js +6 -6
  22. package/build/src/rules/avoid_use.js +10 -10
  23. package/build/src/rules/begin_end_names.js +4 -4
  24. package/build/src/rules/begin_single_include.js +12 -12
  25. package/build/src/rules/call_transaction_authority_check.js +3 -3
  26. package/build/src/rules/cds_comment_style.js +4 -4
  27. package/build/src/rules/cds_legacy_view.js +4 -4
  28. package/build/src/rules/chain_mainly_declarations.js +4 -4
  29. package/build/src/rules/change_if_to_case.js +8 -8
  30. package/build/src/rules/check_abstract.js +2 -2
  31. package/build/src/rules/check_comments.js +4 -4
  32. package/build/src/rules/check_include.js +3 -3
  33. package/build/src/rules/check_subrc.js +8 -8
  34. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  35. package/build/src/rules/commented_code.js +1 -1
  36. package/build/src/rules/constructor_visibility_public.js +4 -4
  37. package/build/src/rules/contains_tab.js +2 -2
  38. package/build/src/rules/cyclic_oo.js +4 -4
  39. package/build/src/rules/dangerous_statement.js +1 -1
  40. package/build/src/rules/definitions_top.js +6 -6
  41. package/build/src/rules/downport.js +82 -82
  42. package/build/src/rules/easy_to_find_messages.js +6 -6
  43. package/build/src/rules/empty_line_in_statement.js +2 -2
  44. package/build/src/rules/exit_or_check.js +3 -3
  45. package/build/src/rules/expand_macros.js +5 -5
  46. package/build/src/rules/exporting.js +1 -1
  47. package/build/src/rules/forbidden_identifier.js +1 -1
  48. package/build/src/rules/forbidden_void_type.js +2 -2
  49. package/build/src/rules/fully_type_itabs.js +1 -1
  50. package/build/src/rules/functional_writing.js +17 -17
  51. package/build/src/rules/global_class.js +8 -8
  52. package/build/src/rules/identical_conditions.js +2 -2
  53. package/build/src/rules/identical_contents.js +14 -14
  54. package/build/src/rules/identical_descriptions.js +6 -6
  55. package/build/src/rules/if_in_if.js +35 -35
  56. package/build/src/rules/implement_methods.js +3 -3
  57. package/build/src/rules/in_statement_indentation.js +11 -11
  58. package/build/src/rules/intf_referencing_clas.js +3 -3
  59. package/build/src/rules/line_break_style.js +2 -2
  60. package/build/src/rules/line_length.js +1 -1
  61. package/build/src/rules/line_only_punc.js +1 -1
  62. package/build/src/rules/local_variable_names.js +2 -2
  63. package/build/src/rules/main_file_contents.js +4 -4
  64. package/build/src/rules/many_parentheses.js +10 -10
  65. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  66. package/build/src/rules/max_one_statement.js +5 -5
  67. package/build/src/rules/method_length.js +2 -2
  68. package/build/src/rules/method_overwrites_builtin.js +4 -4
  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 +1 -1
  87. package/build/src/rules/prefer_xsdbool.js +2 -2
  88. package/build/src/rules/reduce_procedural_code.js +17 -17
  89. package/build/src/rules/remove_descriptions.js +4 -4
  90. package/build/src/rules/rfc_error_handling.js +9 -9
  91. package/build/src/rules/select_add_order_by.js +5 -5
  92. package/build/src/rules/select_performance.js +5 -5
  93. package/build/src/rules/select_single_full_key.js +2 -2
  94. package/build/src/rules/sicf_consistency.js +2 -2
  95. package/build/src/rules/space_before_dot.js +2 -2
  96. package/build/src/rules/sql_value_conversion.js +6 -6
  97. package/build/src/rules/start_at_tab.js +1 -1
  98. package/build/src/rules/strict_sql.js +6 -6
  99. package/build/src/rules/sy_modification.js +3 -3
  100. package/build/src/rules/tabl_enhancement_category.js +2 -2
  101. package/build/src/rules/type_form_parameters.js +2 -2
  102. package/build/src/rules/unknown_types.js +2 -1
  103. package/build/src/rules/unnecessary_pragma.js +29 -29
  104. package/build/src/rules/unnecessary_return.js +11 -11
  105. package/build/src/rules/unused_methods.js +11 -11
  106. package/build/src/rules/unused_variables.js +12 -12
  107. package/build/src/rules/use_bool_expression.js +8 -8
  108. package/build/src/rules/use_line_exists.js +6 -6
  109. package/build/src/rules/use_new.js +4 -4
  110. package/build/src/rules/when_others_last.js +6 -6
  111. 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
@@ -531,16 +531,43 @@ declare class BSPApplication extends AbstractObject {
531
531
 
532
532
  export declare class BuiltIn {
533
533
  static readonly filename = "_builtin.prog.abap";
534
- static readonly methods: IBuiltinMethod[];
534
+ private static counter;
535
+ private static readonly getCache;
536
+ static readonly methods: {
537
+ [name: string]: IBuiltinMethod;
538
+ };
535
539
  private row;
536
540
  private buildDefinition;
537
541
  searchBuiltin(name: string | undefined): IMethodDefinition | undefined;
538
542
  isPredicate(name: string | undefined): boolean | undefined;
539
543
  getTypes(): TypedIdentifier[];
540
544
  get(extras: string[]): TypedIdentifier[];
545
+ private buildVariable;
541
546
  private buildSY;
542
547
  private buildConstant;
543
- private buildVariable;
548
+ }
549
+
550
+ declare class BuiltInMethod extends Identifier implements IMethodDefinition, IMethodParameters {
551
+ private readonly method;
552
+ private readonly row;
553
+ constructor(token: Token, filename: string, method: IBuiltinMethod, row: number);
554
+ getRequiredParameters(): readonly TypedIdentifier[];
555
+ getOptional(): readonly string[];
556
+ getAll(): readonly TypedIdentifier[];
557
+ getImporting(): readonly TypedIdentifier[];
558
+ getDefaultImporting(): string | undefined;
559
+ getExporting(): readonly TypedIdentifier[];
560
+ getRaising(): readonly string[];
561
+ getChanging(): readonly TypedIdentifier[];
562
+ getReturning(): TypedIdentifier | undefined;
563
+ getExceptions(): readonly string[];
564
+ getVisibility(): Visibility;
565
+ isRedefinition(): boolean;
566
+ isAbstract(): boolean;
567
+ isStatic(): boolean;
568
+ isEventHandler(): boolean;
569
+ getParameters(): IMethodParameters;
570
+ getParameterDefault(_parameter: string): undefined;
544
571
  }
545
572
 
546
573
  declare class BusinessAddInImplementation extends AbstractObject {
@@ -1362,12 +1389,10 @@ export declare class CurrentScope {
1362
1389
  findObjectDefinition(name: string | undefined): IClassDefinition | IInterfaceDefinition | undefined;
1363
1390
  isBadiDef(name: string): boolean;
1364
1391
  existsObject(name: string | undefined): {
1365
- found: boolean;
1366
- id?: Identifier;
1367
- type?: ReferenceType;
1392
+ id: Identifier | undefined;
1368
1393
  ooType?: IReferenceExtras["ooType"];
1369
1394
  RTTIName?: string;
1370
- };
1395
+ } | undefined;
1371
1396
  /** Lookup class in local and global scope */
1372
1397
  findClassDefinition(name: string | undefined): IClassDefinition | undefined;
1373
1398
  findTypePoolConstant(name: string | undefined): TypedIdentifier | undefined;
@@ -2867,7 +2892,7 @@ declare interface IBadiDefinition {
2867
2892
  }
2868
2893
 
2869
2894
  declare interface IBuiltinMethod {
2870
- name: string;
2895
+ counter: number;
2871
2896
  mandatory?: {
2872
2897
  [key: string]: AbstractType;
2873
2898
  };
@@ -2877,6 +2902,7 @@ declare interface IBuiltinMethod {
2877
2902
  version?: Version;
2878
2903
  predicate?: boolean;
2879
2904
  return: AbstractType;
2905
+ cache?: BuiltInMethod | undefined;
2880
2906
  }
2881
2907
 
2882
2908
  declare class ICFService extends AbstractObject {
@@ -3683,7 +3709,9 @@ declare interface IScopeData {
3683
3709
  cdefs: {
3684
3710
  [name: string]: IClassDefinition;
3685
3711
  };
3686
- idefs: IInterfaceDefinition[];
3712
+ idefs: {
3713
+ [name: string]: IInterfaceDefinition;
3714
+ };
3687
3715
  forms: IFormDefinition[];
3688
3716
  references: IReference[];
3689
3717
  sqlConversion: {
@@ -3730,7 +3758,6 @@ export declare interface ISpaghettiScopeNode {
3730
3758
  listClassDefinitions(): IClassDefinition[];
3731
3759
  listInterfaceDefinitions(): IInterfaceDefinition[];
3732
3760
  findFormDefinition(name: string): IFormDefinition | undefined;
3733
- listFormDefinitions(): IFormDefinition[];
3734
3761
  findInterfaceDefinition(name: string): IInterfaceDefinition | undefined;
3735
3762
  findType(name: string): TypedIdentifier | undefined;
3736
3763
  findVariable(name: string): TypedIdentifier | undefined;
@@ -5681,7 +5708,6 @@ export declare class SpaghettiScopeNode extends ScopeData implements ISpaghettiS
5681
5708
  listClassDefinitions(): IClassDefinition[];
5682
5709
  listInterfaceDefinitions(): IInterfaceDefinition[];
5683
5710
  findFormDefinition(name: string): IFormDefinition | undefined;
5684
- listFormDefinitions(): IFormDefinition[];
5685
5711
  findInterfaceDefinition(name: string): IInterfaceDefinition | undefined;
5686
5712
  findType(name: string): TypedIdentifier | undefined;
5687
5713
  findExtraLikeType(name: string): TypedIdentifier | undefined;
@@ -7000,7 +7026,7 @@ export declare enum Visibility {
7000
7026
 
7001
7027
  declare class VoidType extends AbstractType {
7002
7028
  private readonly voided;
7003
- constructor(voided: string | undefined, name?: string);
7029
+ constructor(voided: string | undefined, qualifiedName?: string);
7004
7030
  getVoided(): string | undefined;
7005
7031
  toABAP(): string;
7006
7032
  toText(): string;