From 52ee1ab5eb0f3197453b26c60a70239ac3fffea7 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 10 Apr 2012 14:29:49 -0700 Subject: chore(*): remove dead code and fix code style issues --- src/ng/parse.js | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/ng/parse.js') diff --git a/src/ng/parse.js b/src/ng/parse.js index cd60bc83..e5cb55d7 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -161,7 +161,7 @@ function lex(text){ //check if this is not a method invocation and if it is back out to last dot if (lastDot) { - peekIndex = index + peekIndex = index; while(peekIndex < text.length) { var ch = text.charAt(peekIndex); if (ch == '(') { @@ -269,7 +269,8 @@ function parser(text, json, $filter){ functionCall = _functionCall, fieldAccess = _fieldAccess, objectIndex = _objectIndex, - filterChain = _filterChain + filterChain = _filterChain; + if(json){ // The extra level of aliasing is here, just in case the lexer misses something, so that // we prevent any accidental execution in JSON. @@ -344,10 +345,6 @@ function parser(text, json, $filter){ }; } - function hasTokens () { - return tokens.length > 0; - } - function statements() { var statements = []; while(true) { @@ -497,21 +494,6 @@ function parser(text, json, $filter){ } } - function _functionIdent(fnScope) { - var token = expect(); - var element = token.text.split('.'); - var instance = fnScope; - var key; - for ( var i = 0; i < element.length; i++) { - key = element[i]; - if (instance) - instance = instance[key]; - } - if (!isFunction(instance)) { - throwError("should be a function", token); - } - return instance; - } function primary() { var primary; -- cgit v1.2.3