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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 9704006: Allow const factory on methods in parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Allows const factory type constructors to get through parser Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index a840361747924ee7b1876a7779df48c423efbe1f..75459e805df70630d2b9c0eeb231458be8485537 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -930,6 +930,10 @@ public class DartParser extends CompletionHooksParserBase {
case CONST: {
consume(Token.CONST);
modifiers = modifiers.makeConstant();
+ // Allow "const factory ... native" constructors for core libraries only
+ if (optionalPseudoKeyword(FACTORY_KEYWORD)) {
+ modifiers = modifiers.makeFactory();
+ }
srdjan 2012/03/14 00:41:22 I do not understand the code completely. Does it g
zundel 2012/03/14 00:43:43 I added the 'native' check in the resolver in a pr
member = done(parseMethod(modifiers, null));
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698