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

Method createTarget

test/compute-engine/compile-plugin.test.ts:87–102  ·  view source on GitHub ↗
(options: Partial<CompileTarget> = {})

Source from the content-addressed store, hash-verified

85 }
86
87 createTarget(options: Partial<CompileTarget> = {}): CompileTarget {
88 const fns = this.getFunctions();
89
90 return {
91 language: 'rpn',
92 operators: () => undefined,
93 functions: (id) => fns[id],
94 var: (id) => id,
95 string: (str) => str,
96 number: (n) => n.toString(),
97 indent: 0,
98 ws: () => '',
99 preamble: '',
100 ...options,
101 };
102 }
103
104 compile(expr: Expression, options: any = {}): CompilationResult {
105 const { BaseCompiler } = require('../../src/compute-engine/compilation/base-compiler');

Callers 1

compileMethod · 0.95

Calls 2

getFunctionsMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected