@abaplint/cli 2.119.65 → 2.119.66

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 +27 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -27576,7 +27576,8 @@ class TypeUtils {
27576
27576
  console.dir(target);
27577
27577
  console.dir(calculated);
27578
27578
  */
27579
- if (calculated && source instanceof basic_1.StringType && target instanceof basic_1.XStringType) {
27579
+ if (calculated && source instanceof basic_1.StringType
27580
+ && (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
27580
27581
  return false;
27581
27582
  }
27582
27583
  if (calculated) {
@@ -37998,6 +37999,11 @@ class Concatenate {
37998
37999
  runSyntax(node, input) {
37999
38000
  const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
38000
38001
  const linesMode = node.findDirectTokenByText("LINES") !== undefined;
38002
+ if (node.findFirstExpression(Expressions.TableExpression) !== undefined) {
38003
+ const message = "CONCATENATE with table expression not possible";
38004
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
38005
+ return;
38006
+ }
38001
38007
  const target = node.findFirstExpression(Expressions.Target);
38002
38008
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
38003
38009
  if (inline) {
@@ -68827,7 +68833,7 @@ class Registry {
68827
68833
  }
68828
68834
  static abaplintVersion() {
68829
68835
  // magic, see build script "version.js"
68830
- return "2.119.65";
68836
+ return "2.119.66";
68831
68837
  }
68832
68838
  getDDICReferences() {
68833
68839
  return this.ddicReferences;
@@ -75572,6 +75578,18 @@ Make sure to test the downported code, it might not always be completely correct
75572
75578
  }
75573
75579
  }
75574
75580
  }
75581
+ // INTO after WHERE parses as a valid SELECT in the low version, but is only allowed in
75582
+ // strict SQL syntax, so move it also when the statement is no longer Unknown
75583
+ if (ret.length === 0) {
75584
+ for (let i = 0; i < lowStatements.length; i++) {
75585
+ const low = lowStatements[i];
75586
+ const high = highStatements[i];
75587
+ const issue = this.downportSQLMoveInto(low, high, lowFile, highSyntax);
75588
+ if (issue) {
75589
+ ret.push(issue);
75590
+ }
75591
+ }
75592
+ }
75575
75593
  }
75576
75594
  return ret;
75577
75595
  }
@@ -75815,10 +75833,14 @@ Make sure to test the downported code, it might not always be completely correct
75815
75833
  return undefined;
75816
75834
  }
75817
75835
  //////////////////////////////////////////
75818
- /** move INTO from after WHERE to after FROM */
75836
+ /** move INTO from after WHERE to after FROM,
75837
+ * note that INTO after WHERE is only valid in strict SQL syntax, so it must be moved when
75838
+ * downporting; this can happen both while the statement is still Unknown(from the main loop)
75839
+ * and after the @ and FIELDS have been removed, leaving a SELECT that parses in the low version */
75819
75840
  downportSQLMoveInto(low, high, lowFile, _highSyntax) {
75820
75841
  var _a;
75821
- if (!(low.get() instanceof _statement_1.Unknown)) {
75842
+ if (!(high.get() instanceof Statements.Select)
75843
+ && !(high.get() instanceof Statements.SelectLoop)) {
75822
75844
  return undefined;
75823
75845
  }
75824
75846
  // note: SQLCond is also used in JOIN(FROM) conditions
@@ -75826,6 +75848,7 @@ Make sure to test the downported code, it might not always be completely correct
75826
75848
  if (where === undefined) {
75827
75849
  return undefined;
75828
75850
  }
75851
+ // the FIELDS list sits between FROM and WHERE, wait for it to be removed first
75829
75852
  if (high.findFirstExpression(Expressions.SQLFields) !== undefined) {
75830
75853
  return undefined;
75831
75854
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.65",
3
+ "version": "2.119.66",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.119.65",
42
+ "@abaplint/core": "^2.119.66",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",