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

Issue 2709783003: Parse optional and named parameters. (Closed)

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

Description

Parse optional and named parameters. I'm not a big fan of the currentParameterKind stack, this information is almost accessible from parseFormalParameter(), but we don't pass the type to the listener. R=ahe@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/4500bb09203159a25eb7ff43296979344befb5c4

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add 'FormalParameterType kind' to endFormalParameter() and add handleFormalParameterWithoutValue(). #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -74 lines) Patch
M pkg/analyzer/test/generated/parser_fasta_test.dart View 1 3 chunks +7 lines, -64 lines 0 comments Download
M pkg/compiler/lib/src/parser/node_listener.dart View 1 3 chunks +7 lines, -1 line 1 comment Download
M pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart View 1 4 chunks +53 lines, -2 lines 5 comments Download
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 1 2 chunks +6 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/parser/listener.dart View 1 3 chunks +6 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/parser/parser.dart View 1 2 chunks +6 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/source/outline_builder.dart View 1 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 10 (1 generated)
scheglov
3 years, 10 months ago (2017-02-22 03:01:39 UTC) #1
ahe
lgtm https://codereview.chromium.org/2709783003/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/2709783003/diff/1/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode509 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:509: currentParameterKind.addLast(ParameterKind.POSITIONAL); I suggest that you push this on ...
3 years, 10 months ago (2017-02-22 09:25:16 UTC) #2
scheglov
https://codereview.chromium.org/2709783003/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/2709783003/diff/1/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode509 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:509: currentParameterKind.addLast(ParameterKind.POSITIONAL); On 2017/02/22 09:25:15, ahe wrote: > I suggest ...
3 years, 10 months ago (2017-02-22 17:18:15 UTC) #3
ahe
https://codereview.chromium.org/2709783003/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/2709783003/diff/1/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode509 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:509: currentParameterKind.addLast(ParameterKind.POSITIONAL); On 2017/02/22 17:18:14, scheglov wrote: > On 2017/02/22 ...
3 years, 10 months ago (2017-02-22 17:30:23 UTC) #4
scheglov
PTAL There is no difference in speed of running parser tests, with and without the ...
3 years, 10 months ago (2017-02-22 19:36:44 UTC) #5
Paul Berry
lgtm assuming you run dartfmt. My other comments are at your discretion. https://codereview.chromium.org/2709783003/diff/20001/pkg/compiler/lib/src/parser/node_listener.dart File pkg/compiler/lib/src/parser/node_listener.dart ...
3 years, 10 months ago (2017-02-22 20:50:05 UTC) #6
ahe
lgtm Please don't run dartfmt on body_builder.dart. https://codereview.chromium.org/2709783003/diff/20001/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/2709783003/diff/20001/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode510 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:510: push(_ParameterDefaultValue.nullValue); On ...
3 years, 10 months ago (2017-02-23 14:54:49 UTC) #7
scheglov
https://codereview.chromium.org/2709783003/diff/20001/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/2709783003/diff/20001/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart#newcode510 pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:510: push(_ParameterDefaultValue.nullValue); On 2017/02/22 20:50:04, Paul Berry wrote: > Personally ...
3 years, 10 months ago (2017-02-23 17:55:10 UTC) #8
scheglov
3 years, 10 months ago (2017-02-23 17:55:24 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
4500bb09203159a25eb7ff43296979344befb5c4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698