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

Issue 2747853002: Rename xFunctionBody to xBlockFunctionBody. Document related listener methods. (Closed)

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

Description

Rename xFunctionBody to xBlockFunctionBody. Document related listener methods. R=ahe@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/b9a1a29f2be7f0c4589b7a5613117effa84c5026

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rename to handleEmptyFunctionBody() and handleExpressionFunctionBody(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -30 lines) Patch
M pkg/analyzer/lib/src/summary/fasta/summary_builder.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/parser/node_listener.dart View 1 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart View 1 3 chunks +4 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 1 2 chunks +5 lines, -5 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/listener.dart View 1 2 chunks +19 lines, -6 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/parser.dart View 1 3 chunks +7 lines, -7 lines 0 comments Download
M pkg/front_end/lib/src/fasta/source/scope_listener.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
scheglov
3 years, 9 months ago (2017-03-13 18:07:30 UTC) #1
Paul Berry
lgtm but we probably should wait for Peter's review.
3 years, 9 months ago (2017-03-13 19:58:38 UTC) #2
ahe
lgtm https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta/parser/listener.dart File pkg/front_end/lib/src/fasta/parser/listener.dart (right): https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta/parser/listener.dart#newcode248 pkg/front_end/lib/src/fasta/parser/listener.dart:248: void beginBlockFunctionBody(Token token) {} If you're willing to ...
3 years, 9 months ago (2017-03-14 15:15:18 UTC) #3
scheglov
https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta/parser/listener.dart File pkg/front_end/lib/src/fasta/parser/listener.dart (right): https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta/parser/listener.dart#newcode248 pkg/front_end/lib/src/fasta/parser/listener.dart:248: void beginBlockFunctionBody(Token token) {} On 2017/03/14 15:15:17, ahe wrote: ...
3 years, 9 months ago (2017-03-14 17:45:56 UTC) #4
scheglov
Committed patchset #2 (id:20001) manually as b9a1a29f2be7f0c4589b7a5613117effa84c5026 (presubmit successful).
3 years, 9 months ago (2017-03-14 17:47:53 UTC) #6
ahe
3 years, 9 months ago (2017-03-15 08:28:35 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta...
File pkg/front_end/lib/src/fasta/parser/listener.dart (right):

https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/parser/listener.dart:248: void
beginBlockFunctionBody(Token token) {}
On 2017/03/14 17:45:56, scheglov wrote:
> Even better would be to name them functionBodyBlockBegin,
functionBodyBlockEnd,
> functionBodyExpressionHandle, etc.
> 
> And of course sort all the files :-)

Yeah. I've tried to keep the names sorted by what follows the {begin,end,handle}
prefix.

It would make more sense to come up with a naming scheme that allows us to keep
them sorted using tools. In that case, I'd tweak the names slightly, and use
"start", "end", and "done" suffixes.

Historically, the parser has been more stable, so I think would make sense to
delay such a major rename a couple of months anticipating less churn in this
file.

https://codereview.chromium.org/2747853002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/parser/listener.dart:260: void
handleNoFunctionBody(Token token) {
On 2017/03/14 17:45:56, scheglov wrote:
> On 2017/03/14 15:15:17, ahe wrote:
> > Should this be the same as endEmptyFunctionBody?
> 
> How can I know?
> You wrote this code.

I'm asking for your opinion, as you added endEmptyFunctionBody, and it only
occurred to me now that it may make sense to combine these two.

> I see that it is used only in skipFunctionBody(), but it also does not state
its
> intentions.

Based on how it's currently used, I'd like your opinion.

Powered by Google App Engine
This is Rietveld 408576698