@abaplint/transpiler 2.10.80 → 2.10.82

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,6 +84,17 @@ class LoopTranspiler {
84
84
  // todo, evil workaround removing "await",
85
85
  extra.push("where: async " + where);
86
86
  }
87
+ const afterWhere = node.findExpressionAfterToken("WHERE");
88
+ if (afterWhere && afterWhere.get() instanceof abaplint.Expressions.Dynamic) {
89
+ const condition = afterWhere.findFirstExpression(abaplint.Expressions.FieldChain);
90
+ if (condition) {
91
+ const code = new expressions_1.FieldChainTranspiler(true).transpile(condition, traversal).getCode();
92
+ extra.push(`dynamicWhere: {condition: ${code}, evaluate: (name) => {try { return eval(name);} catch {}}}`);
93
+ }
94
+ else {
95
+ throw new Error("LoopTranspiler, dynamic where not implemented");
96
+ }
97
+ }
87
98
  const topEquals = {};
88
99
  for (const compare of whereNode?.findDirectExpressions(abaplint.Expressions.ComponentCompare) || []) {
89
100
  const op = compare.findDirectExpression(abaplint.Expressions.CompareOperator)?.concatTokens().toUpperCase();
@@ -1,8 +1,11 @@
1
1
  import * as abaplint from "@abaplint/core";
2
2
  /** @uniqueItems true */
3
3
  export type TestMethodList = {
4
+ /** @pattern ^[a-zA-Z0-9_\/]+$ */
4
5
  object: string;
6
+ /** @pattern ^[a-zA-Z0-9_\/]+$ */
5
7
  class: string;
8
+ /** @pattern ^[a-zA-Z0-9_\/]+$ */
6
9
  method: string;
7
10
  note?: string;
8
11
  }[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.10.80",
3
+ "version": "2.10.82",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",