(options = {})
| 79 | } |
| 80 | |
| 81 | createTarget(options = {}) { |
| 82 | const ops = this.getOperators(); |
| 83 | const fns = this.getFunctions(); |
| 84 | |
| 85 | return { |
| 86 | language: 'python', |
| 87 | operators: (op) => ops[op], |
| 88 | functions: (id) => fns[id], |
| 89 | var: (id) => id, |
| 90 | string: (str) => JSON.stringify(str), |
| 91 | number: (n) => n.toString(), |
| 92 | indent: 0, |
| 93 | ws: (s) => s ?? '', |
| 94 | preamble: '', |
| 95 | ...options, |
| 96 | }; |
| 97 | } |
| 98 | |
| 99 | compileToExecutable(expr, options = {}) { |
| 100 | const target = this.createTarget(); |
no test coverage detected