Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 19996) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -4854,6 +4854,9 @@ |
| escape_characters = true; |
| } |
| } |
| + if ((literal.CharAt(i) == '$')) { |
|
Ivan Posva
2013/03/18 18:12:22
$ should be a SpecialCharacter and then you would
siva
2013/03/19 17:08:31
The raw string processing was interfering with tre
|
| + escape_characters = true; |
| + } |
| } |
| if ((prev != Token::kINTERPOL_VAR) && (prev != Token::kINTERPOL_END)) { |
| if (is_raw_string) { |
| @@ -11483,6 +11486,7 @@ |
| intptr_t index = 0; |
| for (intptr_t i = 0; i < len; i++) { |
| if (IsSpecialCharacter(*CharAddr(str, i)) || |
| + (!raw_str && (*CharAddr(str, i) == '$')) || |
| (!raw_str && (*CharAddr(str, i) == '\\'))) { |
| num_escapes += 1; |
| } |
| @@ -11494,6 +11498,10 @@ |
| *(CharAddr(dststr, index)) = '\\'; |
| *(CharAddr(dststr, index + 1)) = SpecialCharacter(*CharAddr(str, i)); |
| index += 2; |
| + } else if (!raw_str && (*CharAddr(str, i) == '$')) { |
| + *(CharAddr(dststr, index)) = '\\'; |
| + *(CharAddr(dststr, index + 1)) = '$'; |
| + index += 2; |
| } else if (!raw_str && (*CharAddr(str, i) == '\\')) { |
| *(CharAddr(dststr, index)) = '\\'; |
| *(CharAddr(dststr, index + 1)) = '\\'; |