mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-30 21:10:29 +00:00
fix($parse): small fixes
- typos - dead code removal - remove unneeded variable
This commit is contained in:
parent
39b3297fc3
commit
18a1e860a3
1 changed files with 2 additions and 19 deletions
|
|
@ -4,7 +4,7 @@ var OPERATORS = {
|
|||
'null':function(self){return null;},
|
||||
'true':function(self){return true;},
|
||||
'false':function(self){return false;},
|
||||
$undefined:noop,
|
||||
undefined:noop,
|
||||
'+':function(self, a,b){a=a(self); b=b(self); return (isDefined(a)?a:0)+(isDefined(b)?b:0);},
|
||||
'-':function(self, a,b){a=a(self); b=b(self); return (isDefined(a)?a:0)-(isDefined(b)?b:0);},
|
||||
'*':function(self, a,b){return a(self)*b(self);},
|
||||
|
|
@ -511,9 +511,8 @@ function parser(text, json, $filter){
|
|||
function primary() {
|
||||
var primary;
|
||||
if (expect('(')) {
|
||||
var expression = filterChain();
|
||||
primary = filterChain();
|
||||
consume(')');
|
||||
primary = expression;
|
||||
} else if (expect('[')) {
|
||||
primary = arrayDeclaration();
|
||||
} else if (expect('{')) {
|
||||
|
|
@ -646,22 +645,6 @@ function parser(text, json, $filter){
|
|||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
function watchDecl () {
|
||||
var anchorName = expect().text;
|
||||
consume(":");
|
||||
var expressionFn;
|
||||
if (peekToken().text == '{') {
|
||||
consume("{");
|
||||
expressionFn = statements();
|
||||
consume("}");
|
||||
} else {
|
||||
expressionFn = expression();
|
||||
}
|
||||
return function(self) {
|
||||
return {name:anchorName, fn:expressionFn};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in a new issue