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

Issue 2912693002: improve fasta unterminated string recovery (Closed)

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

Description

improve fasta unterminated string recovery * enhance handling of unterminated strings * update ast builder and string validator to handle unterminated strings

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -143 lines) Patch
M pkg/compiler/lib/src/string_validator.dart View 1 chunk +7 lines, -1 line 1 comment Download
M pkg/front_end/lib/src/fasta/quote.dart View 1 chunk +6 lines, -4 lines 1 comment Download
M pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart View 6 chunks +35 lines, -16 lines 0 comments Download
M pkg/front_end/lib/src/scanner/token.dart View 1 chunk +8 lines, -2 lines 0 comments Download
M pkg/front_end/test/scanner_fasta_test.dart View 4 chunks +114 lines, -68 lines 0 comments Download
M pkg/front_end/test/scanner_replacement_test.dart View 3 chunks +0 lines, -42 lines 0 comments Download
M pkg/front_end/test/scanner_test.dart View 5 chunks +65 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
danrubel
3 years, 6 months ago (2017-05-29 03:43:44 UTC) #2
ahe
I think I have to give up on this CL for now, and start again ...
3 years, 6 months ago (2017-05-29 15:05:31 UTC) #3
danrubel
On 2017/05/29 15:05:31, ahe wrote: > I think I have to give up on this ...
3 years, 6 months ago (2017-05-31 13:54:08 UTC) #4
danrubel
3 years, 6 months ago (2017-06-01 17:11:34 UTC) #6
Message was sent while issue was closed.
On 2017/05/31 13:54:08, danrubel wrote:
> On 2017/05/29 15:05:31, ahe wrote:
> > I think I have to give up on this CL for now, and start again tomorrow
morning
> > (or possibly later tonight). Right now, my head is too mushy.
> > 
> > I did spot something that may cause crashes.
> > 
> >
>
https://codereview.chromium.org/2912693002/diff/1/pkg/compiler/lib/src/string...
> > File pkg/compiler/lib/src/string_validator.dart (right):
> > 
> >
>
https://codereview.chromium.org/2912693002/diff/1/pkg/compiler/lib/src/string...
> > pkg/compiler/lib/src/string_validator.dart:32: rightQuote =
> > quoting.rightQuoteLength;
> > What happens with this string:
> > 
> > """x"
> > 
> >
>
https://codereview.chromium.org/2912693002/diff/1/pkg/front_end/lib/src/fasta...
> > File pkg/front_end/lib/src/fasta/quote.dart (right):
> > 
> >
>
https://codereview.chromium.org/2912693002/diff/1/pkg/front_end/lib/src/fasta...
> > pkg/front_end/lib/src/fasta/quote.dart:138: return
> > unescape(string.substring(startIndex, endIndex), quote);
> > Same question.
> 
> Glad that you pointed this out. When I dug further into the parser to better
> understand the issue, I found that it did not handle sequential string tokens
> the way that I thought it would. Per our discussion today, I'll rework this
and
> have a new CL for you to review later in the week. Thanks!

See https://codereview.chromium.org/2915093002/

Powered by Google App Engine
This is Rietveld 408576698