@abaplint/cli 2.102.43 → 2.102.44

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 +35 -15
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -21792,7 +21792,8 @@ class TypeUtils {
21792
21792
  }
21793
21793
  }
21794
21794
  else if (source instanceof basic_1.IntegerType) {
21795
- if (target instanceof basic_1.StringType) {
21795
+ if (target instanceof basic_1.StringType
21796
+ || target instanceof basic_1.PackedType) {
21796
21797
  return false;
21797
21798
  }
21798
21799
  else if (target instanceof basic_1.Integer8Type) {
@@ -26827,6 +26828,15 @@ class SpaghettiScopeNode extends ScopeData {
26827
26828
  }
26828
26829
  return ret;
26829
26830
  }
26831
+ listInterfaceDefinitions() {
26832
+ let search = this;
26833
+ const ret = [];
26834
+ while (search !== undefined) {
26835
+ ret.push(...Object.values(search.getData().idefs));
26836
+ search = search.getParent();
26837
+ }
26838
+ return ret;
26839
+ }
26830
26840
  findFormDefinition(name) {
26831
26841
  let search = this;
26832
26842
  const upper = name.toUpperCase();
@@ -40065,6 +40075,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
40065
40075
 
40066
40076
  Object.defineProperty(exports, "__esModule", ({ value: true }));
40067
40077
  exports.LSPLookup = void 0;
40078
+ /* eslint-disable max-len */
40068
40079
  const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/esm/main.js");
40069
40080
  const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
40070
40081
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
@@ -40147,13 +40158,14 @@ class LSPLookup {
40147
40158
  }
40148
40159
  return { hover: hoverValue, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
40149
40160
  }
40150
- for (const c of bottomScope.listClassDefinitions()) {
40161
+ // TODO: this can be optimized, no need to loop through all the defintions, the scope knows the name of the object?
40162
+ for (const c of [...bottomScope.listClassDefinitions(), ...bottomScope.listInterfaceDefinitions()]) {
40151
40163
  for (const m of ((_a = c.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
40152
40164
  for (const p of ((_b = m.getParameters()) === null || _b === void 0 ? void 0 : _b.getAll()) || []) {
40153
40165
  if (p.getStart().equals(cursor.token.getStart())) {
40154
40166
  const found = _lsp_utils_1.LSPUtils.identiferToLocation(p);
40155
40167
  return {
40156
- hover: "Method Parameter, " + cursor.token.getStr(),
40168
+ hover: "Method Parameter: " + cursor.token.getStr().replace("!", ""),
40157
40169
  definition: found,
40158
40170
  definitionId: p,
40159
40171
  implementation: undefined,
@@ -40335,11 +40347,12 @@ class LSPLookup {
40335
40347
  };
40336
40348
  }
40337
40349
  static findMethodDefinition(found, scope) {
40338
- var _a, _b, _c, _d;
40350
+ var _a, _b, _c, _d, _e, _f, _g;
40339
40351
  if (scope === undefined) {
40340
40352
  return undefined;
40341
40353
  }
40342
- if (scope.getIdentifier().stype !== _scope_type_1.ScopeType.ClassDefinition
40354
+ if ((scope.getIdentifier().stype !== _scope_type_1.ScopeType.ClassDefinition
40355
+ && scope.getIdentifier().stype !== _scope_type_1.ScopeType.Interface)
40343
40356
  || !(found.snode.get() instanceof Statements.MethodDef)) {
40344
40357
  return undefined;
40345
40358
  }
@@ -40355,8 +40368,14 @@ class LSPLookup {
40355
40368
  || nameToken.getStart().getRow() !== found.token.getStart().getRow()) {
40356
40369
  return undefined;
40357
40370
  }
40358
- const def = (_d = (_c = (_b = scope.getParent()) === null || _b === void 0 ? void 0 : _b.findClassDefinition(scope.getIdentifier().sname)) === null || _c === void 0 ? void 0 : _c.getMethodDefinitions()) === null || _d === void 0 ? void 0 : _d.getByName(nameToken.getStr());
40359
- return def;
40371
+ if (scope.getIdentifier().stype === _scope_type_1.ScopeType.ClassDefinition) {
40372
+ const def = (_d = (_c = (_b = scope.getParent()) === null || _b === void 0 ? void 0 : _b.findClassDefinition(scope.getIdentifier().sname)) === null || _c === void 0 ? void 0 : _c.getMethodDefinitions()) === null || _d === void 0 ? void 0 : _d.getByName(nameToken.getStr());
40373
+ return def;
40374
+ }
40375
+ else {
40376
+ const def = (_g = (_f = (_e = scope.getParent()) === null || _e === void 0 ? void 0 : _e.findInterfaceDefinition(scope.getIdentifier().sname)) === null || _f === void 0 ? void 0 : _f.getMethodDefinitions()) === null || _g === void 0 ? void 0 : _g.getByName(nameToken.getStr());
40377
+ return def;
40378
+ }
40360
40379
  }
40361
40380
  static findFunctionModule(found) {
40362
40381
  if (!(found.snode.get() instanceof Statements.CallFunction)) {
@@ -48896,7 +48915,7 @@ class Registry {
48896
48915
  }
48897
48916
  static abaplintVersion() {
48898
48917
  // magic, see build script "version.sh"
48899
- return "2.102.43";
48918
+ return "2.102.44";
48900
48919
  }
48901
48920
  getDDICReferences() {
48902
48921
  return this.ddicReferences;
@@ -52100,7 +52119,12 @@ class CloudTypes {
52100
52119
  }
52101
52120
  run(obj) {
52102
52121
  if (this.reg.getConfig().getVersion() !== version_1.Version.Cloud
52122
+ || obj instanceof Objects.ApplicationJobCatalogEntry
52123
+ || obj instanceof Objects.ApplicationJobTemplate
52103
52124
  || obj instanceof Objects.AssignmentServiceToAuthorizationGroup
52125
+ || obj instanceof Objects.ATCCheckCategory
52126
+ || obj instanceof Objects.ATCCheckObject
52127
+ || obj instanceof Objects.ATCCheckVariant
52104
52128
  || obj instanceof Objects.AuthorizationCheckField
52105
52129
  || obj instanceof Objects.AuthorizationObject
52106
52130
  || obj instanceof Objects.AuthorizationObjectExtension
@@ -52108,11 +52132,7 @@ class CloudTypes {
52108
52132
  || obj instanceof Objects.BusinessCatalog
52109
52133
  || obj instanceof Objects.BusinessCatalogAppAssignment
52110
52134
  || obj instanceof Objects.CDSMetadataExtension
52111
- || obj instanceof Objects.RestrictionField
52112
52135
  || obj instanceof Objects.Class
52113
- || obj instanceof Objects.OutboundService
52114
- || obj instanceof Objects.ApplicationJobCatalogEntry
52115
- || obj instanceof Objects.ApplicationJobTemplate
52116
52136
  || obj instanceof Objects.CommunicationScenario
52117
52137
  || obj instanceof Objects.DataControl
52118
52138
  || obj instanceof Objects.DataDefinition
@@ -52124,11 +52144,11 @@ class CloudTypes {
52124
52144
  || obj instanceof Objects.InboundService
52125
52145
  || obj instanceof Objects.Interface
52126
52146
  || obj instanceof Objects.LockObject
52127
- || obj instanceof Objects.ATCCheckCategory
52128
- || obj instanceof Objects.ATCCheckObject
52129
- || obj instanceof Objects.ATCCheckVariant
52130
52147
  || obj instanceof Objects.MessageClass
52148
+ || obj instanceof Objects.NumberRange
52149
+ || obj instanceof Objects.OutboundService
52131
52150
  || obj instanceof Objects.Package
52151
+ || obj instanceof Objects.RestrictionField
52132
52152
  || obj instanceof Objects.RestrictionType
52133
52153
  || obj instanceof Objects.ServiceBinding
52134
52154
  || obj instanceof Objects.ServiceDefinition
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.43",
3
+ "version": "2.102.44",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
7
- "abaplint": "./abaplint"
7
+ "abaplint": "abaplint"
8
8
  },
9
9
  "scripts": {
10
10
  "lint": "eslint src/**/*.ts test/**/*.ts --format unix",
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.43",
41
+ "@abaplint/core": "^2.102.44",
42
42
  "@types/chai": "^4.3.6",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",
45
45
  "@types/mocha": "^10.0.1",
46
- "@types/node": "^20.6.2",
46
+ "@types/node": "^20.6.3",
47
47
  "@types/progress": "^2.0.5",
48
48
  "chai": "^4.3.8",
49
49
  "chalk": "^5.3.0",