@abaplint/core 2.105.3 → 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 (115) hide show
  1. package/README.md +6 -6
  2. package/build/abaplint.d.ts +71 -35
  3. package/build/src/abap/2_statements/statements/delete_memory.js +2 -1
  4. package/build/src/abap/5_syntax/_builtin.js +202 -193
  5. package/build/src/abap/5_syntax/_current_scope.js +15 -11
  6. package/build/src/abap/5_syntax/_type_utils.js +2 -0
  7. package/build/src/abap/5_syntax/basic_types.js +2 -2
  8. package/build/src/abap/5_syntax/expressions/field_chain.js +2 -2
  9. package/build/src/abap/5_syntax/expressions/method_call_param.js +7 -2
  10. package/build/src/abap/5_syntax/expressions/target.js +11 -0
  11. package/build/src/abap/5_syntax/spaghetti_scope.js +8 -21
  12. package/build/src/abap/5_syntax/statements/catch.js +3 -3
  13. package/build/src/abap/5_syntax/statements/class_local_friends.js +1 -1
  14. package/build/src/abap/5_syntax/statements/raise.js +2 -2
  15. package/build/src/abap/flow/flow_graph.js +7 -7
  16. package/build/src/abap/types/basic/void_type.js +2 -2
  17. package/build/src/lsp/help.js +7 -7
  18. package/build/src/objects/index.js +24 -23
  19. package/build/src/objects/neptune_api.js +1 -1
  20. package/build/src/objects/standard_task.js +21 -0
  21. package/build/src/registry.js +1 -1
  22. package/build/src/rules/7bit_ascii.js +4 -4
  23. package/build/src/rules/abapdoc.js +4 -4
  24. package/build/src/rules/align_parameters.js +40 -40
  25. package/build/src/rules/ambiguous_statement.js +6 -6
  26. package/build/src/rules/avoid_use.js +10 -10
  27. package/build/src/rules/begin_end_names.js +4 -4
  28. package/build/src/rules/begin_single_include.js +12 -12
  29. package/build/src/rules/call_transaction_authority_check.js +3 -3
  30. package/build/src/rules/cds_comment_style.js +4 -4
  31. package/build/src/rules/cds_legacy_view.js +4 -4
  32. package/build/src/rules/chain_mainly_declarations.js +4 -4
  33. package/build/src/rules/change_if_to_case.js +8 -8
  34. package/build/src/rules/check_abstract.js +2 -2
  35. package/build/src/rules/check_comments.js +4 -4
  36. package/build/src/rules/check_include.js +3 -3
  37. package/build/src/rules/check_subrc.js +8 -8
  38. package/build/src/rules/classic_exceptions_overlap.js +10 -10
  39. package/build/src/rules/commented_code.js +1 -1
  40. package/build/src/rules/constructor_visibility_public.js +4 -4
  41. package/build/src/rules/contains_tab.js +2 -2
  42. package/build/src/rules/cyclic_oo.js +4 -4
  43. package/build/src/rules/dangerous_statement.js +1 -1
  44. package/build/src/rules/definitions_top.js +6 -6
  45. package/build/src/rules/downport.js +82 -82
  46. package/build/src/rules/easy_to_find_messages.js +6 -6
  47. package/build/src/rules/empty_line_in_statement.js +2 -2
  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 +1 -1
  54. package/build/src/rules/functional_writing.js +17 -17
  55. package/build/src/rules/global_class.js +8 -8
  56. package/build/src/rules/identical_conditions.js +2 -2
  57. package/build/src/rules/identical_contents.js +14 -14
  58. package/build/src/rules/identical_descriptions.js +6 -6
  59. package/build/src/rules/if_in_if.js +35 -35
  60. package/build/src/rules/implement_methods.js +3 -3
  61. package/build/src/rules/in_statement_indentation.js +11 -11
  62. package/build/src/rules/intf_referencing_clas.js +3 -3
  63. package/build/src/rules/line_break_style.js +2 -2
  64. package/build/src/rules/line_length.js +1 -1
  65. package/build/src/rules/line_only_punc.js +1 -1
  66. package/build/src/rules/local_variable_names.js +2 -2
  67. package/build/src/rules/main_file_contents.js +4 -4
  68. package/build/src/rules/many_parentheses.js +10 -10
  69. package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
  70. package/build/src/rules/max_one_statement.js +5 -5
  71. package/build/src/rules/method_length.js +2 -2
  72. package/build/src/rules/method_overwrites_builtin.js +4 -4
  73. package/build/src/rules/nesting.js +1 -1
  74. package/build/src/rules/no_chained_assignment.js +1 -1
  75. package/build/src/rules/no_external_form_calls.js +2 -2
  76. package/build/src/rules/no_inline_in_optional_branches.js +11 -11
  77. package/build/src/rules/no_prefixes.js +6 -6
  78. package/build/src/rules/no_public_attributes.js +1 -1
  79. package/build/src/rules/no_yoda_conditions.js +4 -4
  80. package/build/src/rules/nrob_consistency.js +2 -2
  81. package/build/src/rules/obsolete_statement.js +51 -51
  82. package/build/src/rules/omit_parameter_name.js +3 -3
  83. package/build/src/rules/omit_receiving.js +13 -13
  84. package/build/src/rules/parser_702_chaining.js +2 -2
  85. package/build/src/rules/parser_error.js +2 -2
  86. package/build/src/rules/parser_missing_space.js +1 -1
  87. package/build/src/rules/prefer_inline.js +16 -16
  88. package/build/src/rules/prefer_is_not.js +9 -9
  89. package/build/src/rules/prefer_raise_exception_new.js +5 -5
  90. package/build/src/rules/prefer_returning_to_exporting.js +1 -1
  91. package/build/src/rules/prefer_xsdbool.js +2 -2
  92. package/build/src/rules/reduce_procedural_code.js +17 -17
  93. package/build/src/rules/remove_descriptions.js +4 -4
  94. package/build/src/rules/rfc_error_handling.js +9 -9
  95. package/build/src/rules/select_add_order_by.js +5 -5
  96. package/build/src/rules/select_performance.js +5 -5
  97. package/build/src/rules/select_single_full_key.js +2 -2
  98. package/build/src/rules/sicf_consistency.js +2 -2
  99. package/build/src/rules/space_before_dot.js +2 -2
  100. package/build/src/rules/sql_value_conversion.js +6 -6
  101. package/build/src/rules/start_at_tab.js +1 -1
  102. package/build/src/rules/strict_sql.js +6 -6
  103. package/build/src/rules/sy_modification.js +3 -3
  104. package/build/src/rules/tabl_enhancement_category.js +2 -2
  105. package/build/src/rules/type_form_parameters.js +2 -2
  106. package/build/src/rules/unknown_types.js +2 -1
  107. package/build/src/rules/unnecessary_pragma.js +29 -29
  108. package/build/src/rules/unnecessary_return.js +11 -11
  109. package/build/src/rules/unused_methods.js +11 -11
  110. package/build/src/rules/unused_variables.js +12 -12
  111. package/build/src/rules/use_bool_expression.js +8 -8
  112. package/build/src/rules/use_line_exists.js +6 -6
  113. package/build/src/rules/use_new.js +4 -4
  114. package/build/src/rules/when_others_last.js +6 -6
  115. 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;
@@ -4676,6 +4703,29 @@ declare namespace Objects {
4676
4703
  MessagingChannel,
4677
4704
  MIMEObject,
4678
4705
  Namespace,
4706
+ NeptuneAPI,
4707
+ NeptuneApp,
4708
+ NeptuneCustomColor,
4709
+ NeptuneCustomJSHelper,
4710
+ NeptuneDocumentation,
4711
+ NeptuneEnhancement,
4712
+ NeptuneLaunchpadLayout,
4713
+ NeptuneLaunchpad,
4714
+ NeptuneLoginPage,
4715
+ NeptuneMediaLibrary,
4716
+ NeptuneMediaPack,
4717
+ NeptuneMetadata,
4718
+ NeptuneMobileClient,
4719
+ NeptuneOData,
4720
+ NeptunePolicy,
4721
+ NeptuneRFCMapping,
4722
+ NeptuneRichTextTemplate,
4723
+ NeptuneSplashScreen,
4724
+ NeptuneStickyBanner,
4725
+ NeptuneTileGroup,
4726
+ NeptuneTileLayout,
4727
+ NeptuneTile,
4728
+ NeptuneURLAlias,
4679
4729
  NumberRange,
4680
4730
  Oauth2Profile,
4681
4731
  ObjectCharacteristic,
@@ -4703,6 +4753,7 @@ declare namespace Objects {
4703
4753
  SharedMemory,
4704
4754
  SmartForm,
4705
4755
  SmartStyle,
4756
+ StandardTask,
4706
4757
  SwitchAssignmentHierarchy,
4707
4758
  SwitchAssignments,
4708
4759
  TableType,
@@ -4721,30 +4772,7 @@ declare namespace Objects {
4721
4772
  WebDynproApplication,
4722
4773
  WebDynproComponentConfiguration,
4723
4774
  WebDynproComponent,
4724
- WebMIME,
4725
- NeptuneMetadata,
4726
- NeptuneApp,
4727
- NeptuneAPI,
4728
- NeptuneLaunchpad,
4729
- NeptuneTileGroup,
4730
- NeptuneTile,
4731
- NeptunePolicy,
4732
- NeptuneLaunchpadLayout,
4733
- NeptuneTileLayout,
4734
- NeptuneEnhancement,
4735
- NeptuneLoginPage,
4736
- NeptuneStickyBanner,
4737
- NeptuneSplashScreen,
4738
- NeptuneCustomColor,
4739
- NeptuneRichTextTemplate,
4740
- NeptuneCustomJSHelper,
4741
- NeptuneDocumentation,
4742
- NeptuneRFCMapping,
4743
- NeptuneMediaLibrary,
4744
- NeptuneMediaPack,
4745
- NeptuneURLAlias,
4746
- NeptuneOData,
4747
- NeptuneMobileClient
4775
+ WebMIME
4748
4776
  }
4749
4777
  }
4750
4778
  export { Objects }
@@ -5680,7 +5708,6 @@ export declare class SpaghettiScopeNode extends ScopeData implements ISpaghettiS
5680
5708
  listClassDefinitions(): IClassDefinition[];
5681
5709
  listInterfaceDefinitions(): IInterfaceDefinition[];
5682
5710
  findFormDefinition(name: string): IFormDefinition | undefined;
5683
- listFormDefinitions(): IFormDefinition[];
5684
5711
  findInterfaceDefinition(name: string): IInterfaceDefinition | undefined;
5685
5712
  findType(name: string): TypedIdentifier | undefined;
5686
5713
  findExtraLikeType(name: string): TypedIdentifier | undefined;
@@ -5839,6 +5866,15 @@ declare class SQLUpTo extends Expression {
5839
5866
  getRunnable(): IStatementRunnable;
5840
5867
  }
5841
5868
 
5869
+ declare class StandardTask extends AbstractObject {
5870
+ getType(): string;
5871
+ getAllowedNaming(): {
5872
+ maxLength: number;
5873
+ allowNamespace: boolean;
5874
+ };
5875
+ getDescription(): string | undefined;
5876
+ }
5877
+
5842
5878
  declare class StartOfSelection implements IStatement {
5843
5879
  getMatcher(): IStatementRunnable;
5844
5880
  }
@@ -6990,7 +7026,7 @@ export declare enum Visibility {
6990
7026
 
6991
7027
  declare class VoidType extends AbstractType {
6992
7028
  private readonly voided;
6993
- constructor(voided: string | undefined, name?: string);
7029
+ constructor(voided: string | undefined, qualifiedName?: string);
6994
7030
  getVoided(): string | undefined;
6995
7031
  toABAP(): string;
6996
7032
  toText(): string;
@@ -8,7 +8,8 @@ class DeleteMemory {
8
8
  getMatcher() {
9
9
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
10
10
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
11
- const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", id);
11
+ const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
12
+ const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
12
13
  const ret = (0, combi_1.seq)("DELETE FROM", (0, combi_1.alt)(memory, shared));
13
14
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14
15
  }