Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 79d2b9a

Browse files
jbedardNarretz
authored andcommitted
refactor($parse): remove unused expression arguments
These are no longer required after the removal of the expression sandbox errors Closes #15276
1 parent e77f717 commit 79d2b9a

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/ng/parse.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -819,13 +819,11 @@ ASTCompiler.prototype = {
819819
'getStringValue',
820820
'ifDefined',
821821
'plus',
822-
'text',
823822
fnString))(
824823
this.$filter,
825824
getStringValue,
826825
ifDefined,
827-
plusFn,
828-
expression);
826+
plusFn);
829827
this.state = this.stage = undefined;
830828
fn.literal = isLiteral(ast);
831829
fn.constant = isConstant(ast);
@@ -1240,7 +1238,6 @@ ASTInterpreter.prototype = {
12401238
compile: function(expression) {
12411239
var self = this;
12421240
var ast = this.astBuilder.ast(expression);
1243-
this.expression = expression;
12441241
findConstantAndWatchExpressions(ast, self.$filter);
12451242
var assignable;
12461243
var assign;
@@ -1311,17 +1308,16 @@ ASTInterpreter.prototype = {
13111308
context
13121309
);
13131310
case AST.Identifier:
1314-
return self.identifier(ast.name,
1315-
context, create, self.expression);
1311+
return self.identifier(ast.name, context, create);
13161312
case AST.MemberExpression:
13171313
left = this.recurse(ast.object, false, !!create);
13181314
if (!ast.computed) {
13191315
right = ast.property.name;
13201316
}
13211317
if (ast.computed) right = this.recurse(ast.property);
13221318
return ast.computed ?
1323-
this.computedMember(left, right, context, create, self.expression) :
1324-
this.nonComputedMember(left, right, context, create, self.expression);
1319+
this.computedMember(left, right, context, create) :
1320+
this.nonComputedMember(left, right, context, create);
13251321
case AST.CallExpression:
13261322
args = [];
13271323
forEach(ast.arguments, function(expr) {
@@ -1547,7 +1543,7 @@ ASTInterpreter.prototype = {
15471543
value: function(value, context) {
15481544
return function() { return context ? {context: undefined, name: undefined, value: value} : value; };
15491545
},
1550-
identifier: function(name, context, create, expression) {
1546+
identifier: function(name, context, create) {
15511547
return function(scope, locals, assign, inputs) {
15521548
var base = locals && (name in locals) ? locals : scope;
15531549
if (create && create !== 1 && base && base[name] == null) {
@@ -1561,7 +1557,7 @@ ASTInterpreter.prototype = {
15611557
}
15621558
};
15631559
},
1564-
computedMember: function(left, right, context, create, expression) {
1560+
computedMember: function(left, right, context, create) {
15651561
return function(scope, locals, assign, inputs) {
15661562
var lhs = left(scope, locals, assign, inputs);
15671563
var rhs;
@@ -1583,7 +1579,7 @@ ASTInterpreter.prototype = {
15831579
}
15841580
};
15851581
},
1586-
nonComputedMember: function(left, right, context, create, expression) {
1582+
nonComputedMember: function(left, right, context, create) {
15871583
return function(scope, locals, assign, inputs) {
15881584
var lhs = left(scope, locals, assign, inputs);
15891585
if (create && create !== 1) {

0 commit comments

Comments
 (0)