@abaplint/cli 2.113.229 → 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 +28 -16
  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;
@@ -24168,6 +24171,9 @@ class BasicTypes {
24168
24171
  if (chain === undefined) {
24169
24172
  chain = node.findFirstExpression(Expressions.SimpleFieldChain);
24170
24173
  }
24174
+ if (chain === undefined) {
24175
+ chain = node.findFirstExpression(Expressions.SimpleFieldChain2);
24176
+ }
24171
24177
  if (chain === undefined) {
24172
24178
  throw new Error("resolveLikeName, chain undefined");
24173
24179
  }
@@ -25452,7 +25458,7 @@ class ComponentCompareSimple {
25452
25458
  else if (c.get() instanceof Expressions.Dynamic) {
25453
25459
  targetType = undefined;
25454
25460
  }
25455
- else if (c.get() instanceof Expressions.Source) {
25461
+ else if (c.get() instanceof Expressions.Source || c.get() instanceof Expressions.SimpleSource4) {
25456
25462
  const sourceType = source_1.Source.runSyntax(c, input, targetType);
25457
25463
  if (targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType, targetType) === false) {
25458
25464
  const message = "ComponentCompareSimple, incompatible types";
@@ -26022,7 +26028,7 @@ class FieldChain {
26022
26028
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
26023
26029
  && node.findDirectExpression(Expressions.ComponentName)) {
26024
26030
  // workaround for names with dashes, eg. "sy-repid"
26025
- const concat = node.concatTokens();
26031
+ const concat = node.concatTokens().replace(/ /g, "");
26026
26032
  const offset = ((_b = node.findDirectExpression(Expressions.FieldOffset)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
26027
26033
  const length = ((_c = node.findDirectExpression(Expressions.FieldLength)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "";
26028
26034
  const found = input.scope.findVariable(concat.replace(offset, "").replace(length, ""));
@@ -31154,7 +31160,7 @@ class Controls {
31154
31160
  }
31155
31161
  if (node.findDirectTokenByText("TABLEVIEW") && token) {
31156
31162
  const cols = new basic_1.StructureType([
31157
- { name: "SCREEN", type: new basic_1.CharacterType(1) }, // todo
31163
+ { name: "SCREEN", type: basic_1.VoidType.get("TABLEVIEW-SCREEN") }, // todo
31158
31164
  { name: "INDEX", type: basic_1.IntegerType.get() },
31159
31165
  { name: "SELECTED", type: new basic_1.CharacterType(1) },
31160
31166
  { name: "VISLENGTH", type: basic_1.IntegerType.get() },
@@ -33843,7 +33849,7 @@ class Ranges {
33843
33849
  if (typeExpression === undefined) {
33844
33850
  throw new assert_error_1.AssertError("Ranges, unexpected node");
33845
33851
  }
33846
- const found = new basic_types_1.BasicTypes(input).parseType(typeExpression);
33852
+ const found = new basic_types_1.BasicTypes(input).resolveLikeName(typeExpression);
33847
33853
  if (found && nameToken) {
33848
33854
  const structure = new basic_1.StructureType([
33849
33855
  { name: "sign", type: new basic_1.CharacterType(1) },
@@ -33948,11 +33954,8 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
33948
33954
  class ReadTable {
33949
33955
  runSyntax(node, input) {
33950
33956
  const concat = node.concatTokens().toUpperCase();
33951
- const sources = node.findDirectExpressions(Expressions.Source);
33952
- let firstSource = node.findDirectExpression(Expressions.SimpleSource2);
33953
- if (firstSource === undefined) {
33954
- firstSource = sources[0];
33955
- }
33957
+ const sources = node.findDirectExpressionsMulti([Expressions.Source, Expressions.SimpleSource2]);
33958
+ const firstSource = sources[0];
33956
33959
  const sourceType = firstSource ? source_1.Source.runSyntax(firstSource, input) : undefined;
33957
33960
  if (sourceType === undefined) {
33958
33961
  const message = "No source type determined, read table";
@@ -35596,7 +35599,7 @@ class Data {
35596
35599
  static runSyntax(node, input) {
35597
35600
  var _a;
35598
35601
  const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
35599
- const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
35602
+ const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens().toUpperCase() === "COMMON";
35600
35603
  if (isCommonPart) {
35601
35604
  this.runCommonPartSyntax(node, input);
35602
35605
  return undefined;
@@ -37194,6 +37197,15 @@ class StatementNode extends _abstract_node_1.AbstractNode {
37194
37197
  }
37195
37198
  return ret;
37196
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
+ }
37197
37209
  findDirectTokenByText(text) {
37198
37210
  const upper = text.toUpperCase();
37199
37211
  for (const child of this.getChildren()) {
@@ -54724,7 +54736,7 @@ class Registry {
54724
54736
  }
54725
54737
  static abaplintVersion() {
54726
54738
  // magic, see build script "version.sh"
54727
- return "2.113.229";
54739
+ return "2.113.231";
54728
54740
  }
54729
54741
  getDDICReferences() {
54730
54742
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.229",
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.229",
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",