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

Issue 2795063002: Add support for parsing comments with generic parameters /*<K, V>*/ with Fasta. (Closed)

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

Description

Add support for parsing comments with generic parameters /*<K, V>*/ with Fasta. R=paulberry@google.com, ahe@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/35d96bacabfdee3aa7e26c4f47dd5ba4047f90cc

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -174 lines) Patch
M pkg/analyzer/test/generated/parser_fasta_test.dart View 16 chunks +13 lines, -173 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/parser.dart View 10 chunks +67 lines, -1 line 8 comments Download

Messages

Total messages: 7 (1 generated)
scheglov
3 years, 8 months ago (2017-04-03 22:03:51 UTC) #1
Paul Berry
lgtm
3 years, 8 months ago (2017-04-03 22:31:21 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as 35d96bacabfdee3aa7e26c4f47dd5ba4047f90cc (presubmit successful).
3 years, 8 months ago (2017-04-03 23:27:54 UTC) #4
ahe
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta/parser/parser.dart File pkg/front_end/lib/src/fasta/parser/parser.dart (right): https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta/parser/parser.dart#newcode120 pkg/front_end/lib/src/fasta/parser/parser.dart:120: import '../scanner/string_scanner.dart'; The parser shouldn't be importing as specific ...
3 years, 8 months ago (2017-04-04 08:10:45 UTC) #5
scheglov
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta/parser/parser.dart File pkg/front_end/lib/src/fasta/parser/parser.dart (right): https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta/parser/parser.dart#newcode120 pkg/front_end/lib/src/fasta/parser/parser.dart:120: import '../scanner/string_scanner.dart'; On 2017/04/04 08:10:45, ahe wrote: > The ...
3 years, 8 months ago (2017-04-04 15:33:48 UTC) #6
ahe
3 years, 8 months ago (2017-04-05 14:43:53 UTC) #7
Message was sent while issue was closed.
Konstantin,

I've realized that there's a lack of documentation about the parser's design.
Based on this conversation, I'll try to get started on a document where I
explain the detailed reasoning behind this. I hope you'll help me by being one
of the first reviewers.

On 2017/04/04 15:33:48, scheglov wrote:
>
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta...
> File pkg/front_end/lib/src/fasta/parser/parser.dart (right):
> 
>
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta...
> pkg/front_end/lib/src/fasta/parser/parser.dart:120: import
> '../scanner/string_scanner.dart';
> On 2017/04/04 08:10:45, ahe wrote:
> > The parser shouldn't be importing as specific scanner.
> 
> Why?
> The parser knows what it wants to parse and how.
> 
>
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta...
> pkg/front_end/lib/src/fasta/parser/parser.dart:643: token =
> _injectGenericCommentTypeList(token);
> On 2017/04/04 08:10:45, ahe wrote:
> > This method should be public and overridden in a subclass.
> 
> In which subclass?
> 
>
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta...
> pkg/front_end/lib/src/fasta/parser/parser.dart:1118: /// TODO(ahe): Clean this
> up.
> On 2017/04/04 08:10:45, ahe wrote:
> > This isn't a documentation comment.
> 
> Well, I think any comment before a method, and which is related to the method,
> should be a documentation comment.
> 
>
https://codereview.chromium.org/2795063002/diff/1/pkg/front_end/lib/src/fasta...
> pkg/front_end/lib/src/fasta/parser/parser.dart:3838: var scanner = new
> StringScanner(' ' * offset + code);
> On 2017/04/04 08:10:45, ahe wrote:
> > The listener should be asked how to create a scanner, otherwise you can't
> extend
> > it.
> 
> What do we want to extend?
> These comments are part of the language, and should be supported in the parser
> for the language.

Powered by Google App Engine
This is Rietveld 408576698