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

Issue 10824113: Fix interpolation unparse. (Closed)

Created:
8 years, 4 months ago by Anton Muhin
Modified:
8 years, 4 months ago
Reviewers:
Roman
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix interpolation unparse. Formerly, string interpolation parts were put into a node list with null delimiter, which was converted to single space string. That lead to extra space when unparsing interpolation: '$a $b' -> '$a $b'. Make empty string delimiter explicit and do not augument it with an additional space. R=smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=10073

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -20 lines) Patch
M lib/compiler/implementation/scanner/listener.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M lib/compiler/implementation/tree/unparser.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/unparser_test.dart View 3 chunks +4 lines, -4 lines 0 comments Download
M tests/language/language.status View 6 chunks +0 lines, -14 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Anton Muhin
8 years, 4 months ago (2012-07-31 16:56:56 UTC) #1
Roman
lgtm https://chromiumcodereview.appspot.com/10824113/diff/1/lib/compiler/implementation/scanner/listener.dart File lib/compiler/implementation/scanner/listener.dart (right): https://chromiumcodereview.appspot.com/10824113/diff/1/lib/compiler/implementation/scanner/listener.dart#newcode874 lib/compiler/implementation/scanner/listener.dart:874: NodeList partNodes = new NodeList(null, parts, null, const ...
8 years, 4 months ago (2012-07-31 17:21:20 UTC) #2
Anton Muhin
8 years, 4 months ago (2012-07-31 17:43:31 UTC) #3
https://chromiumcodereview.appspot.com/10824113/diff/1/lib/compiler/implement...
File lib/compiler/implementation/scanner/listener.dart (right):

https://chromiumcodereview.appspot.com/10824113/diff/1/lib/compiler/implement...
lib/compiler/implementation/scanner/listener.dart:874: NodeList partNodes = new
NodeList(null, parts, null, const SourceString(""));
I'll fix 80, but would rather provide explicit empty string delimiter as it
appears to be better as it more explicit.  Will revert if need be.

On 2012/07/31 17:21:20, Roman wrote:
> >80 chars
> 
> Also, maybe leave it as is, since you made nodelist to not emit unnecessary
> whitespaces? (it's just thinking about minimal modifications)

Powered by Google App Engine
This is Rietveld 408576698