From 3819b6b3d11c2ae8d9a368049d679d2a096569a0 Mon Sep 17 00:00:00 2001 From: Paul Stansifer Date: Mon, 30 Jul 2012 17:56:25 -0700 Subject: [PATCH] Allow single quote to be escaped in strings. --- src/libsyntax/parse/lexer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 08ec1c5f242..f14dd7df9d2 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -602,6 +602,7 @@ fn next_token_inner(rdr: string_reader) -> token::token { 'r' { str::push_char(accum_str, '\r'); } 't' { str::push_char(accum_str, '\t'); } '\\' { str::push_char(accum_str, '\\'); } + '\'' { str::push_char(accum_str, '\''); } '"' { str::push_char(accum_str, '"'); } '\n' { consume_whitespace(rdr); } 'x' {