MCPcopy Create free account
hub / github.com/microsoft/SandDance / expressionFunction

Function expressionFunction

docs/app/js/sanddance-app.js:143257–143265  ·  view source on GitHub ↗
(name, fn, visitor)

Source from the content-addressed store, hash-verified

143255 return fn;
143256} // Register an expression function
143257function expressionFunction(name, fn, visitor) {
143258 if (arguments.length === 1) return functionContext[name];
143259 // register with the functionContext
143260 functionContext[name] = fn; // if there is an astVisitor register that, too
143261 if (visitor) astVisitors[name] = visitor; // if the code generator has already been initialized,
143262 // we need to also register the function with it
143263 if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;
143264 return this;
143265} // register expression functions with ast visitors
143266expressionFunction("bandwidth", bandwidth, scaleVisitor);
143267expressionFunction("copy", copy, scaleVisitor);
143268expressionFunction("domain", domain, scaleVisitor);

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected