MCPcopy Create free account
hub / github.com/corbanbrook/dsp.js / transformStatement

Function transformStatement

examples/js/processing.js:11505–11517  ·  view source on GitHub ↗
(statement)

Source from the content-addressed store, hash-verified

11503 };
11504
11505 function transformStatement(statement) {
11506 if(fieldTest.test(statement)) {
11507 var attrAndType = attrAndTypeRegex.exec(statement);
11508 var definitions = statement.substring(attrAndType[0].length).split(",");
11509 var defaultTypeValue = getDefaultValueForType(attrAndType[2]);
11510 for(var i=0; i < definitions.length; ++i) {
11511 definitions[i] = transformVarDefinition(definitions[i], defaultTypeValue);
11512 }
11513 return new AstVar(definitions, attrAndType[2]);
11514 } else {
11515 return new AstStatement(transformExpression(statement));
11516 }
11517 }
11518
11519 function AstForExpression(initStatement, condition, step) {
11520 this.initStatement = initStatement;

Callers 2

transformForExpressionFunction · 0.85
parseProcessingFunction · 0.85

Calls 2

getDefaultValueForTypeFunction · 0.85
transformVarDefinitionFunction · 0.85

Tested by

no test coverage detected