@abaplint/core 2.94.22 → 2.94.24

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.
@@ -408,6 +408,11 @@ class BasicTypes {
408
408
  if (text === undefined) {
409
409
  text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();
410
410
  }
411
+ if (text === undefined
412
+ && node.get() instanceof Statements.Parameter
413
+ && node.findDirectTokenByText("LIKE")) {
414
+ text = "LIKE " + (typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens());
415
+ }
411
416
  if (text === undefined) {
412
417
  text = "TYPE";
413
418
  }
@@ -461,6 +466,9 @@ class BasicTypes {
461
466
  if (sub === undefined) {
462
467
  sub = node.findFirstExpression(Expressions.FieldChain);
463
468
  }
469
+ if (sub === undefined) {
470
+ sub = node.findFirstExpression(Expressions.TypeName);
471
+ }
464
472
  found = this.resolveLikeName(sub);
465
473
  if (found && this.isOccurs(node)) {
466
474
  found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE") }, qualifiedName);
@@ -4,13 +4,21 @@ exports.GetBit = void 0;
4
4
  const Expressions = require("../../2_statements/expressions");
5
5
  const source_1 = require("../expressions/source");
6
6
  const target_1 = require("../expressions/target");
7
+ const basic_1 = require("../../types/basic");
8
+ const inline_data_1 = require("../expressions/inline_data");
7
9
  class GetBit {
8
10
  runSyntax(node, scope, filename) {
9
11
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
12
  new source_1.Source().runSyntax(s, scope, filename);
11
13
  }
12
14
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, scope, filename);
15
+ const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
16
+ if (inline) {
17
+ new inline_data_1.InlineData().runSyntax(t, scope, filename, new basic_1.IntegerType());
18
+ }
19
+ else {
20
+ new target_1.Target().runSyntax(t, scope, filename);
21
+ }
14
22
  }
15
23
  }
16
24
  }
@@ -68,11 +68,15 @@ class MethodParameters {
68
68
  return this.importing;
69
69
  }
70
70
  getRequiredParameters() {
71
+ var _a;
71
72
  const ret = [];
72
73
  for (const i of this.getImporting()) {
73
74
  if (this.getOptional().some(o => o.toUpperCase() === i.getName().toUpperCase()) === true) {
74
75
  continue;
75
76
  }
77
+ else if (((_a = this.preferred) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === i.getName().toUpperCase()) {
78
+ continue;
79
+ }
76
80
  ret.push(i);
77
81
  }
78
82
  for (const i of this.getChanging()) {
@@ -10,6 +10,7 @@ const _typed_identifier_1 = require("../abap/types/_typed_identifier");
10
10
  const _reference_1 = require("../abap/5_syntax/_reference");
11
11
  const _builtin_1 = require("../abap/5_syntax/_builtin");
12
12
  const _scope_type_1 = require("../abap/5_syntax/_scope_type");
13
+ const types_1 = require("../abap/types");
13
14
  class LSPLookup {
14
15
  static lookup(cursor, reg, obj) {
15
16
  const inc = this.findInclude(cursor, reg);
@@ -84,13 +85,23 @@ class LSPLookup {
84
85
  hoverValue += this.referenceHover(ref, bottomScope, reg);
85
86
  }
86
87
  let definition = undefined;
88
+ let implementation = undefined;
87
89
  if (refs[0].resolved) {
88
90
  definition = _lsp_utils_1.LSPUtils.identiferToLocation(refs[0].resolved);
89
91
  if (definition.uri === _builtin_1.BuiltIn.filename) {
90
92
  definition = undefined;
91
93
  }
94
+ if (refs[0].resolved instanceof types_1.FormDefinition) {
95
+ implementation = definition;
96
+ }
92
97
  }
93
- return { hover: hoverValue, definition, definitionId: refs[0].resolved, scope: bottomScope };
98
+ return {
99
+ hover: hoverValue,
100
+ definition: definition,
101
+ implementation: implementation,
102
+ definitionId: refs[0].resolved,
103
+ scope: bottomScope,
104
+ };
94
105
  }
95
106
  if (hoverValue !== "") {
96
107
  return { hover: hoverValue, scope: bottomScope };
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.94.22";
66
+ return "2.94.24";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.94.22",
3
+ "version": "2.94.24",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -52,7 +52,7 @@
52
52
  "@types/mocha": "^10.0.1",
53
53
  "@types/node": "^18.11.18",
54
54
  "chai": "^4.3.7",
55
- "eslint": "^8.31.0",
55
+ "eslint": "^8.32.0",
56
56
  "mocha": "^10.2.0",
57
57
  "c8": "^7.12.0",
58
58
  "source-map-support": "^0.5.21",