@abaplint/cli 2.113.235 → 2.113.237

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 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -8564,9 +8564,19 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
8564
8564
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8565
8565
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
8566
8566
  class SQLFrom extends combi_1.Expression {
8567
+ // todo: rewrite/refactor this method
8567
8568
  getRunnable() {
8568
- const from = (0, combi_1.seq)("FROM", (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), _1.SQLFromSource);
8569
- const source = (0, combi_1.seq)(from, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), _1.SQLJoin, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)))));
8569
+ const joins = (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), _1.SQLJoin));
8570
+ // No opening parens
8571
+ const from0 = (0, combi_1.seq)("FROM", _1.SQLFromSource, joins);
8572
+ // 1 to 6 opening parens, with up to that many closing parens at the end
8573
+ const from1 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8574
+ const from2 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8575
+ const from3 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8576
+ const from4 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8577
+ const from5 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8578
+ const from6 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
8579
+ const source = (0, combi_1.altPrio)(from6, from5, from4, from3, from2, from1, from0);
8570
8580
  return source;
8571
8581
  }
8572
8582
  }
@@ -8787,9 +8797,9 @@ class SQLIn extends combi_1.Expression {
8787
8797
  const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short, version_1.Version.OpenABAP), val), (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
8788
8798
  const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(short, val))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));
8789
8799
  // version is a guess, https://github.com/abaplint/abaplint/issues/2530
8790
- const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP));
8800
+ const listNeww = (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP);
8791
8801
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
8792
- const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));
8802
+ const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(subSelect, listOld, listNeww, _1.SQLSource));
8793
8803
  return inn;
8794
8804
  }
8795
8805
  }
@@ -13357,7 +13367,8 @@ class Field {
13357
13367
  const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
13358
13368
  const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
13359
13369
  const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
13360
- const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)("INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE"));
13370
+ const into = (0, combi_1.seq)("INTO", expressions_1.FieldChain);
13371
+ const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)(into), (0, combi_1.opt)("WHENEVER NOT FOUND SEND ERRORMESSAGE"));
13361
13372
  const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
13362
13373
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13363
13374
  }
@@ -54825,7 +54836,7 @@ class Registry {
54825
54836
  }
54826
54837
  static abaplintVersion() {
54827
54838
  // magic, see build script "version.sh"
54828
- return "2.113.235";
54839
+ return "2.113.237";
54829
54840
  }
54830
54841
  getDDICReferences() {
54831
54842
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.235",
3
+ "version": "2.113.237",
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.235",
41
+ "@abaplint/core": "^2.113.237",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",