@abaplint/cli 2.113.183 → 2.113.184

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 +29 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -7919,7 +7919,7 @@ class Source extends combi_1.Expression {
7919
7919
  const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
7920
7920
  const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7921
7921
  const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
7922
- const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7922
+ const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
7923
7923
  const reff = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("REF", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, (0, combi_1.optPrio)("OPTIONAL"), rparen), version_1.Version.OpenABAP);
7924
7924
  const exact = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("EXACT", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, rparen, (0, combi_1.optPrio)(after)));
7925
7925
  const filter = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("FILTER", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.FilterBody, rparen));
@@ -25955,7 +25955,7 @@ class FieldChain {
25955
25955
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
25956
25956
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
25957
25957
  }
25958
- table_expression_1.TableExpression.runSyntax(current, input);
25958
+ table_expression_1.TableExpression.runSyntax(current, input, context);
25959
25959
  if (!(context instanceof basic_1.VoidType)) {
25960
25960
  context = context.getRowType();
25961
25961
  }
@@ -28936,16 +28936,39 @@ exports.SwitchBody = SwitchBody;
28936
28936
 
28937
28937
  Object.defineProperty(exports, "__esModule", ({ value: true }));
28938
28938
  exports.TableExpression = void 0;
28939
+ const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
28939
28940
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
28940
28941
  const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
28942
+ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
28943
+ const component_chain_1 = __webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_chain.js");
28941
28944
  class TableExpression {
28942
- static runSyntax(node, input) {
28945
+ static runSyntax(node, input, rowType) {
28943
28946
  if (node === undefined) {
28944
28947
  return;
28945
28948
  }
28946
- for (const s of node.findDirectExpressions(Expressions.Source)) {
28949
+ let context = rowType;
28950
+ if (context instanceof basic_1.TableType) {
28951
+ context = context.getRowType();
28952
+ }
28953
+ if (node.getChildren().length === 3) {
28954
+ const s = node.findDirectExpression(Expressions.Source);
28955
+ source_1.Source.runSyntax(s, input, context);
28956
+ }
28957
+ else if (node.findDirectTokenByText("INDEX")) {
28958
+ const s = node.findDirectExpression(Expressions.Source);
28947
28959
  source_1.Source.runSyntax(s, input);
28948
28960
  }
28961
+ else {
28962
+ let fieldType = undefined;
28963
+ for (const c of node.getChildren()) {
28964
+ if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.ComponentChainSimple) {
28965
+ fieldType = component_chain_1.ComponentChain.runSyntax(context, c, input);
28966
+ }
28967
+ else if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.Source) {
28968
+ source_1.Source.runSyntax(c, input, fieldType);
28969
+ }
28970
+ }
28971
+ }
28949
28972
  }
28950
28973
  }
28951
28974
  exports.TableExpression = TableExpression;
@@ -29063,7 +29086,7 @@ class Target {
29063
29086
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29064
29087
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
29065
29088
  }
29066
- table_expression_1.TableExpression.runSyntax(current, input);
29089
+ table_expression_1.TableExpression.runSyntax(current, input, context);
29067
29090
  if (!(context instanceof basic_1.VoidType)) {
29068
29091
  context = context.getRowType();
29069
29092
  }
@@ -54926,7 +54949,7 @@ class Registry {
54926
54949
  }
54927
54950
  static abaplintVersion() {
54928
54951
  // magic, see build script "version.sh"
54929
- return "2.113.183";
54952
+ return "2.113.184";
54930
54953
  }
54931
54954
  getDDICReferences() {
54932
54955
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.183",
3
+ "version": "2.113.184",
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.183",
41
+ "@abaplint/core": "^2.113.184",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",