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

Issue 2915093002: 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 This updates the fasta scanner to append synthetic closing quotes to unterminated strings. Rework of https://codereview.chromium.org/2912693002/ R=ahe@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/b61f9f2343e690c87e3f020b6bd94aa6eda3d371

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix dartdoc #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -222 lines) Patch
M pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart View 1 6 chunks +40 lines, -15 lines 2 comments Download
M pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart View 3 chunks +21 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/string_scanner.dart View 3 chunks +13 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart View 3 chunks +13 lines, -2 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 6 chunks +158 lines, -102 lines 0 comments Download
M pkg/front_end/test/scanner_replacement_test.dart View 2 chunks +0 lines, -70 lines 0 comments Download
M pkg/front_end/test/scanner_test.dart View 5 chunks +134 lines, -27 lines 1 comment Download

Messages

Total messages: 8 (2 generated)
danrubel
3 years, 6 months ago (2017-06-01 16:40:21 UTC) #2
scheglov
LGTM https://codereview.chromium.org/2915093002/diff/1/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart File pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart (right): https://codereview.chromium.org/2915093002/diff/1/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart#newcode166 pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart:166: * Appends a substring from the scan offset ...
3 years, 6 months ago (2017-06-01 16:48:17 UTC) #3
danrubel
https://codereview.chromium.org/2915093002/diff/1/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart File pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart (right): https://codereview.chromium.org/2915093002/diff/1/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart#newcode166 pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart:166: * Appends a substring from the scan offset [:start:] ...
3 years, 6 months ago (2017-06-01 17:25:42 UTC) #4
ahe
lgtm https://codereview.chromium.org/2915093002/diff/20001/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart File pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart (right): https://codereview.chromium.org/2915093002/diff/20001/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart#newcode1238 pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart:1238: int quoteChar, int start, bool asciiOnlyString) { Since ...
3 years, 6 months ago (2017-06-02 12:26:44 UTC) #5
danrubel
Committed patchset #2 (id:20001) manually as b61f9f2343e690c87e3f020b6bd94aa6eda3d371 (presubmit successful).
3 years, 6 months ago (2017-06-02 15:51:18 UTC) #7
danrubel
3 years, 6 months ago (2017-06-07 15:51:41 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/2915093002/diff/20001/pkg/front_end/lib/src/f...
File pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart (right):

https://codereview.chromium.org/2915093002/diff/20001/pkg/front_end/lib/src/f...
pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart:1238: int quoteChar,
int start, bool asciiOnlyString) {
On 2017/06/02 12:26:43, ahe wrote:
> Since these are for error handling, you could possibly collapse them into one
> method with these named parameters:
> 
> {bool asciiOnlyString, bool isRaw, bool isMultiLine}
> 
> Normally, I avoid using names parameters in performance critical code, but
this
> isn't that.

Sounds reasonable. Fixed in https://codereview.chromium.org/2919163002/

Powered by Google App Engine
This is Rietveld 408576698