@abaplint/cli 2.113.168 → 2.113.169

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 +14 -14
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -7061,7 +7061,7 @@ class NewObject extends combi_1.Expression {
7061
7061
  const lines = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW)));
7062
7062
  const linesFields = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(field_assignment_1.FieldAssignment), (0, combi_1.tok)(tokens_1.WParenRightW)));
7063
7063
  const neww = (0, combi_1.seq)("NEW", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)((0, combi_1.alt)(_1.Source, _1.ParameterListS, lines, linesFields)), ")");
7064
- return (0, combi_1.ver)(version_1.Version.v740sp02, neww);
7064
+ return (0, combi_1.ver)(version_1.Version.v740sp02, neww, version_1.Version.OpenABAP);
7065
7065
  }
7066
7066
  }
7067
7067
  exports.NewObject = NewObject;
@@ -7890,7 +7890,7 @@ class Source extends combi_1.Expression {
7890
7890
  // paren used for eg. "( 2 + 1 ) * 4"
7891
7891
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
7892
7892
  const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
7893
- const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i)), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i))), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
7893
+ const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i), version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i)), version_1.Version.OpenABAP), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
7894
7894
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
7895
7895
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
7896
7896
  const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
@@ -21043,7 +21043,7 @@ class BuiltIn {
21043
21043
  constructor() {
21044
21044
  this.row = 1;
21045
21045
  }
21046
- buildDefinition(method, name) {
21046
+ static buildDefinition(method, name) {
21047
21047
  if (method.cache) {
21048
21048
  return method.cache;
21049
21049
  }
@@ -21052,7 +21052,7 @@ class BuiltIn {
21052
21052
  method.cache = result;
21053
21053
  return result;
21054
21054
  }
21055
- searchBuiltin(name) {
21055
+ static searchBuiltin(name) {
21056
21056
  if (name === undefined) {
21057
21057
  return undefined;
21058
21058
  }
@@ -21062,7 +21062,7 @@ class BuiltIn {
21062
21062
  }
21063
21063
  return this.buildDefinition(def, name);
21064
21064
  }
21065
- isPredicate(name) {
21065
+ static isPredicate(name) {
21066
21066
  if (name === undefined) {
21067
21067
  return undefined;
21068
21068
  }
@@ -26688,7 +26688,7 @@ class MethodCallChain {
26688
26688
  // eslint-disable-next-line prefer-const
26689
26689
  let { method, def: foundDef } = helper.searchMethodName(def, methodName);
26690
26690
  if (method === undefined && current === first) {
26691
- method = new _builtin_1.BuiltIn().searchBuiltin(methodName === null || methodName === void 0 ? void 0 : methodName.toUpperCase());
26691
+ method = _builtin_1.BuiltIn.searchBuiltin(methodName === null || methodName === void 0 ? void 0 : methodName.toUpperCase());
26692
26692
  if (method) {
26693
26693
  input.scope.addReference(methodToken, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
26694
26694
  }
@@ -28097,14 +28097,14 @@ class Source {
28097
28097
  break;
28098
28098
  case "BOOLC":
28099
28099
  {
28100
- const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
28100
+ const method = _builtin_1.BuiltIn.searchBuiltin(tok);
28101
28101
  input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
28102
28102
  cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
28103
28103
  return basic_1.StringType.get();
28104
28104
  }
28105
28105
  case "XSDBOOL":
28106
28106
  {
28107
- const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
28107
+ const method = _builtin_1.BuiltIn.searchBuiltin(tok);
28108
28108
  input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
28109
28109
  cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
28110
28110
  return new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" });
@@ -28349,7 +28349,8 @@ class Source {
28349
28349
  if (typeName === "#" && inferredType && typeToken) {
28350
28350
  const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
28351
28351
  if (found) {
28352
- input.scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: true });
28352
+ const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
28353
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: true });
28353
28354
  }
28354
28355
  else if (inferredType instanceof basic_1.ObjectReferenceType) {
28355
28356
  const def = input.scope.findObjectDefinition(inferredType.getQualifiedName());
@@ -44219,7 +44220,7 @@ class LSPLookup {
44219
44220
  ret += "\n\n" + this.dumpType(ref.resolved);
44220
44221
  }
44221
44222
  else if (ref.referenceType === _reference_1.ReferenceType.BuiltinMethodReference) {
44222
- const builtinDef = new _builtin_1.BuiltIn().searchBuiltin((_e = (_d = ref.resolved) === null || _d === void 0 ? void 0 : _d.getName()) === null || _e === void 0 ? void 0 : _e.toUpperCase());
44223
+ const builtinDef = _builtin_1.BuiltIn.searchBuiltin((_e = (_d = ref.resolved) === null || _d === void 0 ? void 0 : _d.getName()) === null || _e === void 0 ? void 0 : _e.toUpperCase());
44223
44224
  if (builtinDef === undefined) {
44224
44225
  return "Error: builtin method signature not found";
44225
44226
  }
@@ -54816,7 +54817,7 @@ class Registry {
54816
54817
  }
54817
54818
  static abaplintVersion() {
54818
54819
  // magic, see build script "version.sh"
54819
- return "2.113.168";
54820
+ return "2.113.169";
54820
54821
  }
54821
54822
  getDDICReferences() {
54822
54823
  return this.ddicReferences;
@@ -62682,7 +62683,7 @@ ${indentation} output = ${uniqueName}.\n`;
62682
62683
  const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());
62683
62684
  for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
62684
62685
  if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference &&
62685
- new _builtin_1.BuiltIn().isPredicate(chain.getFirstToken().getStr().toUpperCase())) {
62686
+ _builtin_1.BuiltIn.isPredicate(chain.getFirstToken().getStr().toUpperCase())) {
62686
62687
  predicate = true;
62687
62688
  break;
62688
62689
  }
@@ -68456,9 +68457,8 @@ ENDCLASS.`,
68456
68457
  for (const classDef of file.getInfo().listClassDefinitions()) {
68457
68458
  methods = methods.concat(classDef.methods);
68458
68459
  }
68459
- const builtIn = new _builtin_1.BuiltIn();
68460
68460
  for (const method of methods) {
68461
- if (builtIn.searchBuiltin(method.name.toUpperCase())) {
68461
+ if (_builtin_1.BuiltIn.searchBuiltin(method.name.toUpperCase())) {
68462
68462
  const message = `Method name "${method.name}" overwrites built-in SAP function name`;
68463
68463
  issues.push(issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));
68464
68464
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.168",
3
+ "version": "2.113.169",
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.113.168",
41
+ "@abaplint/core": "^2.113.169",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",