@abaplint/transpiler-cli 2.11.90 → 2.11.92

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/bundle.js +25 -30
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -15586,7 +15586,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
15586
15586
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
15587
15587
  class Select {
15588
15588
  getMatcher() {
15589
- const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), expressions_1.Select));
15589
+ const union = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), expressions_1.Select), version_1.Version.OpenABAP);
15590
15590
  return (0, combi_1.seq)(expressions_1.Select, (0, combi_1.starPrio)(union));
15591
15591
  }
15592
15592
  }
@@ -28886,6 +28886,11 @@ class Append {
28886
28886
  if (sourceType instanceof basic_1.TableType) {
28887
28887
  sourceType = sourceType.getRowType();
28888
28888
  }
28889
+ else if (!(sourceType instanceof basic_1.VoidType) && !(sourceType instanceof basic_1.UnknownType)) {
28890
+ const message = "LINES OF must be a table type";
28891
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28892
+ return;
28893
+ }
28889
28894
  if (targetType instanceof basic_1.TableType) {
28890
28895
  targetType = targetType.getRowType();
28891
28896
  }
@@ -35495,14 +35500,18 @@ exports.SELECTION_EVENTS = [
35495
35500
  Statements.EndOfPage,
35496
35501
  ];
35497
35502
  exports.DECLARATION_STUFF = [
35503
+ Statements.Type,
35504
+ Statements.TypeBegin,
35505
+ Statements.TypeEnum,
35506
+ Statements.TypeEnumBegin,
35498
35507
  Statements.Data,
35499
35508
  Statements.DataBegin,
35500
35509
  Statements.Constant,
35510
+ Statements.ConstantBegin,
35501
35511
  Statements.Tables,
35502
35512
  Statements.Include, // this is not super correct, but anyhow
35503
35513
  Statements.Parameter,
35504
35514
  Statements.SelectionScreen,
35505
- Statements.ConstantBegin,
35506
35515
  Statements.Define,
35507
35516
  ];
35508
35517
  //# sourceMappingURL=selection_events.js.map
@@ -53893,7 +53902,7 @@ class Registry {
53893
53902
  }
53894
53903
  static abaplintVersion() {
53895
53904
  // magic, see build script "version.sh"
53896
- return "2.113.200";
53905
+ return "2.113.201";
53897
53906
  }
53898
53907
  getDDICReferences() {
53899
53908
  return this.ddicReferences;
@@ -78429,10 +78438,18 @@ exports.AttributeChainTranspiler = AttributeChainTranspiler;
78429
78438
 
78430
78439
  Object.defineProperty(exports, "__esModule", ({ value: true }));
78431
78440
  exports.AttributeNameTranspiler = void 0;
78441
+ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
78432
78442
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
78433
78443
  class AttributeNameTranspiler {
78434
78444
  transpile(node, traversal) {
78435
- return new chunk_1.Chunk().append(node.concatTokens(), node, traversal);
78445
+ let concat = node.concatTokens().toLowerCase();
78446
+ // todo: this needs to also check the class name is correct
78447
+ const ref = traversal.findReadOrWriteReference(node.getFirstToken());
78448
+ if (ref instanceof abaplint.Types.ClassAttribute
78449
+ && ref.getVisibility() === abaplint.Visibility.Private) {
78450
+ concat = "#" + concat;
78451
+ }
78452
+ return new chunk_1.Chunk().append(concat, node, traversal);
78436
78453
  }
78437
78454
  }
78438
78455
  exports.AttributeNameTranspiler = AttributeNameTranspiler;
@@ -88684,7 +88701,10 @@ function escapeRegExp(string) {
88684
88701
  // TODO: currently SELECT into are always handled as CORRESPONDING
88685
88702
  class SelectTranspiler {
88686
88703
  transpile(node, traversal, targetOverride) {
88687
- if (node.findDirectTokenByText("ALL") !== undefined) {
88704
+ if (node.findDirectTokenByText("UNION") !== undefined) {
88705
+ return new chunk_1.Chunk(`throw new Error("SELECT UNION, not supported, transpiler, todo");`);
88706
+ }
88707
+ else if (node.findDirectTokenByText("ALL") !== undefined) {
88688
88708
  throw new Error("SelectTranspiler, UNION ALL todo");
88689
88709
  }
88690
88710
  else if (node.findDirectTokenByText("DISTINCT") !== undefined) {
@@ -91821,15 +91841,6 @@ class Traversal {
91821
91841
  return obj.getName().toLowerCase();
91822
91842
  }
91823
91843
  }
91824
- /*
91825
- const file = this.reg.getFileByName(ref.getFilename());
91826
- if (file) {
91827
- const obj = this.reg.findObjectForFile(file);
91828
- if (obj?.getType() === "INTF") {
91829
- return obj.getName().toLowerCase();
91830
- }
91831
- }
91832
- */
91833
91844
  return undefined;
91834
91845
  }
91835
91846
  findReadOrWriteReference(token) {
@@ -91916,22 +91927,6 @@ class Traversal {
91916
91927
  // NOTE: currently all are needed in the unit test setup
91917
91928
  ret += `"${name.replace("~", "$")}": this.${methodName}.bind(this),\n`;
91918
91929
  }
91919
- /*
91920
- for (const attribute of def.getAttributes()?.getAll() || []) {
91921
- if (attribute.getMeta().includes(abaplint.IdentifierMeta.Static) === true) {
91922
- // hmm, is this correct?
91923
- continue;
91924
- }
91925
- let privateHash = "";
91926
- if (attribute.getVisibility() === abaplint.Visibility.Private) {
91927
- privateHash = "#";
91928
- } else {
91929
- continue;
91930
- }
91931
- const attributeName = privateHash + Traversal.escapeNamespace(attribute.getName().toLowerCase());
91932
- ret += `"${attribute.getName().toLowerCase()}": this.${attributeName},\n`;
91933
- }
91934
- */
91935
91930
  ret += "};\n";
91936
91931
  return ret;
91937
91932
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.90",
3
+ "version": "2.11.92",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,10 +27,10 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.113.200",
31
- "@abaplint/transpiler": "^2.11.90",
30
+ "@abaplint/core": "^2.113.201",
31
+ "@abaplint/transpiler": "^2.11.92",
32
32
  "@types/glob": "^8.1.0",
33
- "@types/node": "^24.3.1",
33
+ "@types/node": "^24.4.0",
34
34
  "@types/progress": "^2.0.7",
35
35
  "glob": "=7.2.0",
36
36
  "progress": "^2.0.3",