@abaplint/cli 2.105.21 → 2.105.22

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 +24 -4
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -30197,7 +30197,11 @@ class GetReference {
30197
30197
  const type = new source_1.Source().runSyntax(s, scope, filename);
30198
30198
  const target = node.findDirectExpression(Expressions.Target);
30199
30199
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
30200
+ // todo: error if inline field symbol
30200
30201
  if (inline) {
30202
+ if (type instanceof basic_1.AnyType) {
30203
+ throw new Error("GET REFERENCE generic and inline declaration not possible");
30204
+ }
30201
30205
  new inline_data_1.InlineData().runSyntax(inline, scope, filename, type ? new basic_1.DataReference(type) : undefined);
30202
30206
  }
30203
30207
  else if (target) {
@@ -32980,7 +32984,10 @@ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@a
32980
32984
  class Write {
32981
32985
  runSyntax(node, scope, filename) {
32982
32986
  // todo, more
32983
- const second = node.getChildren()[1];
32987
+ let second = node.getChildren()[1];
32988
+ if (second.get() instanceof Expressions.WriteOffsetLength) {
32989
+ second = node.getChildren()[2];
32990
+ }
32984
32991
  for (const s of node.findAllExpressions(Expressions.Source)) {
32985
32992
  const type = new source_1.Source().runSyntax(s, scope, filename);
32986
32993
  if (s === second
@@ -51297,7 +51304,7 @@ class Registry {
51297
51304
  }
51298
51305
  static abaplintVersion() {
51299
51306
  // magic, see build script "version.sh"
51300
- return "2.105.21";
51307
+ return "2.105.22";
51301
51308
  }
51302
51309
  getDDICReferences() {
51303
51310
  return this.ddicReferences;
@@ -57215,7 +57222,7 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
57215
57222
  return undefined;
57216
57223
  }
57217
57224
  downportRefSimple(high, lowFile, highSyntax) {
57218
- var _a;
57225
+ var _a, _b;
57219
57226
  if (!(high.get() instanceof Statements.Move)
57220
57227
  || high.getChildren().length !== 4
57221
57228
  || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== "REF") {
@@ -57240,7 +57247,20 @@ ENDIF.
57240
57247
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
57241
57248
  }
57242
57249
  else {
57243
- code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${target.concatTokens()}`;
57250
+ const concat = target.concatTokens();
57251
+ code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${concat}`;
57252
+ // workaround for handling generic ANY type,
57253
+ if (concat.toUpperCase().startsWith("DATA(")) {
57254
+ const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());
57255
+ if (spag !== undefined) {
57256
+ const found = spag.findVariable(sourceRef.concatTokens());
57257
+ const tt = found === null || found === void 0 ? void 0 : found.getType();
57258
+ if (tt instanceof basic_1.AnyType) {
57259
+ const tname = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
57260
+ code = `DATA ${tname} TYPE REF TO data.\nGET REFERENCE OF ${sourceRef.concatTokens()} INTO ${tname}`;
57261
+ }
57262
+ }
57263
+ }
57244
57264
  }
57245
57265
  const start = high.getFirstToken().getStart();
57246
57266
  const end = high.getLastToken().getStart();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.105.21",
3
+ "version": "2.105.22",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,8 +38,8 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.105.21",
42
- "@types/chai": "^4.3.11",
41
+ "@abaplint/core": "^2.105.22",
42
+ "@types/chai": "^4.3.12",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.6",
@@ -47,7 +47,7 @@
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.4.1",
49
49
  "chalk": "^5.3.0",
50
- "eslint": "^8.56.0",
50
+ "eslint": "^8.57.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.7.7",