| Index: third_party/pkg/angular/lib/core/parser/static_parser.dart
|
| diff --git a/third_party/pkg/angular/lib/core/parser/static_parser.dart b/third_party/pkg/angular/lib/core/parser/static_parser.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5d0db008c4aa1276822ab7728eb3cb2b931e7e72
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/lib/core/parser/static_parser.dart
|
| @@ -0,0 +1,32 @@
|
| +part of angular.core.parser;
|
| +
|
| +class StaticParserFunctions {
|
| + StaticParserFunctions(Map this.functions);
|
| +
|
| + Map<String, dynamic> functions;
|
| +}
|
| +
|
| +@NgInjectableService()
|
| +class StaticParser implements Parser {
|
| + Map<String, dynamic> _functions;
|
| + Parser _fallbackParser;
|
| +
|
| + StaticParser(StaticParserFunctions functions,
|
| + DynamicParser this._fallbackParser) {
|
| + assert(functions != null);
|
| + _functions = functions.functions;
|
| + }
|
| +
|
| + call(String exp) {
|
| + if (exp == null) exp = "";
|
| + if (!_functions.containsKey(exp)) {
|
| + //print("Expression [$exp] is not supported in static parser");
|
| + return _fallbackParser.call(exp);
|
| + }
|
| + return _functions[exp];
|
| + }
|
| +
|
| + primaryFromToken(Token token, parserError) {
|
| + throw 'Not Implemented';
|
| + }
|
| +}
|
|
|