@abaplint/cli 2.113.230 → 2.113.231

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 +22 -13
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -4547,9 +4547,11 @@ exports.ComponentCompareSimple = void 0;
4547
4547
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
4548
4548
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
4549
4549
  const component_chain_simple_1 = __webpack_require__(/*! ./component_chain_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js");
4550
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
4550
4551
  class ComponentCompareSimple extends combi_1.Expression {
4551
4552
  getRunnable() {
4552
- const ret = (0, combi_1.seq)((0, combi_1.altPrio)(component_chain_simple_1.ComponentChainSimple, _1.Dynamic), "=", _1.Source);
4553
+ const source = (0, combi_1.alt)(_1.SimpleSource4, (0, combi_1.ver)(version_1.Version.v740sp02, _1.Source, version_1.Version.OpenABAP));
4554
+ const ret = (0, combi_1.seq)((0, combi_1.altPrio)(component_chain_simple_1.ComponentChainSimple, _1.Dynamic), "=", source);
4553
4555
  return (0, combi_1.plus)(ret);
4554
4556
  }
4555
4557
  }
@@ -10748,7 +10750,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10748
10750
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
10749
10751
  class CallBadi {
10750
10752
  getMatcher() {
10751
- const call = (0, combi_1.seq)("CALL", "BADI", expressions_1.MethodSource, expressions_1.MethodCallBody);
10753
+ const call = (0, combi_1.seq)("CALL BADI", expressions_1.MethodSource, expressions_1.MethodCallBody);
10752
10754
  return (0, combi_1.verNot)(version_1.Version.Cloud, call);
10753
10755
  }
10754
10756
  }
@@ -16307,11 +16309,12 @@ class ReadTable {
16307
16309
  const comparing = (0, combi_1.seq)("COMPARING", (0, combi_1.alt)((0, combi_1.plus)(expressions_1.FieldSub), (0, combi_1.plus)(expressions_1.Dynamic)));
16308
16310
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
16309
16311
  const components = (0, combi_1.seq)((0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic), "COMPONENTS", expressions_1.ComponentCompareSimple);
16310
- const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), expressions_1.Source)));
16312
+ const source = (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP));
16313
+ const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), source)));
16311
16314
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
16312
- const from = (0, combi_1.seq)("FROM", expressions_1.Source);
16315
+ const from = (0, combi_1.seq)("FROM", source);
16313
16316
  const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields)), "BINARY SEARCH");
16314
- return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP)), (0, combi_1.opt)(perm));
16317
+ return (0, combi_1.seq)("READ TABLE", source, (0, combi_1.opt)(perm));
16315
16318
  }
16316
16319
  }
16317
16320
  exports.ReadTable = ReadTable;
@@ -25455,7 +25458,7 @@ class ComponentCompareSimple {
25455
25458
  else if (c.get() instanceof Expressions.Dynamic) {
25456
25459
  targetType = undefined;
25457
25460
  }
25458
- else if (c.get() instanceof Expressions.Source) {
25461
+ else if (c.get() instanceof Expressions.Source || c.get() instanceof Expressions.SimpleSource4) {
25459
25462
  const sourceType = source_1.Source.runSyntax(c, input, targetType);
25460
25463
  if (targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType, targetType) === false) {
25461
25464
  const message = "ComponentCompareSimple, incompatible types";
@@ -26025,7 +26028,7 @@ class FieldChain {
26025
26028
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
26026
26029
  && node.findDirectExpression(Expressions.ComponentName)) {
26027
26030
  // workaround for names with dashes, eg. "sy-repid"
26028
- const concat = node.concatTokens();
26031
+ const concat = node.concatTokens().replace(/ /g, "");
26029
26032
  const offset = ((_b = node.findDirectExpression(Expressions.FieldOffset)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
26030
26033
  const length = ((_c = node.findDirectExpression(Expressions.FieldLength)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "";
26031
26034
  const found = input.scope.findVariable(concat.replace(offset, "").replace(length, ""));
@@ -33951,11 +33954,8 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
33951
33954
  class ReadTable {
33952
33955
  runSyntax(node, input) {
33953
33956
  const concat = node.concatTokens().toUpperCase();
33954
- const sources = node.findDirectExpressions(Expressions.Source);
33955
- let firstSource = node.findDirectExpression(Expressions.SimpleSource2);
33956
- if (firstSource === undefined) {
33957
- firstSource = sources[0];
33958
- }
33957
+ const sources = node.findDirectExpressionsMulti([Expressions.Source, Expressions.SimpleSource2]);
33958
+ const firstSource = sources[0];
33959
33959
  const sourceType = firstSource ? source_1.Source.runSyntax(firstSource, input) : undefined;
33960
33960
  if (sourceType === undefined) {
33961
33961
  const message = "No source type determined, read table";
@@ -37197,6 +37197,15 @@ class StatementNode extends _abstract_node_1.AbstractNode {
37197
37197
  }
37198
37198
  return ret;
37199
37199
  }
37200
+ findDirectExpressionsMulti(type) {
37201
+ const ret = [];
37202
+ for (const child of this.getChildren()) {
37203
+ if (child instanceof expression_node_1.ExpressionNode && type.some(t => child.get() instanceof t)) {
37204
+ ret.push(child);
37205
+ }
37206
+ }
37207
+ return ret;
37208
+ }
37200
37209
  findDirectTokenByText(text) {
37201
37210
  const upper = text.toUpperCase();
37202
37211
  for (const child of this.getChildren()) {
@@ -54727,7 +54736,7 @@ class Registry {
54727
54736
  }
54728
54737
  static abaplintVersion() {
54729
54738
  // magic, see build script "version.sh"
54730
- return "2.113.230";
54739
+ return "2.113.231";
54731
54740
  }
54732
54741
  getDDICReferences() {
54733
54742
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.230",
3
+ "version": "2.113.231",
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.230",
41
+ "@abaplint/core": "^2.113.231",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",