@abaplint/core 2.113.166 → 2.113.167

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.
@@ -2306,6 +2306,7 @@ declare namespace Expressions {
2306
2306
  ComponentChainSimple,
2307
2307
  ComponentChain,
2308
2308
  ComponentCompareSimple,
2309
+ ValueBase,
2309
2310
  ComponentCompareSingle,
2310
2311
  ComponentCompare,
2311
2312
  ComponentCondSub,
@@ -7388,6 +7389,10 @@ declare class Value extends Expression {
7388
7389
  getRunnable(): IStatementRunnable;
7389
7390
  }
7390
7391
 
7392
+ declare class ValueBase extends Expression {
7393
+ getRunnable(): IStatementRunnable;
7394
+ }
7395
+
7391
7396
  declare class ValueBody extends Expression {
7392
7397
  getRunnable(): IStatementRunnable;
7393
7398
  }
@@ -39,6 +39,7 @@ __exportStar(require("./compare"), exports);
39
39
  __exportStar(require("./component_chain_simple"), exports);
40
40
  __exportStar(require("./component_chain"), exports);
41
41
  __exportStar(require("./component_compare_simple"), exports);
42
+ __exportStar(require("./value_base"), exports);
42
43
  __exportStar(require("./component_compare_single"), exports);
43
44
  __exportStar(require("./component_compare"), exports);
44
45
  __exportStar(require("./component_cond_sub"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValueBase = void 0;
4
+ const combi_1 = require("../combi");
5
+ const _1 = require(".");
6
+ class ValueBase extends combi_1.Expression {
7
+ getRunnable() {
8
+ return (0, combi_1.seq)("BASE", _1.Source);
9
+ }
10
+ }
11
+ exports.ValueBase = ValueBase;
12
+ //# sourceMappingURL=value_base.js.map
@@ -6,8 +6,7 @@ const _1 = require(".");
6
6
  const version_1 = require("../../../version");
7
7
  class ValueBody extends combi_1.Expression {
8
8
  getRunnable() {
9
- const base = (0, combi_1.seq)("BASE", _1.Source);
10
- const strucOrTab = (0, combi_1.seq)((0, combi_1.optPrio)(_1.Let), (0, combi_1.optPrio)(base), (0, combi_1.star)(_1.For), (0, combi_1.plusPrio)((0, combi_1.altPrio)(_1.FieldAssignment, _1.ValueBodyLine)));
9
+ const strucOrTab = (0, combi_1.seq)((0, combi_1.optPrio)(_1.Let), (0, combi_1.optPrio)(_1.ValueBase), (0, combi_1.star)(_1.For), (0, combi_1.plusPrio)((0, combi_1.altPrio)(_1.FieldAssignment, _1.ValueBodyLine)));
11
10
  const tabdef = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.altPrio)("OPTIONAL", (0, combi_1.seq)("DEFAULT", _1.Source)));
12
11
  return (0, combi_1.optPrio)((0, combi_1.altPrio)(strucOrTab, (0, combi_1.seq)(_1.Source, (0, combi_1.optPrio)(tabdef))));
13
12
  }
@@ -12,7 +12,7 @@ class Append {
12
12
  const fromIndex = (0, combi_1.seq)("FROM", expressions_1.Source);
13
13
  const toIndex = (0, combi_1.seq)("TO", expressions_1.Source);
14
14
  const toTarget = (0, combi_1.seq)("TO", expressions_1.Target);
15
- const src = (0, combi_1.alt)(expressions_1.SimpleSource4, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source));
15
+ const src = (0, combi_1.alt)(expressions_1.SimpleSource4, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP));
16
16
  return (0, combi_1.seq)("APPEND", (0, combi_1.altPrio)("INITIAL LINE", (0, combi_1.seq)((0, combi_1.optPrio)("LINES OF"), src)), (0, combi_1.optPrio)(fromIndex), (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.seq)(toIndex, toTarget), toTarget)), (0, combi_1.opt)((0, combi_1.altPrio)(assigning, reference)), (0, combi_1.optPrio)("CASTING"), (0, combi_1.optPrio)(sorted));
17
17
  }
18
18
  }
@@ -18,7 +18,7 @@ class InsertInternal {
18
18
  const fromTo = (0, combi_1.opt)((0, combi_1.per)(from, to));
19
19
  const foo = (0, combi_1.alt)(intoTable, (0, combi_1.seq)(into, (0, combi_1.opt)((0, combi_1.per)(index, (0, combi_1.alt)(ref, assigning)))), (0, combi_1.per)(index, (0, combi_1.alt)(ref, assigning)));
20
20
  const lines = (0, combi_1.seq)("LINES OF", target, (0, combi_1.opt)(fromTo));
21
- const src = (0, combi_1.alt)(expressions_1.SimpleSource4, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source));
21
+ const src = (0, combi_1.alt)(expressions_1.SimpleSource4, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP));
22
22
  const tab = (0, combi_1.seq)("TABLE", expressions_1.Source);
23
23
  const ret = (0, combi_1.seq)("INSERT", (0, combi_1.altPrio)(tab, (0, combi_1.seq)((0, combi_1.altPrio)(initial, lines, src), foo)));
24
24
  return ret;
@@ -10,7 +10,7 @@ const basic_1 = require("../../types/basic");
10
10
  const _syntax_input_1 = require("../_syntax_input");
11
11
  class ValueBody {
12
12
  static runSyntax(node, input, targetType) {
13
- var _a;
13
+ var _a, _b;
14
14
  if (node === undefined) {
15
15
  return targetType;
16
16
  }
@@ -43,6 +43,9 @@ class ValueBody {
43
43
  for (const s of node.findDirectExpressions(Expressions.Source)) {
44
44
  type = source_1.Source.runSyntax(s, input, type);
45
45
  }
46
+ for (const s of ((_b = node.findDirectExpression(Expressions.ValueBase)) === null || _b === void 0 ? void 0 : _b.findDirectExpressions(Expressions.Source)) || []) {
47
+ type = source_1.Source.runSyntax(s, input, type);
48
+ }
46
49
  for (const foo of node.findDirectExpressions(Expressions.ValueBodyLine)) {
47
50
  if (!(targetType instanceof basic_1.TableType)
48
51
  && !(targetType instanceof basic_1.UnknownType)
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.166";
70
+ return "2.113.167";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -2248,7 +2248,7 @@ ${indentation} output = ${uniqueName}.\n`;
2248
2248
  return undefined;
2249
2249
  }
2250
2250
  outlineValue(low, high, lowFile, highSyntax) {
2251
- var _a, _b, _c;
2251
+ var _a, _b, _c, _d;
2252
2252
  if (!(low.get() instanceof _statement_1.Unknown)) {
2253
2253
  return undefined;
2254
2254
  }
@@ -2274,7 +2274,7 @@ ${indentation} output = ${uniqueName}.\n`;
2274
2274
  const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
2275
2275
  let indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
2276
2276
  let body = "";
2277
- const base = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findExpressionAfterToken("BASE");
2277
+ const base = (_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBase)) === null || _b === void 0 ? void 0 : _b.findExpressionAfterToken("BASE");
2278
2278
  if (base) {
2279
2279
  body += indentation + uniqueName + " = " + base.concatTokens() + ".\n";
2280
2280
  }
@@ -2343,7 +2343,7 @@ ${indentation} output = ${uniqueName}.\n`;
2343
2343
  }
2344
2344
  }
2345
2345
  }
2346
- if (body === "" && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase()) === "OPTIONAL") {
2346
+ if (body === "" && ((_c = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStr().toUpperCase()) === "OPTIONAL") {
2347
2347
  const fieldChain = valueBody.findFirstExpression(Expressions.FieldChain);
2348
2348
  const rowName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
2349
2349
  let tableExpression = undefined;
@@ -2362,7 +2362,7 @@ ${indentation} output = ${uniqueName}.\n`;
2362
2362
  }
2363
2363
  let condition = "";
2364
2364
  if ((tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.getChildren().length) === 3) {
2365
- condition = "INDEX " + ((_c = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens());
2365
+ condition = "INDEX " + ((_d = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _d === void 0 ? void 0 : _d.concatTokens());
2366
2366
  }
2367
2367
  else {
2368
2368
  condition = "WITH KEY " + (tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.concatTokens().replace("[ ", "").replace(" ]", ""));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.166",
3
+ "version": "2.113.167",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",