MCPcopy
hub / github.com/jquerytools/jquerytools / reservevar

Function reservevar

lib/jslint.js:143–144  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

141function type(s,f){var x=delim(s);x.type=s;x.nud=f;return x;}
142function reserve(s,f){var x=type(s,f);x.identifier=x.reserved=true;return x;}
143function reservevar(s){return reserve(s,function(){if(this.id==='this'){if(option.adsafe){warning("ADsafe violation.",this);}}
144return this;});}
145function infix(s,f,p){var x=symbol(s,p);reserveName(x);x.led=(typeof f==='function')?f:function(left){nonadjacent(prevtoken,token);nonadjacent(token,nexttoken);this.left=left;this.right=parse(p);return this;};return x;}
146function relation(s,f){var x=symbol(s,100);x.led=function(left){nonadjacent(prevtoken,token);nonadjacent(token,nexttoken);var right=parse(100);if((left&&left.id==='NaN')||(right&&right.id==='NaN')){warning("Use the isNaN function to compare with NaN.",this);}else if(f){f.apply(this,[left,right]);}
147this.left=left;this.right=right;return this;};return x;}

Callers 1

jslint.jsFile · 0.85

Calls 2

reserveFunction · 0.85
warningFunction · 0.85

Tested by

no test coverage detected