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

Issue 11415153: Parser work (Closed)

Created:
8 years ago by Brian Wilkerson
Modified:
8 years ago
Reviewers:
messick, scheglov, danrubel
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Parser work * added new class to support redirecting factory constructors * used new class to clean up instance creation expressions * added cascade expressions in initializers * added error detection * re-worked parser to improve recovery Committed: https://code.google.com/p/dart/source/detail?r=15417

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1263 lines, -443 lines) Patch
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ASTVisitor.java View 1 chunk +2 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java View 1 13 chunks +109 lines, -33 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorFieldInitializer.java View 1 chunk +1 line, -1 line 0 comments Download
A editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java View 1 chunk +136 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java View 6 chunks +19 lines, -74 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/GeneralizingASTVisitor.java View 1 chunk +5 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/RecursiveASTVisitor.java View 2 chunks +7 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/visitor/ToSourceVisitor.java View 1 3 chunks +11 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/ElementBuilder.java View 1 chunk +1 line, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java View 1 38 chunks +517 lines, -192 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java View 1 4 chunks +20 lines, -6 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/ASTFactory.java View 6 chunks +41 lines, -25 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/ast/visitor/ToSourceVisitorTest.java View 9 chunks +20 lines, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/builder/ElementBuilderTest.java View 3 chunks +3 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java View 18 chunks +177 lines, -30 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java View 1 24 chunks +194 lines, -76 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Brian Wilkerson
Sorry about the size. Steve and Konstantin: I am most interested in your review of ...
8 years ago (2012-11-27 17:54:17 UTC) #1
messick
LGTM This looks very similar to one of the (many) options we discussed yesterday, so ...
8 years ago (2012-11-27 18:51:25 UTC) #2
scheglov
LGTM https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java (right): https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java#newcode84 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java:84: private Token colon; IIRC we though about more ...
8 years ago (2012-11-27 19:00:48 UTC) #3
Brian Wilkerson
https://chromiumcodereview.appspot.com/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java (right): https://chromiumcodereview.appspot.com/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java#newcode367 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java:367: if (externalKeyword != null) { > Using setters to ...
8 years ago (2012-11-27 19:08:37 UTC) #4
Brian Wilkerson
https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java (right): https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java#newcode84 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java:84: private Token colon; > IIRC we though about more ...
8 years ago (2012-11-27 19:16:13 UTC) #5
scheglov
LGTM https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java (right): https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java#newcode95 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java:95: private ConstructorName constructorName; On 2012/11/27 19:16:14, Brian Wilkerson ...
8 years ago (2012-11-27 19:26:55 UTC) #6
Brian Wilkerson
https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java (right): https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java#newcode95 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorDeclaration.java:95: private ConstructorName constructorName; > > How about "redirectedConstructor"? > ...
8 years ago (2012-11-27 19:44:06 UTC) #7
danrubel
lgtm https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java (right): https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java#newcode71 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java:71: } Will we ever be representing invalid code ...
8 years ago (2012-11-27 21:25:13 UTC) #8
Brian Wilkerson
8 years ago (2012-11-27 21:41:23 UTC) #9
https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.goog...
File
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java
(right):

https://codereview.chromium.org/11415153/diff/1/editor/tools/plugins/com.goog...
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ConstructorName.java:71:
}
> Will we ever be representing invalid code with this structure?

Users can create invalid AST structures, but I haven't worried about that. The
parser, on the other hand will create a synthetic name if one doesn't appear in
the source, so no, the parser won't create an invalid structure.

Powered by Google App Engine
This is Rietveld 408576698