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

Unified Diff: frog/leg/compile_time_constants.dart

Issue 9642001: Make string juxtaposition combine properly with string interpolations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | frog/leg/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/compile_time_constants.dart
diff --git a/frog/leg/compile_time_constants.dart b/frog/leg/compile_time_constants.dart
index 46a5e2a1a2a4fc2ff49414faebc4be424a67bd1b..c6126b90661b0b55c715714bccb5e9f49dc16391 100644
--- a/frog/leg/compile_time_constants.dart
+++ b/frog/leg/compile_time_constants.dart
@@ -769,6 +769,13 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
return new StringConstant(node.dartString);
}
+ Constant visitStringJuxtaposition(StringJuxtaposition node) {
+ if (!node.isInterpolation) {
+ return new StringConstant(node.dartString);
+ }
+ return super.visitStringJuxtaposition(node);
+ }
+
// TODO(floitsch): provide better error-messages.
Constant visitSend(Send send) {
Element element = elements[send];
@@ -1010,7 +1017,7 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
compiler.registerInstantiatedClass(classElement);
// TODO(floitsch): take generic types into account.
- Type type = classElement.computeType(compiler);
+ Type type = classElement.computeType(compiler);
Constant constant = new ConstructedConstant(type, jsNewArguments);
constantHandler.registerCompileTimeConstant(constant);
return constant;
« no previous file with comments | « no previous file | frog/leg/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698