@abaplint/core 2.113.109 → 2.113.111

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.
@@ -192,6 +192,15 @@ declare class Append implements IStatement {
192
192
  getMatcher(): IStatementRunnable;
193
193
  }
194
194
 
195
+ declare class ApplicationDescriptorsFiori extends AbstractObject {
196
+ getType(): string;
197
+ getAllowedNaming(): {
198
+ maxLength: number;
199
+ allowNamespace: boolean;
200
+ };
201
+ getDescription(): string | undefined;
202
+ }
203
+
195
204
  declare class ApplicationJobCatalogEntry extends AbstractObject {
196
205
  getType(): string;
197
206
  getAllowedNaming(): {
@@ -545,6 +554,15 @@ declare class BreakId implements IStatement {
545
554
  getMatcher(): IStatementRunnable;
546
555
  }
547
556
 
557
+ declare class BRFPlusSystemApplication extends AbstractObject {
558
+ getType(): string;
559
+ getAllowedNaming(): {
560
+ maxLength: number;
561
+ allowNamespace: boolean;
562
+ };
563
+ getDescription(): string | undefined;
564
+ }
565
+
548
566
  declare class BSPApplication extends AbstractObject {
549
567
  getType(): string;
550
568
  getAllowedNaming(): {
@@ -2594,48 +2612,6 @@ declare class FloatType extends AbstractType {
2594
2612
  toCDS(): string;
2595
2613
  }
2596
2614
 
2597
- export declare enum FLOW_EDGE_TYPE {
2598
- true = "true",
2599
- false = "false",
2600
- undefined = "undefined"
2601
- }
2602
-
2603
- export declare class FlowGraph {
2604
- private edges;
2605
- private readonly startNode;
2606
- private readonly endNode;
2607
- private label;
2608
- constructor(counter: number);
2609
- getStart(): string;
2610
- getLabel(): string;
2611
- getEnd(): string;
2612
- addEdge(from: string, to: string, type: FLOW_EDGE_TYPE): void;
2613
- removeEdge(from: string, to: string): void;
2614
- listEdges(): {
2615
- from: string;
2616
- to: string;
2617
- type: FLOW_EDGE_TYPE;
2618
- }[];
2619
- listNodes(): string[];
2620
- private hasEdges;
2621
- /** return value: end node of to graph */
2622
- addGraph(from: string, to: FlowGraph, type: FLOW_EDGE_TYPE): string;
2623
- toJSON(): string;
2624
- toTextEdges(): string;
2625
- setLabel(label: string): void;
2626
- toDigraph(): string;
2627
- listSources(node: string): {
2628
- name: string;
2629
- type: FLOW_EDGE_TYPE;
2630
- }[];
2631
- listTargets(node: string): {
2632
- name: string;
2633
- type: FLOW_EDGE_TYPE;
2634
- }[];
2635
- /** removes all nodes containing "#" that have one in-going and one out-going edge */
2636
- reduce(): this;
2637
- }
2638
-
2639
2615
  declare class For extends Expression {
2640
2616
  getRunnable(): IStatementRunnable;
2641
2617
  }
@@ -3803,14 +3779,14 @@ declare interface IRange {
3803
3779
  end: Position;
3804
3780
  }
3805
3781
 
3806
- export declare interface IReference {
3782
+ declare interface IReference {
3807
3783
  position: Identifier;
3808
3784
  resolved: Identifier | undefined;
3809
3785
  referenceType: ReferenceType;
3810
3786
  extra?: IReferenceExtras;
3811
3787
  }
3812
3788
 
3813
- export declare interface IReferenceExtras {
3789
+ declare interface IReferenceExtras {
3814
3790
  ooName?: string;
3815
3791
  ooType?: "CLAS" | "INTF" | "Void";
3816
3792
  }
@@ -4875,11 +4851,13 @@ declare namespace Objects {
4875
4851
  ATCCheckObject,
4876
4852
  ATCCheckVariant,
4877
4853
  AuthorizationCheckField,
4854
+ ApplicationDescriptorsFiori,
4878
4855
  AuthorizationGroup,
4879
4856
  AuthorizationObjectClass,
4880
4857
  AuthorizationObjectExtension,
4881
4858
  AuthorizationObject,
4882
4859
  BehaviorDefinition,
4860
+ BRFPlusSystemApplication,
4883
4861
  BSPApplication,
4884
4862
  BusinessAddInImplementation,
4885
4863
  BusinessCatalogAppAssignment,
@@ -5439,7 +5417,7 @@ declare class ReduceNext extends Expression {
5439
5417
  getRunnable(): IStatementRunnable;
5440
5418
  }
5441
5419
 
5442
- export declare enum ReferenceType {
5420
+ declare enum ReferenceType {
5443
5421
  /** for classes and interface references */
5444
5422
  ObjectOrientedReference = "Object",
5445
5423
  ObjectOrientedVoidReference = "Object (Void)",
@@ -6176,17 +6154,6 @@ declare class StartOfSelection implements IStatement {
6176
6154
  getMatcher(): IStatementRunnable;
6177
6155
  }
6178
6156
 
6179
- export declare class StatementFlow {
6180
- private counter;
6181
- build(stru: StructureNode, obj: IObject): FlowGraph[];
6182
- private runEvent;
6183
- private run;
6184
- private findBody;
6185
- static buildName(statement: StatementNode): string;
6186
- private traverseBody;
6187
- private traverseStructure;
6188
- }
6189
-
6190
6157
  declare class StatementNode extends AbstractNode<ExpressionNode | TokenNode> {
6191
6158
  private readonly statement;
6192
6159
  private readonly colon;
@@ -4,7 +4,7 @@ exports.ComponentName = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  class ComponentName extends combi_1.Expression {
6
6
  getRunnable() {
7
- return (0, combi_1.regex)(/^(\/\w+\/)?[\w\d_%$\*\~]+$/);
7
+ return (0, combi_1.regex)(/^\w*(\/\w+\/)*[\w\d_%$\*\~]+$/);
8
8
  }
9
9
  }
10
10
  exports.ComponentName = ComponentName;
@@ -4,7 +4,7 @@ exports.NamespaceSimpleName = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  class NamespaceSimpleName extends combi_1.Expression {
6
6
  getRunnable() {
7
- return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%#]+)$/);
7
+ return (0, combi_1.regex)(/^!?((\w*\/\w+\/)|(\w*\/\w+\/)*[\w\*$%#]+)$/);
8
8
  }
9
9
  }
10
10
  exports.NamespaceSimpleName = NamespaceSimpleName;
@@ -164,7 +164,7 @@ class MethodParameters {
164
164
  if (parameter === undefined) {
165
165
  const message = "Method importing parameter \"" + item.name + "\" does not exist";
166
166
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
167
- return;
167
+ continue;
168
168
  }
169
169
  else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(), calculated) === false) {
170
170
  const message = "Method parameter type not compatible, " + item.name;
@@ -22,6 +22,8 @@ class SelectOption {
22
22
  }
23
23
  for (const d of node.findDirectExpressions(Expressions.Dynamic)) {
24
24
  new dynamic_1.Dynamic().runSyntax(d, input);
25
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, new basic_1.VoidType("DYNAMIC_SELECT_OPTION")));
26
+ return;
25
27
  }
26
28
  const nameExpression = node.findFirstExpression(Expressions.FieldChain);
27
29
  let found = new basic_types_1.BasicTypes(input).resolveLikeName(nameExpression);
@@ -110,7 +110,9 @@ class ClassDefinition extends _identifier_1.Identifier {
110
110
  if (m.getVisibility() === visibility_1.Visibility.Private) {
111
111
  continue;
112
112
  }
113
- else if (name === "CONSTRUCTOR" || name === "CLASS_CONSTRUCTOR") {
113
+ else if (name === "CONSTRUCTOR"
114
+ || name === "DESTRUCTOR"
115
+ || name === "CLASS_CONSTRUCTOR") {
114
116
  continue;
115
117
  }
116
118
  names.add(name);
@@ -121,7 +123,8 @@ class ClassDefinition extends _identifier_1.Identifier {
121
123
  sup = cdef === null || cdef === void 0 ? void 0 : cdef.getSuperClass();
122
124
  }
123
125
  for (const m of this.getMethodDefinitions().getAll()) {
124
- if (names.has(m.getName().toUpperCase()) && m.isRedefinition() === false) {
126
+ if (names.has(m.getName().toUpperCase())
127
+ && m.isRedefinition() === false) {
125
128
  throw new Error(`${m.getName().toUpperCase()} already declared in superclass`);
126
129
  }
127
130
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.FLOW_EDGE_TYPE = exports.FlowGraph = exports.StatementFlow = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
4
- exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = void 0;
3
+ exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
4
+ exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = void 0;
5
5
  const issue_1 = require("./issue");
6
6
  Object.defineProperty(exports, "Issue", { enumerable: true, get: function () { return issue_1.Issue; } });
7
7
  const config_1 = require("./config");
@@ -75,8 +75,6 @@ Object.defineProperty(exports, "NativeSQL", { enumerable: true, get: function ()
75
75
  const edit_helper_1 = require("./edit_helper");
76
76
  Object.defineProperty(exports, "applyEditSingle", { enumerable: true, get: function () { return edit_helper_1.applyEditSingle; } });
77
77
  Object.defineProperty(exports, "applyEditList", { enumerable: true, get: function () { return edit_helper_1.applyEditList; } });
78
- const _reference_1 = require("./abap/5_syntax/_reference");
79
- Object.defineProperty(exports, "ReferenceType", { enumerable: true, get: function () { return _reference_1.ReferenceType; } });
80
78
  const _builtin_1 = require("./abap/5_syntax/_builtin");
81
79
  Object.defineProperty(exports, "BuiltIn", { enumerable: true, get: function () { return _builtin_1.BuiltIn; } });
82
80
  const abap_file_1 = require("./abap/abap_file");
@@ -109,9 +107,4 @@ const diagnostics_1 = require("./lsp/diagnostics");
109
107
  Object.defineProperty(exports, "Diagnostics", { enumerable: true, get: function () { return diagnostics_1.Diagnostics; } });
110
108
  const _edit_1 = require("./lsp/_edit");
111
109
  Object.defineProperty(exports, "LSPEdit", { enumerable: true, get: function () { return _edit_1.LSPEdit; } });
112
- const statement_flow_1 = require("./abap/flow/statement_flow");
113
- Object.defineProperty(exports, "StatementFlow", { enumerable: true, get: function () { return statement_flow_1.StatementFlow; } });
114
- const flow_graph_1 = require("./abap/flow/flow_graph");
115
- Object.defineProperty(exports, "FlowGraph", { enumerable: true, get: function () { return flow_graph_1.FlowGraph; } });
116
- Object.defineProperty(exports, "FLOW_EDGE_TYPE", { enumerable: true, get: function () { return flow_graph_1.FLOW_EDGE_TYPE; } });
117
110
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApplicationDescriptorsFiori = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class ApplicationDescriptorsFiori extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "UIAD";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 60, // todo
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.ApplicationDescriptorsFiori = ApplicationDescriptorsFiori;
21
+ //# sourceMappingURL=application_descriptors_fiori.js.map
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BRFPlusSystemApplication = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class BRFPlusSystemApplication extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "FDT0";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 30,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.BRFPlusSystemApplication = BRFPlusSystemApplication;
21
+ //# sourceMappingURL=brf_plus_system_application.js.map
@@ -26,11 +26,13 @@ __exportStar(require("./atc_check_category"), exports);
26
26
  __exportStar(require("./atc_check_object"), exports);
27
27
  __exportStar(require("./atc_check_variant"), exports);
28
28
  __exportStar(require("./authorization_check_field"), exports);
29
+ __exportStar(require("./application_descriptors_fiori"), exports);
29
30
  __exportStar(require("./authorization_group"), exports);
30
31
  __exportStar(require("./authorization_object_class"), exports);
31
32
  __exportStar(require("./authorization_object_extension"), exports);
32
33
  __exportStar(require("./authorization_object"), exports);
33
34
  __exportStar(require("./behavior_definition"), exports);
35
+ __exportStar(require("./brf_plus_system_application"), exports);
34
36
  __exportStar(require("./bsp_application"), exports);
35
37
  __exportStar(require("./business_add_in_implementation"), exports);
36
38
  __exportStar(require("./business_catalog_app_assignment"), exports);
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenamerHelper = void 0;
4
4
  const vscode_languageserver_types_1 = require("vscode-languageserver-types");
5
- const __1 = require("../..");
6
5
  const syntax_1 = require("../../abap/5_syntax/syntax");
7
6
  const _scope_type_1 = require("../../abap/5_syntax/_scope_type");
8
7
  const virtual_position_1 = require("../../virtual_position");
9
8
  const _abap_object_1 = require("../_abap_object");
9
+ const _reference_1 = require("../../abap/5_syntax/_reference");
10
10
  class RenamerHelper {
11
11
  constructor(reg) {
12
12
  this.reg = reg;
@@ -147,11 +147,11 @@ class RenamerHelper {
147
147
  let ret = [];
148
148
  if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {
149
149
  for (const r of node.getData().references) {
150
- if (r.referenceType === __1.ReferenceType.ConstructorReference) {
150
+ if (r.referenceType === _reference_1.ReferenceType.ConstructorReference) {
151
151
  continue;
152
152
  }
153
153
  if (((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.equals(identifier))
154
- && r.referenceType !== __1.ReferenceType.InferredType
154
+ && r.referenceType !== _reference_1.ReferenceType.InferredType
155
155
  && !(r.position.getStart() instanceof virtual_position_1.VirtualPosition)) {
156
156
  ret.push(r.position);
157
157
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.109";
70
+ return "2.113.111";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -38,8 +38,10 @@ class CloudTypes {
38
38
  static isCloud(obj) {
39
39
  return obj instanceof Objects.ApplicationJobCatalogEntry
40
40
  || obj instanceof Objects.ApplicationJobTemplate
41
+ || obj instanceof Objects.APIReleaseState
41
42
  || obj instanceof Objects.AssignmentServiceToAuthorizationGroup
42
43
  || obj instanceof Objects.ATCCheckCategory
44
+ || obj instanceof Objects.ApplicationDescriptorsFiori
43
45
  || obj instanceof Objects.ATCCheckObject
44
46
  || obj instanceof Objects.ATCCheckVariant
45
47
  || obj instanceof Objects.AuthorizationCheckField
@@ -59,7 +59,7 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-re
59
59
  else if (this.conf.allowCheck === false && get instanceof Statements.Check && stack.length === 0) {
60
60
  const message = "CHECK is not allowed outside of loops";
61
61
  let tokensString = statement.concatTokens();
62
- tokensString = tokensString.slice(statement.getFirstToken().getEnd().getCol());
62
+ tokensString = tokensString.split("CHECK")[1].trim();
63
63
  const replacement = "IF NOT " + tokensString + "\n RETURN.\nENDIF.";
64
64
  const fix = edit_helper_1.EditHelper.replaceRange(file, statement.getFirstToken().getStart(), statement.getLastToken().getEnd(), replacement);
65
65
  const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.109",
3
+ "version": "2.113.111",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,20 +50,20 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.52.3",
53
+ "@microsoft/api-extractor": "^7.52.7",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^22.14.1",
56
+ "@types/node": "^22.15.17",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.24.0",
59
- "mocha": "^11.1.0",
58
+ "eslint": "^9.26.0",
59
+ "mocha": "^11.2.2",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^2.4.0",
63
63
  "typescript": "^5.8.3"
64
64
  },
65
65
  "dependencies": {
66
- "fast-xml-parser": "^5.2.0",
66
+ "fast-xml-parser": "^5.2.3",
67
67
  "json5": "^2.2.3",
68
68
  "vscode-languageserver-types": "^3.17.5"
69
69
  }