@abaplint/core 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.
@@ -3908,6 +3908,7 @@ declare interface IReferenceExtras {
3908
3908
  export declare interface IRegistry {
3909
3909
  parse(): IRegistry;
3910
3910
  parseAsync(input?: IRunInput): Promise<IRegistry>;
3911
+ clear(): void;
3911
3912
  addDependencies(files: readonly IFile[]): IRegistry;
3912
3913
  addDependency(file: IFile): IRegistry;
3913
3914
  removeDependency(obj: IObject): void;
@@ -5,9 +5,19 @@ const combi_1 = require("../combi");
5
5
  const tokens_1 = require("../../1_lexer/tokens");
6
6
  const _1 = require(".");
7
7
  class SQLFrom extends combi_1.Expression {
8
+ // todo: rewrite/refactor this method
8
9
  getRunnable() {
9
- const from = (0, combi_1.seq)("FROM", (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), _1.SQLFromSource);
10
- 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)))));
10
+ const joins = (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), _1.SQLJoin));
11
+ // No opening parens
12
+ const from0 = (0, combi_1.seq)("FROM", _1.SQLFromSource, joins);
13
+ // 1 to 6 opening parens, with up to that many closing parens at the end
14
+ 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)));
15
+ 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)));
16
+ 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)));
17
+ 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)));
18
+ 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)));
19
+ 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)));
20
+ const source = (0, combi_1.altPrio)(from6, from5, from4, from3, from2, from1, from0);
11
21
  return source;
12
22
  }
13
23
  }
@@ -12,9 +12,9 @@ class SQLIn extends combi_1.Expression {
12
12
  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)));
13
13
  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)));
14
14
  // version is a guess, https://github.com/abaplint/abaplint/issues/2530
15
- const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP));
15
+ const listNeww = (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP);
16
16
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
17
- const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));
17
+ const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(subSelect, listOld, listNeww, _1.SQLSource));
18
18
  return inn;
19
19
  }
20
20
  }
@@ -12,7 +12,8 @@ class Field {
12
12
  const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
13
13
  const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
14
14
  const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
15
- const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)("INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE"));
15
+ const into = (0, combi_1.seq)("INTO", expressions_1.FieldChain);
16
+ 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"));
16
17
  const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
17
18
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
18
19
  }
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.113.235";
77
+ return "2.113.237";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.235",
3
+ "version": "2.113.237",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",