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

Issue 2763833002: fasta.CommentToken implement analyzer.CommentToken (Closed)

Created:
3 years, 9 months ago by danrubel
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

fasta.CommentToken implement analyzer.CommentToken * update the fasta scanner to generate comment and dartdoc tokens * replace fasta.preceedingComments field with preceedingCommentTokens field and preceedingComments getter/setter * update token translator R=paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/80c8479587cfd0cef91057fe5e66c54ed9e19f38

Patch Set 1 #

Total comments: 7

Patch Set 2 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -28 lines) Patch
M pkg/analyzer/lib/src/fasta/ast_builder.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/fasta/token_utils.dart View 7 chunks +27 lines, -8 lines 0 comments Download
M pkg/analyzer/tool/summary/mini_ast.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart View 7 chunks +17 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart View 4 chunks +46 lines, -3 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/string_scanner.dart View 2 chunks +19 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/token.dart View 6 chunks +102 lines, -5 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart View 2 chunks +17 lines, -1 line 0 comments Download
M pkg/front_end/test/scanner_fasta_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/front_end/test/token_test.dart View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
danrubel
3 years, 9 months ago (2017-03-21 01:12:49 UTC) #2
Paul Berry
lgtm https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta/scanner/token.dart File pkg/front_end/lib/src/fasta/scanner/token.dart (right): https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta/scanner/token.dart#newcode457 pkg/front_end/lib/src/fasta/scanner/token.dart:457: throw 'unsupported operation'; Change this to `throw new ...
3 years, 9 months ago (2017-03-21 14:23:07 UTC) #3
ahe
https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta/scanner/token.dart File pkg/front_end/lib/src/fasta/scanner/token.dart (right): https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta/scanner/token.dart#newcode457 pkg/front_end/lib/src/fasta/scanner/token.dart:457: throw 'unsupported operation'; On 2017/03/21 14:23:07, Paul Berry wrote: ...
3 years, 9 months ago (2017-03-21 14:36:50 UTC) #4
danrubel
Committed patchset #1 (id:1) manually as 80c8479587cfd0cef91057fe5e66c54ed9e19f38 (presubmit successful).
3 years, 9 months ago (2017-03-21 15:40:54 UTC) #6
ahe
lgtm
3 years, 9 months ago (2017-03-22 09:44:26 UTC) #7
danrubel
3 years, 9 months ago (2017-03-22 17:10:49 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta...
File pkg/front_end/lib/src/fasta/scanner/token.dart (right):

https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/scanner/token.dart:457: throw 'unsupported
operation';
On 2017/03/21 14:36:50, ahe wrote:
> On 2017/03/21 14:23:07, Paul Berry wrote:
> > Change this to `throw new StateError('unsupported operation');`
> > 
> > Rationale: Error objects contain a stackTrace member which is automatically
> set
> > by the VM at the time the error is first thrown.  If it is later caught and
> > re-thrown, it is not changed.  This makes it easier to track down the source
> of
> > errors when they occur.
> 
> I generally use strings for internal errors. We have API to preserve stack
> traces, so it shouldn't be necessary to use subclasses of Error. This works
both
> for futures and rethrow.
> 
> However, in this case, I'd suggest using "internalError" from ../errors.dart,
as
> I'd like to keep the code free of "throw" in preference of using API like
what's
> in error.dart. internalError adds context to errors, and this has been helpful
> for collecting crash reports.

Fixed. https://codereview.chromium.org/2767083002/

https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/scanner/token.dart:462: // TODO: implement remove
On 2017/03/21 14:23:07, Paul Berry wrote:
> Nit: change this to TODO(danrubel)

Fixed. https://codereview.chromium.org/2767083002/

https://codereview.chromium.org/2763833002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/scanner/token.dart:463: throw 'not implemented yet';
On 2017/03/21 14:23:07, Paul Berry wrote:
> Similarly, change to `throw new UnimplementedError();`

Fixed. https://codereview.chromium.org/2767083002/

Powered by Google App Engine
This is Rietveld 408576698