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

Issue 231793007: Allow function literal in string interpolation (dartbug.com/18137). (Closed)

Created:
6 years, 8 months ago by Paul Berry
Modified:
6 years, 8 months ago
Reviewers:
jwren, Brian Wilkerson
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Allow function literal in string interpolation (dartbug.com/18137). As of r34903, the VM allows function literals inside string interpolation, even if the string is inside an initializer. This makes the corresponding change to the analyzer. R=jwren@google.com Committed: https://code.google.com/p/dart/source/detail?r=34930

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -16 lines) Patch
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java View 1 chunk +9 lines, -3 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java View 1 chunk +2 lines, -13 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
Paul Berry
6 years, 8 months ago (2014-04-10 02:23:46 UTC) #1
jwren
On 2014/04/10 02:23:46, Paul Berry wrote: LGTM
6 years, 8 months ago (2014-04-10 03:12:55 UTC) #2
Paul Berry
Committed patchset #1 manually as r34930 (presubmit successful).
6 years, 8 months ago (2014-04-10 15:53:41 UTC) #3
Brian Wilkerson
LGTM https://codereview.chromium.org/231793007/diff/1/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java File editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java (right): https://codereview.chromium.org/231793007/diff/1/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java#newcode186 editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java:186: parseCompilationUnit("class C { C() : a = \"${(){}}\"; ...
6 years, 8 months ago (2014-04-10 22:33:54 UTC) #4
Paul Berry
6 years, 8 months ago (2014-04-10 22:43:22 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/231793007/diff/1/editor/tools/plugins/com.goo...
File
editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
(right):

https://codereview.chromium.org/231793007/diff/1/editor/tools/plugins/com.goo...
editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java:186:
parseCompilationUnit("class C { C() : a = \"${(){}}\"; }");
On 2014/04/10 22:33:54, Brian Wilkerson wrote:
> Not that it matters, but...
> 
> Because Dart allows using either double or single quotes, you can make source
> code easier to read by using single quotes instead of escaped double quotes,
as
> in
> 
>    "class C { C() : a = '${(){}}'; }"

Good point.  I'll keep that in mind in the future.

Powered by Google App Engine
This is Rietveld 408576698