@abaplint/transpiler 2.11.31 → 2.11.32

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.
@@ -84,10 +84,12 @@ class CompareTranspiler {
84
84
  }
85
85
  const chain = node.findDirectExpression(core_1.Expressions.MethodCallChain);
86
86
  if (chain) {
87
+ const negated = concat.startsWith("NOT ");
87
88
  const name = chain.getFirstToken().getStr();
88
89
  if (core_1.BuiltIn.isPredicate(name)) {
89
90
  // todo, this is not completely correct if there is a method shadowing the name
90
- return new chunk_1.Chunk().appendString(`abap.compare.eq(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
91
+ const operator = negated ? 'ne' : 'eq';
92
+ return new chunk_1.Chunk().appendString(`abap.compare.${operator}(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
91
93
  }
92
94
  else {
93
95
  return new chunk_1.Chunk().appendString(pre + `abap.compare.initial(${traversal.traverse(chain).getCode()}) === false`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.11.31",
3
+ "version": "2.11.32",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",