summaryrefslogtreecommitdiff
path: root/sources/scalac/atree
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2004-05-17 11:45:31 +0000
committermihaylov <mihaylov@epfl.ch>2004-05-17 11:45:31 +0000
commit24e43faec4869ba139f3e818c480a2972ca4cd3a (patch)
treee83e3bc21e82a921f2fe97d87e917744c4bb357d /sources/scalac/atree
parent492ef8816734e44233eca1ffda19de5a4722832f (diff)
downloadscala-24e43faec4869ba139f3e818c480a2972ca4cd3a.tar.gz
scala-24e43faec4869ba139f3e818c480a2972ca4cd3a.tar.bz2
scala-24e43faec4869ba139f3e818c480a2972ca4cd3a.zip
- Escape the printed value of string constants ...
- Escape the printed value of string constants to prevent it from changing the formatting - new lines, different colours (e.g. in scala.Console), etc.
Diffstat (limited to 'sources/scalac/atree')
-rw-r--r--sources/scalac/atree/ATreePrinter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/scalac/atree/ATreePrinter.java b/sources/scalac/atree/ATreePrinter.java
index 21114899d1..f68df2e09f 100644
--- a/sources/scalac/atree/ATreePrinter.java
+++ b/sources/scalac/atree/ATreePrinter.java
@@ -17,6 +17,7 @@ import scalac.symtab.Type;
import scalac.symtab.Symbol;
import scalac.symtab.SymbolTablePrinter;
import scalac.util.Debug;
+import scalac.util.SourceRepresentation;
/** This class provides methods to print attributed trees. */
public class ATreePrinter {
@@ -537,7 +538,7 @@ public class ATreePrinter {
case DOUBLE(double value):
return print(value);
case STRING(String value):
- return print('\"').print(value).print('\"');
+ return print('\"').print(SourceRepresentation.escape(value)).print('\"');
case NULL:
return print("null");
case ZERO: