@abaplint/cli 2.112.13 → 2.112.15

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 (2) hide show
  1. package/build/cli.js +23 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -21425,7 +21425,7 @@ class CurrentScope {
21425
21425
  }
21426
21426
  const upper = name.toUpperCase();
21427
21427
  if (this.current.getData().vars[upper] !== undefined) {
21428
- // console.dir(new Error().stack);
21428
+ // console.dir(new Error().stack);
21429
21429
  throw new Error(`Variable name "${name}" already defined`);
21430
21430
  }
21431
21431
  else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
@@ -21443,6 +21443,7 @@ class CurrentScope {
21443
21443
  }
21444
21444
  const upper = name.toUpperCase();
21445
21445
  if (parent.getData().vars[upper] !== undefined) {
21446
+ // console.dir(new Error().stack);
21446
21447
  throw new Error(`Variable name "${name}" already defined`);
21447
21448
  }
21448
21449
  else if (this.isOO() && parent.getData().types[upper] !== undefined) {
@@ -21934,7 +21935,7 @@ class ObjectOriented {
21934
21935
  }
21935
21936
  if (name.includes("~")) {
21936
21937
  const interfaceName = upper.split("~")[0];
21937
- if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {
21938
+ if (this.listInterfacesRecursive(def).includes(interfaceName)) {
21938
21939
  return this.searchAttributeName(this.scope.findInterfaceDefinition(interfaceName), name.split("~")[1]);
21939
21940
  }
21940
21941
  }
@@ -22096,7 +22097,19 @@ class ObjectOriented {
22096
22097
  }
22097
22098
  return ignore;
22098
22099
  }
22099
- // returns list of interfaces implemented
22100
+ /** returns list of interfaces implemented, recursive */
22101
+ listInterfacesRecursive(definition) {
22102
+ const list = [];
22103
+ for (const i of definition.getImplementing()) {
22104
+ const upper = i.name.toUpperCase();
22105
+ list.push(upper);
22106
+ const def = this.scope.findInterfaceDefinition(upper);
22107
+ if (def) {
22108
+ list.push(...this.listInterfacesRecursive(def));
22109
+ }
22110
+ }
22111
+ return [...new Set(list)];
22112
+ }
22100
22113
  fromInterfaces(definition, skip) {
22101
22114
  const ignore = [];
22102
22115
  for (const i of definition.getImplementing()) {
@@ -41959,8 +41972,8 @@ exports.MemoryFile = MemoryFile;
41959
41972
  "use strict";
41960
41973
 
41961
41974
  Object.defineProperty(exports, "__esModule", ({ value: true }));
41962
- 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.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
41963
- exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = void 0;
41975
+ exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = 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;
41976
+ exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = void 0;
41964
41977
  const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
41965
41978
  Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
41966
41979
  const config_1 = __webpack_require__(/*! ./config */ "./node_modules/@abaplint/core/build/src/config.js");
@@ -42068,6 +42081,10 @@ const diagnostics_1 = __webpack_require__(/*! ./lsp/diagnostics */ "./node_modul
42068
42081
  Object.defineProperty(exports, "Diagnostics", ({ enumerable: true, get: function () { return diagnostics_1.Diagnostics; } }));
42069
42082
  const _edit_1 = __webpack_require__(/*! ./lsp/_edit */ "./node_modules/@abaplint/core/build/src/lsp/_edit.js");
42070
42083
  Object.defineProperty(exports, "LSPEdit", ({ enumerable: true, get: function () { return _edit_1.LSPEdit; } }));
42084
+ const statement_flow_1 = __webpack_require__(/*! ./abap/flow/statement_flow */ "./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js");
42085
+ Object.defineProperty(exports, "StatementFlow", ({ enumerable: true, get: function () { return statement_flow_1.StatementFlow; } }));
42086
+ const flow_graph_1 = __webpack_require__(/*! ./abap/flow/flow_graph */ "./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js");
42087
+ Object.defineProperty(exports, "FlowGraph", ({ enumerable: true, get: function () { return flow_graph_1.FlowGraph; } }));
42071
42088
  //# sourceMappingURL=index.js.map
42072
42089
 
42073
42090
  /***/ }),
@@ -52471,7 +52488,7 @@ class Registry {
52471
52488
  }
52472
52489
  static abaplintVersion() {
52473
52490
  // magic, see build script "version.sh"
52474
- return "2.112.13";
52491
+ return "2.112.15";
52475
52492
  }
52476
52493
  getDDICReferences() {
52477
52494
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.112.13",
3
+ "version": "2.112.15",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.112.13",
41
+ "@abaplint/core": "^2.112.15",
42
42
  "@types/chai": "^4.3.17",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",