@abaplint/cli 2.120.104 → 2.120.105

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 +16 -8
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -45190,6 +45190,7 @@ var __importStar = (this && this.__importStar) || (function () {
45190
45190
  Object.defineProperty(exports, "__esModule", ({ value: true }));
45191
45191
  exports.ModifyInternal = void 0;
45192
45192
  const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
45193
+ const nodes_1 = __webpack_require__(/*! ../../nodes */ "../core/build/src/abap/nodes/index.js");
45193
45194
  const source_1 = __webpack_require__(/*! ../expressions/source */ "../core/build/src/abap/5_syntax/expressions/source.js");
45194
45195
  const target_1 = __webpack_require__(/*! ../expressions/target */ "../core/build/src/abap/5_syntax/expressions/target.js");
45195
45196
  const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "../core/build/src/abap/5_syntax/expressions/fstarget.js");
@@ -45198,15 +45199,22 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/
45198
45199
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
45199
45200
  class ModifyInternal {
45200
45201
  runSyntax(node, input) {
45201
- for (const s of node.findDirectExpressions(Expressions.Source)) {
45202
- source_1.Source.runSyntax(s, input);
45203
- }
45202
+ var _a;
45204
45203
  // there is only one
45205
45204
  const target = node.findFirstExpression(Expressions.Target);
45206
- const targetExpression = target;
45207
- if (targetExpression) {
45208
- // it might be a dynamic target
45209
- const targetType = target_1.Target.runSyntax(targetExpression, input);
45205
+ // it might be a dynamic target
45206
+ const targetType = target ? target_1.Target.runSyntax(target, input) : undefined;
45207
+ // the FROM work area has the row type of the table, used for inferring "#"
45208
+ const rowType = targetType instanceof basic_1.TableType ? targetType.getRowType() : undefined;
45209
+ const children = node.getChildren();
45210
+ for (let i = 0; i < children.length; i++) {
45211
+ const s = children[i];
45212
+ if (s instanceof nodes_1.ExpressionNode && s.get() instanceof Expressions.Source) {
45213
+ const isFrom = ((_a = children[i - 1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "FROM";
45214
+ source_1.Source.runSyntax(s, input, isFrom ? rowType : undefined);
45215
+ }
45216
+ }
45217
+ if (target) {
45210
45218
  if (targetType instanceof basic_1.VoidType
45211
45219
  || targetType instanceof basic_1.AnyType
45212
45220
  || targetType instanceof basic_1.UnknownType) {
@@ -73631,7 +73639,7 @@ class Registry {
73631
73639
  }
73632
73640
  static abaplintVersion() {
73633
73641
  // magic, see build script "version.js"
73634
- return "2.120.104";
73642
+ return "2.120.105";
73635
73643
  }
73636
73644
  getDDICReferences() {
73637
73645
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.104",
3
+ "version": "2.120.105",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.104",
42
+ "@abaplint/core": "^2.120.105",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",