| Index: frog/leg/ssa/codegen.dart
|
| diff --git a/frog/leg/ssa/codegen.dart b/frog/leg/ssa/codegen.dart
|
| index fad8f53490ea5fd45fb44311d6566a5880cb33f8..55e60aa72e29b9b9516c787dcb4cd73b4c01b2a7 100644
|
| --- a/frog/leg/ssa/codegen.dart
|
| +++ b/frog/leg/ssa/codegen.dart
|
| @@ -460,11 +460,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)");
|
| @@ -472,7 +467,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, string.quoteCharCode);
|
| + buffer.add(quote);
|
| } else {
|
| buffer.add(node.value);
|
| }
|
|
|