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

Issue 336413002: Allow whitespace and \ before the first newline of multiline string. (Closed)

Created:
6 years, 6 months ago by floitsch
Modified:
6 years, 6 months ago
CC:
reviews_dartlang.org, asgerf, Lasse Reichstein Nielsen, ahe
Visibility:
Public.

Description

Allow whitespace and \ before the first newline of multiline string. According to the spec leading whitespace and \ is discarded if it is followed by a newline. BUG= http://dartbug.com/19386 R=johnniwinther@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=37446

Patch Set 1 #

Patch Set 2 : Add one more test. #

Patch Set 3 : Make QUOTINGS private. #

Patch Set 4 : Update comment. #

Patch Set 5 : Use more intuitive test. #

Total comments: 22

Patch Set 6 : Address comments. #

Patch Set 7 : Forgot to save. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -78 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart View 1 2 2 chunks +12 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/string_validator.dart View 1 2 3 4 5 6 2 chunks +29 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/tree/nodes.dart View 1 2 3 4 5 1 chunk +40 lines, -57 lines 0 comments Download
M tests/co19/co19-dart2js.status View 2 chunks +0 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/string_escapes_test.dart View 1 2 3 4 5 1 chunk +43 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
floitsch
6 years, 6 months ago (2014-06-17 15:41:28 UTC) #1
Lasse Reichstein Nielsen
https://codereview.chromium.org/336413002/diff/80001/tests/compiler/dart2js/string_escapes_test.dart File tests/compiler/dart2js/string_escapes_test.dart (right): https://codereview.chromium.org/336413002/diff/80001/tests/compiler/dart2js/string_escapes_test.dart#newcode32 tests/compiler/dart2js/string_escapes_test.dart:32: }), Also test backslashes before other whitespace characters like ...
6 years, 6 months ago (2014-06-17 15:56:52 UTC) #2
ahe
If possible, get an l*g*t*m from Lasse. IIRC, he wrote this code originally. I skimmed ...
6 years, 6 months ago (2014-06-18 07:54:25 UTC) #3
Johnni Winther
https://codereview.chromium.org/336413002/diff/80001/sdk/lib/_internal/compiler/implementation/string_validator.dart File sdk/lib/_internal/compiler/implementation/string_validator.dart (right): https://codereview.chromium.org/336413002/diff/80001/sdk/lib/_internal/compiler/implementation/string_validator.dart#newcode39 sdk/lib/_internal/compiler/implementation/string_validator.dart:39: int quoteLength = 1; Rename to [leftQuoteLength]. Also in ...
6 years, 6 months ago (2014-06-18 08:43:44 UTC) #4
Lasse Reichstein Nielsen
LGTM with more tests. https://codereview.chromium.org/336413002/diff/80001/sdk/lib/_internal/compiler/implementation/string_validator.dart File sdk/lib/_internal/compiler/implementation/string_validator.dart (right): https://codereview.chromium.org/336413002/diff/80001/sdk/lib/_internal/compiler/implementation/string_validator.dart#newcode68 sdk/lib/_internal/compiler/implementation/string_validator.dart:68: foundWhitespace = false; This "break ...
6 years, 6 months ago (2014-06-18 09:05:32 UTC) #5
floitsch
And I thought this was going to be a trivial CL ;) PTAL. https://codereview.chromium.org/336413002/diff/80001/sdk/lib/_internal/compiler/implementation/string_validator.dart File ...
6 years, 6 months ago (2014-06-18 12:14:23 UTC) #6
Johnni Winther
lgtm
6 years, 6 months ago (2014-06-18 12:40:01 UTC) #7
floitsch
Forgot to save file. Waiting for lgtm from Lasse.
6 years, 6 months ago (2014-06-18 12:59:25 UTC) #8
Lasse Reichstein Nielsen
lgtm
6 years, 6 months ago (2014-06-18 14:26:15 UTC) #9
floitsch
6 years, 6 months ago (2014-06-18 14:43:44 UTC) #10
Message was sent while issue was closed.
Committed patchset #7 manually as r37446 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698