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

Issue 2699423002: Implement AstBuilder support for top level variables and function literals. (Closed)

Created:
3 years, 10 months ago by Paul Berry
Modified:
3 years, 10 months ago
Reviewers:
ahe, scheglov
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement AstBuilder support for top level variables and function literals. R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/9b04857653a5ae35b1a5b65d47b3d5b439304a34

Patch Set 1 #

Total comments: 6

Patch Set 2 : Comment changes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -48 lines) Patch
M pkg/analyzer/test/generated/parser_fasta_test.dart View 8 chunks +6 lines, -48 lines 0 comments Download
M pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart View 1 3 chunks +50 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/listener.dart View 3 chunks +16 lines, -0 lines 2 comments Download

Messages

Total messages: 13 (2 generated)
Paul Berry
3 years, 10 months ago (2017-02-20 04:27:10 UTC) #2
ahe
lgtm I like your comments in listener.dart. I'll try to use this idea if when ...
3 years, 10 months ago (2017-02-20 09:04:20 UTC) #3
Paul Berry
https://codereview.chromium.org/2699423002/diff/1/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart File pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart (right): https://codereview.chromium.org/2699423002/diff/1/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode319 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:319: // reached, node would always be a VariableDeclaration. On ...
3 years, 10 months ago (2017-02-20 15:01:37 UTC) #4
Paul Berry
Committed patchset #2 (id:20001) manually as 9b04857653a5ae35b1a5b65d47b3d5b439304a34 (presubmit successful).
3 years, 10 months ago (2017-02-20 15:07:26 UTC) #6
scheglov
LGTM https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/fasta/parser/listener.dart File pkg/front_end/lib/src/fasta/parser/listener.dart (right): https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/fasta/parser/listener.dart#newcode561 pkg/front_end/lib/src/fasta/parser/listener.dart:561: /// - Field initializer Seems inconsistent. Maybe variable ...
3 years, 10 months ago (2017-02-20 20:10:36 UTC) #7
ahe
FYI https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/fasta/parser/listener.dart File pkg/front_end/lib/src/fasta/parser/listener.dart (right): https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/fasta/parser/listener.dart#newcode561 pkg/front_end/lib/src/fasta/parser/listener.dart:561: /// - Field initializer On 2017/02/20 20:10:36, scheglov ...
3 years, 10 months ago (2017-02-21 09:10:24 UTC) #8
Paul Berry
On 2017/02/21 09:10:24, ahe wrote: > FYI > > https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/fasta/parser/listener.dart > File pkg/front_end/lib/src/fasta/parser/listener.dart (right): > ...
3 years, 10 months ago (2017-02-21 13:57:29 UTC) #9
ahe
On 2017/02/21 13:57:29, Paul Berry wrote: > On 2017/02/21 09:10:24, ahe wrote: > > FYI ...
3 years, 10 months ago (2017-02-21 14:03:24 UTC) #10
Paul Berry
On 2017/02/21 14:03:24, ahe wrote: > On 2017/02/21 13:57:29, Paul Berry wrote: > > On ...
3 years, 10 months ago (2017-02-21 17:06:11 UTC) #11
ahe
On 2017/02/21 17:06:11, Paul Berry wrote: > On 2017/02/21 14:03:24, ahe wrote: > > On ...
3 years, 10 months ago (2017-02-21 17:47:28 UTC) #12
Paul Berry
3 years, 10 months ago (2017-02-21 18:12:12 UTC) #13
Message was sent while issue was closed.
On 2017/02/21 17:47:28, ahe wrote:
> On 2017/02/21 17:06:11, Paul Berry wrote:
> > On 2017/02/21 14:03:24, ahe wrote:
> > > On 2017/02/21 13:57:29, Paul Berry wrote:
> > > > On 2017/02/21 09:10:24, ahe wrote:
> > > > > FYI
> > > > > 
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/f...
> > > > > File pkg/front_end/lib/src/fasta/parser/listener.dart (right):
> > > > > 
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/2699423002/diff/20001/pkg/front_end/lib/src/f...
> > > > > pkg/front_end/lib/src/fasta/parser/listener.dart:561: ///   - Field
> > > > initializer
> > > > > On 2017/02/20 20:10:36, scheglov wrote:
> > > > > > Seems inconsistent.
> > > > > > Maybe variable in both or field in both?
> > > > > > Also the specification does not call these "fields", it call them
> > > "top-level
> > > > > > variables" or "library variables".
> > > > > 
> > > > > I think it would make sense to go go through this file and ensure
> > consistent
> > > > > naming throughout. I've created a spreadsheet where we can do that:
> > > > >
> > > >
> > >
> >
>
https://docs.google.com/a/google.com/spreadsheets/d/1fyBErAV168aGJ2Dajn3aA1cd...
> > > > > 
> > > > > While we're doing that, I think it would make sense to stay consistent
> > with
> > > > > what's already in this file. So I think it should be top-level field,
> not
> > > > > variable.
> > > > 
> > > > I don't mind putting up with naming inconsistencies in the name of
> reducing
> > > code
> > > > churn--nobody wants to waste time renaming things when we could be
fixing
> > bugs
> > > > and implementing features.  But if we're going to go to the trouble to
> make
> > > the
> > > > names in this file consistent with each other, we should go ahead and
make
> > > them
> > > > consistent with the spec too.  One of my biggest sources of confusion
when
> I
> > > > started working on analyzer was that its nomenclature was (for
historical
> > > > reasons) inconsistent with the spec; I would hate for front_end to have
> the
> > > same
> > > > problem for new contributors.
> > > 
> > > I agree with a minor caveat: sometimes I think it makes sense to deviate
> from
> > > the specification, but one should have a good reason for doing so. But
this
> is
> > > an exception.
> > 
> > Clarifying question: By "this is an exception" which do you mean:
> > a. In this case one does not need a good reason for deviating from the
> > specification (!)
> > b. This is a case where it does make sense to deviate from the
specification,
> > and the good reason for doing so is...
> > c. This is a case where we should follow the spec, because there's no good
> > reason for deviating from it.
> 
> I meant that in general not following the specification should be an
exception.
> 
> In this concrete case, I think using top-level variable makes sense and I've
> already added the suggestion to the spreadsheet.
> 
> Email is hard :-)

Thanks for the clarification!  I'm glad I asked :)

Powered by Google App Engine
This is Rietveld 408576698