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

Issue 2686363002: Move token stream translation logic into Fasta. (Closed)

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

Description

Move token stream translation logic into Fasta. This logic was initially only used in scanner_fasta_test, however we are going to need it for other tests (some of which are outside of the Fasta package), and on a short term basis we may want to use it to help integrate pieces of Fasta with pieces of the analyzer codebase. So it needs to be somewhere that's accessible outside of pkg/front_end/test. I performed some trivial improvements during the move (such as using Token.info.kind in preference to "is" checks, and identifying the end of the input by looking for a nearby EOF token). R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/2e435ec020be9c361e45f92e1c5f57dc4f141809

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -94 lines) Patch
M pkg/front_end/lib/src/fasta/analyzer/token_utils.dart View 2 chunks +133 lines, -0 lines 3 comments Download
M pkg/front_end/test/scanner_fasta_test.dart View 2 chunks +4 lines, -94 lines 0 comments Download
M pkg/front_end/test/subpackage_relationships_test.dart View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Paul Berry
3 years, 10 months ago (2017-02-10 21:30:44 UTC) #2
Siggi Cherem (dart-lang)
lgtm
3 years, 10 months ago (2017-02-10 21:46:31 UTC) #3
Paul Berry
Committed patchset #1 (id:1) manually as 2e435ec020be9c361e45f92e1c5f57dc4f141809 (presubmit successful).
3 years, 10 months ago (2017-02-10 21:48:13 UTC) #5
ahe
lgtm https://codereview.chromium.org/2686363002/diff/1/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart File pkg/front_end/lib/src/fasta/analyzer/token_utils.dart (right): https://codereview.chromium.org/2686363002/diff/1/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart#newcode53 pkg/front_end/lib/src/fasta/analyzer/token_utils.dart:53: // operations. Absolutely, we should do something like ...
3 years, 10 months ago (2017-02-10 21:56:26 UTC) #6
Paul Berry
3 years, 10 months ago (2017-02-10 22:55:01 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2686363002/diff/1/pkg/front_end/lib/src/fasta...
File pkg/front_end/lib/src/fasta/analyzer/token_utils.dart (right):

https://codereview.chromium.org/2686363002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/analyzer/token_utils.dart:113: int endOffset =
token.endOffset ?? charOffset;
On 2017/02/10 21:56:25, ahe wrote:
> That sounds bad. Would you mind filing a bug if you have source text that
causes
> this?
> 
> It could be my recent error recovery that's broken.

Filed https://github.com/dart-lang/sdk/issues/28745.

Powered by Google App Engine
This is Rietveld 408576698