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

Issue 2751913002: Parse constructor field initializers with Fasta. (Closed)

Created:
3 years, 9 months ago by scheglov
Modified:
3 years, 6 months ago
Reviewers:
ahe, Paul Berry
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Fix for DietListener test failure. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -9 lines) Patch
M pkg/analyzer/test/generated/parser_fasta_test.dart View 1 chunk +0 lines, -7 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 chunk +27 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart View 1 3 chunks +27 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/source/diet_listener.dart View 1 1 chunk +3 lines, -0 lines 7 comments Download
M pkg/front_end/lib/src/fasta/source/stack_listener.dart View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
scheglov
3 years, 9 months ago (2017-03-15 01:01:33 UTC) #1
Paul Berry
lgtm
3 years, 9 months ago (2017-03-15 16:07:21 UTC) #2
scheglov
Committed patchset #2 (id:20001) manually as 39dbb75c763985e7820b4463e40786598c7a185f (presubmit successful).
3 years, 9 months ago (2017-03-15 18:32:59 UTC) #4
ahe
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { Could you explain what ...
3 years, 8 months ago (2017-04-06 14:25:21 UTC) #5
scheglov
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { On 2017/04/06 14:25:21, ahe ...
3 years, 8 months ago (2017-04-06 15:51:55 UTC) #6
ahe
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { On 2017/04/06 15:51:55, scheglov ...
3 years, 8 months ago (2017-04-06 15:57:32 UTC) #7
scheglov
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { On 2017/04/06 15:57:32, ahe ...
3 years, 8 months ago (2017-04-06 16:06:05 UTC) #8
ahe
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { On 2017/04/06 16:06:05, scheglov ...
3 years, 6 months ago (2017-05-31 14:15:38 UTC) #9
scheglov
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right): https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/fasta/source/diet_listener.dart#newcode498 pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if (listener.stack.length == 1) { On 2017/05/31 14:15:38, ahe ...
3 years, 6 months ago (2017-05-31 21:46:20 UTC) #10
ahe
3 years, 6 months ago (2017-06-01 12:13:02 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/f...
File pkg/front_end/lib/src/fasta/source/diet_listener.dart (right):

https://codereview.chromium.org/2751913002/diff/20001/pkg/front_end/lib/src/f...
pkg/front_end/lib/src/fasta/source/diet_listener.dart:498: if
(listener.stack.length == 1) {
On 2017/05/31 21:46:20, scheglov wrote:
> On 2017/05/31 14:15:38, ahe wrote:
> > On 2017/04/06 16:06:05, scheglov wrote:
> > > On 2017/04/06 15:57:32, ahe wrote:
> > > > On 2017/04/06 15:51:55, scheglov wrote:
> > > > > On 2017/04/06 14:25:21, ahe wrote:
> > > > > > Could you explain what this is for?
> > > > > 
> > > > > AstBuilder puts more data on the stack than the other parser.
> > > > 
> > > > Would it be possible to not do that? I'm trying to maintain the
invariant
> > that
> > > > the stack is null after parsing a function. This helps catch errors.
> > > 
> > > The stack is empty after parsing a function.
> > > But it is not empty after removing a function body.
> > 
> > What do you mean by removing a function body?
> 
> The statement "var body = listener.pop();" removes a function body from the
> stack.

I see. After calling parseFunctionBody, there should only be one thing on the
stack: the function body. That's the invariant that I'm maintaining here.

Powered by Google App Engine
This is Rietveld 408576698