Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: third_party/pkg/angular/lib/core/parser/dynamic_parser.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/core/parser/dynamic_parser.dart
===================================================================
--- third_party/pkg/angular/lib/core/parser/dynamic_parser.dart (revision 33054)
+++ third_party/pkg/angular/lib/core/parser/dynamic_parser.dart (working copy)
@@ -5,19 +5,16 @@
import 'package:angular/core/parser/parser.dart';
import 'package:angular/core/parser/lexer.dart';
import 'package:angular/core/parser/dynamic_parser_impl.dart';
-import 'package:angular/core/parser/syntax.dart' show defaultFilterMap;
import 'package:angular/core/parser/eval.dart';
import 'package:angular/core/parser/utils.dart' show EvalError;
-@NgInjectableService()
class ClosureMap {
Getter lookupGetter(String name) => null;
Setter lookupSetter(String name) => null;
Function lookupFunction(String name, int arity) => null;
}
-@NgInjectableService()
class DynamicParser implements Parser<Expression> {
final Lexer _lexer;
final ParserBackend _backend;
@@ -46,9 +43,9 @@
accept(Visitor visitor) => _expression.accept(visitor);
toString() => _expression.toString();
- eval(scope, [FilterMap filters = defaultFilterMap]) {
+ eval(scope) {
try {
- return _expression.eval(scope, filters);
+ return _expression.eval(scope);
} on EvalError catch (e, s) {
throw e.unwrap("$this", s);
}
@@ -63,19 +60,20 @@
}
}
-@NgInjectableService()
class DynamicParserBackend extends ParserBackend {
+ final FilterMap _filters;
final ClosureMap _closures;
- DynamicParserBackend(this._closures);
+ DynamicParserBackend(this._filters, this._closures);
bool isAssignable(Expression expression)
=> expression.isAssignable;
Expression newFilter(expression, name, arguments) {
+ Function filter = _filters(name);
List allArguments = new List(arguments.length + 1);
allArguments[0] = expression;
allArguments.setAll(1, arguments);
- return new Filter(expression, name, arguments, allArguments);
+ return new Filter(expression, name, arguments, filter, allArguments);
}
Expression newChain(expressions)
« no previous file with comments | « third_party/pkg/angular/lib/core/module.dart ('k') | third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698