| Index: frog/leg/ssa/codegen.dart
|
| diff --git a/frog/leg/ssa/codegen.dart b/frog/leg/ssa/codegen.dart
|
| index 1bbb592d3dbe4c916700e0a1e226c129c8594ff4..3309e550d8c9e2d5ece37fb61f92fb82308517c9 100644
|
| --- a/frog/leg/ssa/codegen.dart
|
| +++ b/frog/leg/ssa/codegen.dart
|
| @@ -436,12 +436,6 @@ class SsaCodeGenerator implements HVisitor {
|
| buffer.add(')');
|
| }
|
|
|
| - static String makeStringLiteral(SourceString literal) {
|
| - // TODO(lrn): Escape string content.
|
| - return literal.toString();
|
| - }
|
| -
|
| -
|
| visitLiteral(HLiteral node) {
|
| if (node.isLiteralNull()) {
|
| buffer.add("(void 0)");
|
| @@ -449,7 +443,10 @@ class SsaCodeGenerator implements HVisitor {
|
| buffer.add('(${node.value})');
|
| } else if (node.isLiteralString()) {
|
| QuotedString string = node.value;
|
| - string.printOn(buffer);
|
| + String quote = string.quoteChar;
|
| + buffer.add(quote);
|
| + string.writeEscaped(buffer, quote);
|
| + buffer.add(quote);
|
| } else {
|
| buffer.add(node.value);
|
| }
|
|
|