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

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

Issue 10836034: Properly parse operator declarations without return type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/parser.dart
diff --git a/lib/compiler/implementation/scanner/parser.dart b/lib/compiler/implementation/scanner/parser.dart
index 7086d4466a407710e1b2137824252385deae3839..c70a676dda66737a11b3fe8d7c6aeb765db73c1f 100644
--- a/lib/compiler/implementation/scanner/parser.dart
+++ b/lib/compiler/implementation/scanner/parser.dart
@@ -673,13 +673,19 @@ class Parser {
listener.beginFunction(token);
token = parseModifiers(token);
if (getOrSet === token) token = token.next;
- token = parseReturnTypeOpt(token);
- if (getOrSet === token) token = token.next;
- listener.beginFunctionName(token);
if (optional('operator', token)) {
+ listener.handleNoType(token);
+ listener.beginFunctionName(token);
token = parseOperatorName(token);
} else {
- token = parseIdentifier(token);
+ token = parseReturnTypeOpt(token);
+ if (getOrSet === token) token = token.next;
+ listener.beginFunctionName(token);
+ if (optional('operator', token)) {
+ token = parseOperatorName(token);
+ } else {
+ token = parseIdentifier(token);
+ }
}
token = parseQualifiedRestOpt(token);
listener.endFunctionName(token);
« no previous file with comments | « no previous file | lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698