| Index: third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart
|
| diff --git a/third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart b/third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart
|
| index 7657af40e843a3b89e4b8e9b2d8583c8747a5cc2..0b893ddcf27389d2924011dc28232c30ba8f3d1e 100644
|
| --- a/third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart
|
| +++ b/third_party/pkg/angular/lib/core/parser/dynamic_parser_impl.dart
|
| @@ -2,6 +2,7 @@ library angular.core.parser.dynamic_parser_impl;
|
|
|
| import 'package:angular/core/parser/parser.dart' show ParserBackend;
|
| import 'package:angular/core/parser/lexer.dart';
|
| +import 'package:angular/core/parser/syntax.dart';
|
|
|
| class DynamicParserImpl {
|
| static Token EOF = new Token(-1, null);
|
| @@ -18,14 +19,23 @@ class DynamicParserImpl {
|
| }
|
|
|
| parseChain() {
|
| - while (optional(';'));
|
| + bool isChain = false;
|
| + while (optional(';')) {
|
| + isChain = true;
|
| + }
|
| List expressions = [];
|
| while (index < tokens.length) {
|
| if (peek.text == ')' || peek.text == '}' || peek.text == ']') {
|
| error('Unconsumed token ${peek.text}');
|
| }
|
| - expressions.add(parseFilter());
|
| - while (optional(';'));
|
| + var expr = parseFilter();
|
| + expressions.add(expr);
|
| + while (optional(';')) {
|
| + isChain = true;
|
| + }
|
| + if (isChain && expr is Filter) {
|
| + error('cannot have a filter in a chain');
|
| + }
|
| }
|
| return (expressions.length == 1)
|
| ? expressions.first
|
| @@ -203,7 +213,7 @@ class DynamicParserImpl {
|
|
|
| parsePrimary() {
|
| if (optional('(')) {
|
| - var result = parseFilter();
|
| + var result = parseExpression();
|
| expect(')');
|
| return result;
|
| } else if (optional('null') || optional('undefined')) {
|
|
|