MCPcopy
hub / github.com/jquerytools/jquerytools / block

Function block

lib/jslint.js:188–192  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

186while(!nexttoken.reach&&nexttoken.id!=='(end)'){if(nexttoken.id===';'){warning("Unnecessary semicolon.");advance(';');}else{a.push(statement());}}
187return a;}
188function block(f){var a,b=inblock,s=scope;inblock=f;if(f){scope=Object.beget(scope);}
189nonadjacent(token,nexttoken);var t=nexttoken;if(nexttoken.id==='{'){advance('{');if(nexttoken.id!=='}'||token.line!==nexttoken.line){indent+=option.indent;if(!f&&nexttoken.from===indent+option.indent){indent+=option.indent;}
190a=statements();indent-=option.indent;indentation();}
191advance('}',t);}else{warning("Expected '{a}' and instead saw '{b}'.",nexttoken,'{',nexttoken.value);noreach=true;a=[statement()];noreach=false;}
192funct['(verb)']=null;scope=s;inblock=b;return a;}
193function idValue(){return this;}
194function countMember(m){if(membersOnly&&membersOnly[m]!==true){warning("Unexpected /*member '{a}'.",nexttoken,m);}
195if(typeof member[m]==='number'){member[m]+=1;}else{member[m]=1;}}

Callers 2

doFunctionFunction · 0.85
jslint.jsFile · 0.85

Calls 6

nonadjacentFunction · 0.85
advanceFunction · 0.85
statementsFunction · 0.85
indentationFunction · 0.85
warningFunction · 0.85
statementFunction · 0.85

Tested by

no test coverage detected