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

Function transformClassField

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

Source from the content-addressed store, hash-verified

11641 };
11642
11643 function transformClassField(statement) {
11644 var attrAndType = attrAndTypeRegex.exec(statement);
11645 var isStatic = attrAndType[1].indexOf("static") >= 0;
11646 var definitions = statement.substring(attrAndType[0].length).split(/,\s*/g);
11647 var defaultTypeValue = getDefaultValueForType(attrAndType[2]);
11648 for(var i=0; i < definitions.length; ++i) {
11649 definitions[i] = transformVarDefinition(definitions[i], defaultTypeValue);
11650 }
11651 return new AstClassField(definitions, attrAndType[2], isStatic);
11652 }
11653
11654 function AstConstructor(params, body) {
11655 this.params = params;

Callers 1

parseProcessingFunction · 0.85

Calls 2

getDefaultValueForTypeFunction · 0.85
transformVarDefinitionFunction · 0.85

Tested by

no test coverage detected