MCPcopy Index your code
hub / github.com/jquerytools/jquerytools / functionparams

Function functionparams

lib/jslint.js:311–312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309if(nexttoken.id!==','){return;}
310adjacent(token,nexttoken);advance(',');nonadjacent(token,nexttoken);}}
311stmt('var',varstatement);stmt('new',function(){error("'new' should not be used as a statement.");});function functionparams(){var i,t=nexttoken,p=[];advance('(');nospace();if(nexttoken.id===')'){advance(')');nospace(prevtoken,token);return;}
312for(;;){i=identifier();p.push(i);addlabel(i,'parameter');if(nexttoken.id===','){advance(',');nonadjacent(token,nexttoken);}else{advance(')',t);nospace(prevtoken,token);return p.join(', ');}}}
313function doFunction(i){var s=scope;scope=Object.beget(s);funct={'(name)':i||'"'+anonname+'"','(line)':nexttoken.line+1,'(context)':funct,'(breakage)':0,'(loopage)':0,'(scope)':scope};functions.push(funct);if(i){addlabel(i,'function');}
314funct['(params)']=functionparams();block(false);scope=s;funct=funct['(context)'];}
315blockstmt('function',function(){if(inblock){warning("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",token);}

Callers 1

doFunctionFunction · 0.85

Calls 5

advanceFunction · 0.85
nospaceFunction · 0.85
identifierFunction · 0.85
addlabelFunction · 0.85
nonadjacentFunction · 0.85

Tested by

no test coverage detected