MCPcopy
hub / github.com/jquerytools/jquerytools / assignop

Function assignop

lib/jslint.js:149–154  ·  view source on GitHub ↗
(s,f)

Source from the content-addressed store, hash-verified

147this.left=left;this.right=right;return this;};return x;}
148function isPoorRelation(node){var n=+node.value;return(node.type==='(number)'&&!n)||(node.type==='(string)'&&!node.value)||node.type==='true'||node.type==='false'||node.type==='undefined'||node.type==='null';}
149function assignop(s,f){symbol(s,20).exps=true;return infix(s,function(left){var l;this.left=left;nonadjacent(prevtoken,token);nonadjacent(token,nexttoken);if(option.adsafe){l=left;do{if(predefined[l.value]===true){warning('ADsafe violation.',l);}
150l=l.left;}while(l);}
151if(left){if(left.id==='.'||left.id==='['){if(left.left.value==='arguments'){warning('Bad assignment.',this);}
152this.right=parse(19);return this;}else if(left.identifier&&!left.reserved){this.right=parse(19);return this;}
153if(left===syntax['function']){warning("Expected an identifier in an assignment and instead saw a function invocation.",token);}}
154error("Bad assignment.",this);},20);}
155function bitwise(s,f,p){var x=symbol(s,p);reserveName(x);x.led=(typeof f==='function')?f:function(left){if(option.bitwise){warning("Unexpected use of '{a}'.",this,this.id);}
156nonadjacent(prevtoken,token);nonadjacent(token,nexttoken);this.left=left;this.right=parse(p);return this;};return x;}
157function bitwiseassignop(s){symbol(s,20).exps=true;return infix(s,function(left){if(option.bitwise){warning("Unexpected use of '{a}'.",this,this.id);}

Callers 1

jslint.jsFile · 0.85

Calls 6

symbolFunction · 0.85
infixFunction · 0.85
nonadjacentFunction · 0.85
warningFunction · 0.85
parseFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected