[Swift-commit] r6243 - branches/faster/resources

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Fri Feb 8 22:37:05 CST 2013


Author: hategan
Date: 2013-02-08 22:37:04 -0600 (Fri, 08 Feb 2013)
New Revision: 6243

Modified:
   branches/faster/resources/swiftscript.g
Log:
fixed escape sequence in string literals; \\b and \\\\b would produce the same result

Modified: branches/faster/resources/swiftscript.g
===================================================================
--- branches/faster/resources/swiftscript.g	2013-02-09 04:36:01 UTC (rev 6242)
+++ branches/faster/resources/swiftscript.g	2013-02-09 04:37:04 UTC (rev 6243)
@@ -50,9 +50,7 @@
 }
 
 String quote(String s) {
-    String s1 = s.replaceAll("\\\\\"", """);
-    String s2 = s1.replaceAll("\\\\\\\\", "\\\\");
-    return s2;
+    return s.replaceAll("\\\\\"", """);
 }
 
 }
@@ -1287,7 +1285,6 @@
     |    'b'
     |    'f'
     |    '"'
-    |    '\''
     |    '\\'
     )
     ;




More information about the Swift-commit mailing list