@abaplint/transpiler 2.10.81 → 2.10.83

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,18 @@ 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
+ let code = "";
91
+ if (condition) {
92
+ code = new expressions_1.FieldChainTranspiler(true).transpile(condition, traversal).getCode();
93
+ }
94
+ else {
95
+ code = `"transpiler, const dynamic loop where todo"`;
96
+ }
97
+ extra.push(`dynamicWhere: {condition: ${code}, evaluate: (name) => {try { return eval(name);} catch {}}}`);
98
+ }
87
99
  const topEquals = {};
88
100
  for (const compare of whereNode?.findDirectExpressions(abaplint.Expressions.ComponentCompare) || []) {
89
101
  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.81",
3
+ "version": "2.10.83",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",