MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / createTarget

Method createTarget

examples/compile-plugin-architecture.js:159–174  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

157 }
158
159 createTarget(options = {}) {
160 const fns = this.getFunctions();
161
162 return {
163 language: 'rpn',
164 operators: () => undefined,
165 functions: (id) => fns[id],
166 var: (id) => id,
167 string: (str) => str,
168 number: (n) => n.toString(),
169 indent: 0,
170 ws: () => '',
171 preamble: '',
172 ...options,
173 };
174 }
175
176 compileToExecutable(expr, options = {}) {
177 const target = this.createTarget();

Callers 1

compileToExecutableMethod · 0.95

Calls 2

getFunctionsMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected