diff options
author | mihaylov <mihaylov@epfl.ch> | 2004-05-17 11:45:31 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2004-05-17 11:45:31 +0000 |
commit | 24e43faec4869ba139f3e818c480a2972ca4cd3a (patch) | |
tree | e83e3bc21e82a921f2fe97d87e917744c4bb357d | |
parent | 492ef8816734e44233eca1ffda19de5a4722832f (diff) | |
download | scala-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.
-rw-r--r-- | sources/scalac/atree/ATreePrinter.java | 3 |
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: |