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

Unified Diff: dart/lib/compiler/implementation/scanner/partial_parser.dart

Issue 10836351: Parse metadata, but ignore it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 4 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: dart/lib/compiler/implementation/scanner/partial_parser.dart
diff --git a/dart/lib/compiler/implementation/scanner/partial_parser.dart b/dart/lib/compiler/implementation/scanner/partial_parser.dart
index 38c3dd8646778a9fd87062cb67d561fe7522de28..9777c6ff0a7e3ef0c4484d3e5ef7996c0cc5eaf4 100644
--- a/dart/lib/compiler/implementation/scanner/partial_parser.dart
+++ b/dart/lib/compiler/implementation/scanner/partial_parser.dart
@@ -11,6 +11,17 @@ class PartialParser extends Parser {
Token parseExpression(Token token) => skipExpression(token);
+ Token parseArgumentsOpt(Token token) {
+ // This method is overridden for two reasons:
+ // 1. Avoid generating events for arguments.
+ // 2. Avoid calling skip expression for each argument (which doesn't work).
+ if (optional('(', token)) {
+ return token.endGroup.next;
+ } else {
+ return token;
+ }
+ }
+
Token skipExpression(Token token) {
while (true) {
final kind = token.kind;

Powered by Google App Engine
This is Rietveld 408576698