@abaplint/transpiler-cli 2.11.22 → 2.11.24

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 +23 -4
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -3316,7 +3316,7 @@ class Compare extends combi_1.Expression {
3316
3316
  const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
3317
3317
  // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
3318
3318
  // but also seems to work in v740sp05, blah
3319
- const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);
3319
+ const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain, version_1.Version.OpenABAP);
3320
3320
  const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
3321
3321
  const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbolChain, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
3322
3322
  const ret = (0, combi_1.seq)((0, combi_1.opt)("NOT"), (0, combi_1.altPrio)(rett, predicate, fsassign));
@@ -15086,7 +15086,7 @@ class ReadTable {
15086
15086
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
15087
15087
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15088
15088
  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");
15089
- 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)), (0, combi_1.opt)(perm));
15089
+ 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));
15090
15090
  }
15091
15091
  }
15092
15092
  exports.ReadTable = ReadTable;
@@ -53712,7 +53712,7 @@ class Registry {
53712
53712
  }
53713
53713
  static abaplintVersion() {
53714
53714
  // magic, see build script "version.sh"
53715
- return "2.113.167";
53715
+ return "2.113.168";
53716
53716
  }
53717
53717
  getDDICReferences() {
53718
53718
  return this.ddicReferences;
@@ -78317,6 +78317,17 @@ class CompareTranspiler {
78317
78317
  const s2 = traversal.traverse(sources[2]);
78318
78318
  return new chunk_1.Chunk().appendString(pre + "abap.compare.between(").join([s0, s1, s2]).appendString(")");
78319
78319
  }
78320
+ const chain = node.findDirectExpression(core_1.Expressions.MethodCallChain);
78321
+ if (chain) {
78322
+ const name = chain.getFirstToken().getStr();
78323
+ if (new core_1.BuiltIn().isPredicate(name)) {
78324
+ // todo, this is not completely correct if there is a method shadowing the name
78325
+ return new chunk_1.Chunk().appendString(`abap.compare.eq(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
78326
+ }
78327
+ else {
78328
+ return new chunk_1.Chunk().appendString(pre + `abap.compare.initial(${traversal.traverse(chain).getCode()}) === false`);
78329
+ }
78330
+ }
78320
78331
  console.dir(sources.length);
78321
78332
  console.dir(concat);
78322
78333
  return new chunk_1.Chunk("CompareTodo");
@@ -86937,7 +86948,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
86937
86948
  class ReadTableTranspiler {
86938
86949
  transpile(node, traversal) {
86939
86950
  let prefix = "";
86940
- const s = node.findDirectExpression(abaplint.Expressions.SimpleSource2);
86951
+ const s = node.getChildren()[2];
86941
86952
  const ret = traversal.traverse(s).getCode();
86942
86953
  const extra = [];
86943
86954
  const index = node.findExpressionAfterToken("INDEX");
@@ -90642,6 +90653,14 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
90642
90653
  return abaplint.BasicTypes.StringType.get();
90643
90654
  case "xstring":
90644
90655
  return abaplint.BasicTypes.XStringType.get();
90656
+ case "decfloat16":
90657
+ return new abaplint.BasicTypes.DecFloat16Type();
90658
+ case "decfloat34":
90659
+ return new abaplint.BasicTypes.DecFloat34Type();
90660
+ case "utclong":
90661
+ return new abaplint.BasicTypes.UTCLongType();
90662
+ case "int8":
90663
+ return new abaplint.BasicTypes.Integer8Type();
90645
90664
  case "d":
90646
90665
  return new abaplint.BasicTypes.DateType();
90647
90666
  case "t":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.22",
3
+ "version": "2.11.24",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.113.167",
31
- "@abaplint/transpiler": "^2.11.22",
30
+ "@abaplint/core": "^2.113.168",
31
+ "@abaplint/transpiler": "^2.11.24",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.2.1",
34
34
  "@types/progress": "^2.0.7",