Change proto_to_carbon to use \x for escaping in string literals to be compatible with Carbon string parsing (#1266)

This commit is contained in:
pk19604014
2022-05-18 08:57:00 -07:00
committed by GitHub
parent 45b18098ed
commit b36c006a01
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -12,12 +12,12 @@
package ExplorerTest api;
fn CompareStr(s: String) -> i32 {
if (s == "str;") {
if (s == "str;\x07") {
return 0;
}
return 1;
}
fn Main() -> i32 {
return CompareStr("\x73\x74\x72\x3B");
return CompareStr("\x73\x74\x72\x3B\x07");
}