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

Issue 9704006: Allow const factory on methods in parser (Closed)

Created:
8 years, 9 months ago by zundel
Modified:
8 years, 9 months ago
Reviewers:
scheglov, srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Allow const factory on methods in parser This got left out of an earlier patch. Committed: https://code.google.com/p/dart/source/detail?r=5449

Patch Set 1 #

Patch Set 2 : Allows const factory type constructors to get through parser #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M compiler/java/com/google/dart/compiler/parser/DartParser.java View 1 chunk +4 lines, -0 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
zundel
8 years, 9 months ago (2012-03-14 00:33:16 UTC) #1
scheglov
LGTM
8 years, 9 months ago (2012-03-14 00:36:29 UTC) #2
srdjan
https://chromiumcodereview.appspot.com/9704006/diff/2001/compiler/java/com/google/dart/compiler/parser/DartParser.java File compiler/java/com/google/dart/compiler/parser/DartParser.java (right): https://chromiumcodereview.appspot.com/9704006/diff/2001/compiler/java/com/google/dart/compiler/parser/DartParser.java#newcode936 compiler/java/com/google/dart/compiler/parser/DartParser.java:936: } I do not understand the code completely. Does ...
8 years, 9 months ago (2012-03-14 00:41:21 UTC) #3
zundel
8 years, 9 months ago (2012-03-14 00:43:43 UTC) #4
https://chromiumcodereview.appspot.com/9704006/diff/2001/compiler/java/com/go...
File compiler/java/com/google/dart/compiler/parser/DartParser.java (right):

https://chromiumcodereview.appspot.com/9704006/diff/2001/compiler/java/com/go...
compiler/java/com/google/dart/compiler/parser/DartParser.java:936: }
On 2012/03/14 00:41:22, srdjan wrote:
> I do not understand the code completely. Does it guarantee that only native
> factories can be const? Non-native factories are not allowed to be const.

I added the 'native' check in the resolver in a previous patch to Resolver.java.
 This was enough to allow frog code to parse because it never used the 'factory'
modifier on native constructors.  I forgot to allow both 'const' and 'factory'
modifiers in the parse stage.

Powered by Google App Engine
This is Rietveld 408576698