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

Function getLocalNames

examples/js/processing.js:11990–12002  ·  view source on GitHub ↗
(statements)

Source from the content-addressed store, hash-verified

11988 };
11989
11990 function getLocalNames(statements) {
11991 var localNames = [];
11992 for(var i=0,l=statements.length;i<l;++i) {
11993 var statement = statements[i];
11994 if(statement instanceof AstVar) {
11995 localNames = localNames.concat(statement.getNames());
11996 } else if(statement instanceof AstForStatement &&
11997 statement.argument.initStatement instanceof AstVar) {
11998 localNames = localNames.concat(statement.argument.initStatement.getNames());
11999 }
12000 }
12001 return appendToLookupTable({}, localNames);
12002 }
12003
12004 function AstStatementsBlock(statements) {
12005 this.statements = statements;

Callers 1

parseProcessingFunction · 0.85

Calls 1

appendToLookupTableFunction · 0.85

Tested by

no test coverage detected