Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/ng/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,11 @@ ASTCompiler.prototype = {
'getStringValue',
'ifDefined',
'plus',
'text',
fnString))(
this.$filter,
getStringValue,
ifDefined,
plusFn,
expression);
plusFn);
this.state = this.stage = undefined;
fn.literal = isLiteral(ast);
fn.constant = isConstant(ast);
Expand Down Expand Up @@ -1240,7 +1238,6 @@ ASTInterpreter.prototype = {
compile: function(expression) {
var self = this;
var ast = this.astBuilder.ast(expression);
this.expression = expression;
findConstantAndWatchExpressions(ast, self.$filter);
var assignable;
var assign;
Expand Down Expand Up @@ -1311,17 +1308,16 @@ ASTInterpreter.prototype = {
context
);
case AST.Identifier:
return self.identifier(ast.name,
context, create, self.expression);
return self.identifier(ast.name, context, create);
case AST.MemberExpression:
left = this.recurse(ast.object, false, !!create);
if (!ast.computed) {
right = ast.property.name;
}
if (ast.computed) right = this.recurse(ast.property);
return ast.computed ?
this.computedMember(left, right, context, create, self.expression) :
this.nonComputedMember(left, right, context, create, self.expression);
this.computedMember(left, right, context, create) :
this.nonComputedMember(left, right, context, create);
case AST.CallExpression:
args = [];
forEach(ast.arguments, function(expr) {
Expand Down Expand Up @@ -1547,7 +1543,7 @@ ASTInterpreter.prototype = {
value: function(value, context) {
return function() { return context ? {context: undefined, name: undefined, value: value} : value; };
},
identifier: function(name, context, create, expression) {
identifier: function(name, context, create) {
return function(scope, locals, assign, inputs) {
var base = locals && (name in locals) ? locals : scope;
if (create && create !== 1 && base && base[name] == null) {
Expand All @@ -1561,7 +1557,7 @@ ASTInterpreter.prototype = {
}
};
},
computedMember: function(left, right, context, create, expression) {
computedMember: function(left, right, context, create) {
return function(scope, locals, assign, inputs) {
var lhs = left(scope, locals, assign, inputs);
var rhs;
Expand All @@ -1583,7 +1579,7 @@ ASTInterpreter.prototype = {
}
};
},
nonComputedMember: function(left, right, context, create, expression) {
nonComputedMember: function(left, right, context, create) {
return function(scope, locals, assign, inputs) {
var lhs = left(scope, locals, assign, inputs);
if (create && create !== 1) {
Expand Down