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

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

Issue 180873006: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback 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_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')) {
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/dynamic_parser.dart ('k') | third_party/pkg/angular/lib/core/parser/eval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698