Chromium Code Reviews| Index: frog/leg/compile_time_constants.dart |
| diff --git a/frog/leg/compile_time_constants.dart b/frog/leg/compile_time_constants.dart |
| index 32487beee10d13b3f08a33b29e2c7bc80905a1a3..2058c0e78f3e9aa81d169bee516f8e918ae81d64 100644 |
| --- a/frog/leg/compile_time_constants.dart |
| +++ b/frog/leg/compile_time_constants.dart |
| @@ -333,9 +333,9 @@ class MapConstant extends ObjectConstant { |
| buffer.add("$isolatePrototype.$name"); |
| } else { |
| value.writeJsCode(buffer, handler); |
| - } |
| + } |
| } |
| - buffer.add("}"); |
| + buffer.add("}"); |
| } |
| void badFieldCountError() { |
| @@ -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); |
|
ahe
2012/03/19 15:53:06
Cancel directly to produce better error message? A
Lasse Reichstein Nielsen
2012/03/20 09:34:33
This is just a temporary stopgap. I have another C
|
| + } |
| + |
| // 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; |