Skip to content

Commit

Permalink
fix($parse): small fixes
Browse files Browse the repository at this point in the history
- typos
- dead code removal
- remove unneeded variable
  • Loading branch information
IgorMinar committed Jan 26, 2012
1 parent 39b3297 commit 18a1e86
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/service/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);},
Expand Down Expand Up @@ -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('{')) {
Expand Down Expand Up @@ -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};
};
}
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 18a1e86

Please sign in to comment.