@abaplint/cli 2.113.214 → 2.113.215

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 +17 -13
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -26017,13 +26017,13 @@ class FieldChain {
26017
26017
  }
26018
26018
  else if (current instanceof nodes_1.ExpressionNode
26019
26019
  && current.get() instanceof Expressions.TableExpression) {
26020
- if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType)) {
26020
+ if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType) && !(context instanceof basic_1.UnknownType)) {
26021
26021
  const message = "Table expression, expected table";
26022
26022
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
26023
26023
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26024
26024
  }
26025
26025
  table_expression_1.TableExpression.runSyntax(current, input, context);
26026
- if (!(context instanceof basic_1.VoidType)) {
26026
+ if (!(context instanceof basic_1.VoidType) && !(context instanceof basic_1.UnknownType)) {
26027
26027
  context = context.getRowType();
26028
26028
  }
26029
26029
  }
@@ -27859,9 +27859,13 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
27859
27859
  const isSimple = /^\w+$/;
27860
27860
  class Select {
27861
27861
  static runSyntax(node, input, skipImplicitInto = false) {
27862
- var _a;
27862
+ var _a, _b;
27863
27863
  const token = node.getFirstToken();
27864
- const from = node.findDirectExpression(Expressions.SQLFrom);
27864
+ let from = node.findDirectExpression(Expressions.SQLFrom);
27865
+ if (from === undefined) {
27866
+ // huh, sometimes the select expression is wrapped
27867
+ from = node.findFirstExpression(Expressions.SQLFrom);
27868
+ }
27865
27869
  const dbSources = from ? sql_from_1.SQLFrom.runSyntax(from, input) : [];
27866
27870
  if (from === undefined) {
27867
27871
  const message = `Missing FROM`;
@@ -27876,7 +27880,7 @@ class Select {
27876
27880
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
27877
27881
  return;
27878
27882
  }
27879
- const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE"
27883
+ const isSingle = ((_a = node.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "SINGLE"
27880
27884
  || node.get() instanceof Expressions.SelectLoop;
27881
27885
  this.checkFields(fields, dbSources, input, node);
27882
27886
  this.handleInto(node, input, fields, dbSources, isSingle);
@@ -27893,7 +27897,7 @@ class Select {
27893
27897
  && node.findDirectExpression(Expressions.SQLIntoTable) === undefined
27894
27898
  && node.findDirectExpression(Expressions.SQLIntoList) === undefined
27895
27899
  && node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
27896
- const fields = (_a = node.findFirstExpression(Expressions.SQLAggregation)) === null || _a === void 0 ? void 0 : _a.concatTokens();
27900
+ const fields = (_b = node.findFirstExpression(Expressions.SQLAggregation)) === null || _b === void 0 ? void 0 : _b.concatTokens();
27897
27901
  const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
27898
27902
  if (fields === undefined || c.test(fields) === false) {
27899
27903
  const nameToken = from === null || from === void 0 ? void 0 : from.findDirectExpression(Expressions.SQLFromSource);
@@ -29155,13 +29159,13 @@ class Target {
29155
29159
  }
29156
29160
  else if (current instanceof nodes_1.ExpressionNode
29157
29161
  && current.get() instanceof Expressions.TableExpression) {
29158
- if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType)) {
29162
+ if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType) && !(context instanceof unknown_type_1.UnknownType)) {
29159
29163
  const message = "Table expression, expected table";
29160
29164
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29161
29165
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
29162
29166
  }
29163
29167
  table_expression_1.TableExpression.runSyntax(current, input, context);
29164
- if (!(context instanceof basic_1.VoidType)) {
29168
+ if (!(context instanceof basic_1.VoidType) && !(context instanceof unknown_type_1.UnknownType)) {
29165
29169
  context = context.getRowType();
29166
29170
  }
29167
29171
  }
@@ -29985,7 +29989,7 @@ class Append {
29985
29989
  }
29986
29990
  const fsTarget = node.findExpressionAfterToken("ASSIGNING");
29987
29991
  if (fsTarget && fsTarget.get() instanceof Expressions.FSTarget) {
29988
- if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
29992
+ if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType) && !(targetType instanceof basic_1.UnknownType)) {
29989
29993
  const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
29990
29994
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29991
29995
  return;
@@ -29995,7 +29999,7 @@ class Append {
29995
29999
  }
29996
30000
  const dataTarget = node.findExpressionAfterToken("INTO");
29997
30001
  if (dataTarget && node.concatTokens().toUpperCase().includes(" REFERENCE INTO DATA(")) {
29998
- if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
30002
+ if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType) && !(targetType instanceof basic_1.UnknownType)) {
29999
30003
  const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
30000
30004
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30001
30005
  return;
@@ -41437,8 +41441,8 @@ const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abapli
41437
41441
  class CDSElement extends combi_1.Expression {
41438
41442
  getRunnable() {
41439
41443
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
41440
- const colonThing = (0, combi_1.seq)(":", (0, combi_1.alt)(_1.CDSName, _1.CDSType));
41441
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.altPrio)("KEY", "VIRTUAL")), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.opt)((0, combi_1.alt)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
41444
+ const colonThing = (0, combi_1.seq)(":", (0, combi_1.alt)(_1.CDSName, _1.CDSType, "LOCALIZED"));
41445
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.altPrio)("KEY", "VIRTUAL")), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.opt)(cds_as_1.CDSAs), (0, combi_1.opt)((0, combi_1.alt)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
41442
41446
  }
41443
41447
  }
41444
41448
  exports.CDSElement = CDSElement;
@@ -54514,7 +54518,7 @@ class Registry {
54514
54518
  }
54515
54519
  static abaplintVersion() {
54516
54520
  // magic, see build script "version.sh"
54517
- return "2.113.214";
54521
+ return "2.113.215";
54518
54522
  }
54519
54523
  getDDICReferences() {
54520
54524
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.214",
3
+ "version": "2.113.215",
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.214",
41
+ "@abaplint/core": "^2.113.215",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",