MCPcopy
hub / github.com/jquerytools/jquerytools / identifier

Function identifier

lib/jslint.js:165–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163function optionalidentifier(){if(nexttoken.reserved){warning("Expected an identifier and instead saw '{a}' (a reserved word).",nexttoken,nexttoken.id);}
164if(nexttoken.identifier){advance();return token.value;}}
165function identifier(){var i=optionalidentifier();if(i){return i;}
166if(token.id==='function'&&nexttoken.id==='('){warning("Missing name in function statement.");}else{error("Expected an identifier and instead saw '{a}'.",nexttoken,nexttoken.value);}}
167function reachable(s){var i=0,t;if(nexttoken.id!==';'||noreach){return;}
168for(;;){t=peek(i);if(t.reach){return;}
169if(t.id!=='(endline)'){if(t.id==='function'){warning("Inner functions should be listed at the top of the outer function.",t);break;}

Callers 3

jslint.jsFile · 0.85
varstatementFunction · 0.85
functionparamsFunction · 0.85

Calls 3

optionalidentifierFunction · 0.85
warningFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected