@abaplint/cli 2.113.243 → 2.113.245

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 +18 -8
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -8366,11 +8366,14 @@ class SQLField extends combi_1.Expression {
8366
8366
  getRunnable() {
8367
8367
  const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
8368
8368
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
8369
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
8370
- const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, _1.SQLCast, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, paren);
8371
- const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW))));
8369
+ const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
8370
+ const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, _1.SQLCast, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
8371
+ const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
8372
+ const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
8372
8373
  const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
8373
- return (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith), (0, combi_1.optPrio)(as));
8374
+ const arithSequence = (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith));
8375
+ const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
8376
+ return (0, combi_1.seq)((0, combi_1.altPrio)(parenArithSequence, arithSequence), (0, combi_1.optPrio)(as));
8374
8377
  }
8375
8378
  }
8376
8379
  exports.SQLField = SQLField;
@@ -24201,7 +24204,6 @@ class BasicTypes {
24201
24204
  return undefined;
24202
24205
  }
24203
24206
  resolveLikeName(node, headerLogic = true) {
24204
- var _a;
24205
24207
  if (node === undefined) {
24206
24208
  return undefined;
24207
24209
  }
@@ -24247,7 +24249,12 @@ class BasicTypes {
24247
24249
  this.input.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.input.filename);
24248
24250
  }
24249
24251
  if (type === undefined) {
24250
- type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
24252
+ const found = this.input.scope.getDDIC().lookupNoVoid(name);
24253
+ if (found !== undefined) {
24254
+ const using = { filename: this.input.filename, token: chain.getFirstToken(), object: found.object };
24255
+ this.input.scope.getDDICReferences().addUsing(this.input.scope.getParentObj(), using);
24256
+ }
24257
+ type = found === null || found === void 0 ? void 0 : found.type;
24251
24258
  }
24252
24259
  if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
24253
24260
  this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
@@ -28945,7 +28952,7 @@ class SQLForAllEntries {
28945
28952
  }
28946
28953
  if (s) {
28947
28954
  const type = source_1.Source.runSyntax(s, input);
28948
- if (type instanceof basic_1.VoidType) {
28955
+ if (type instanceof basic_1.VoidType || type instanceof basic_1.UnknownType) {
28949
28956
  return;
28950
28957
  }
28951
28958
  if (!(type instanceof basic_1.TableType)) {
@@ -34063,6 +34070,9 @@ class ReadTable {
34063
34070
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
34064
34071
  return;
34065
34072
  }
34073
+ else if (sourceType instanceof basic_1.UnknownType) {
34074
+ // do nothing, ok
34075
+ }
34066
34076
  else if (!(sourceType instanceof basic_1.TableType) && !(sourceType instanceof basic_1.VoidType)) {
34067
34077
  const message = "Read table, not a table type";
34068
34078
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -54886,7 +54896,7 @@ class Registry {
54886
54896
  }
54887
54897
  static abaplintVersion() {
54888
54898
  // magic, see build script "version.sh"
54889
- return "2.113.243";
54899
+ return "2.113.245";
54890
54900
  }
54891
54901
  getDDICReferences() {
54892
54902
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.243",
3
+ "version": "2.113.245",
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.243",
41
+ "@abaplint/core": "^2.113.245",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",