From 97878725532c4d1dd1af07e88175462178d78cdb Mon Sep 17 00:00:00 2001 From: Benjamin Herr Date: Wed, 2 Oct 2013 03:32:29 +0200 Subject: add token::LIT_STR_RAW(ident, num of # symbols) Treat it as a synonym for LIT_STR for now. --- src/libsyntax/parse/lexer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/lexer.rs') diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 902c7f27fe6..a43e018cf49 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -883,7 +883,7 @@ fn next_token_inner(rdr: @mut StringReader) -> token::Token { content_start_bpos, content_end_bpos, str_to_ident); - return token::LIT_STR(str_content); + return token::LIT_STR_RAW(str_content, hash_count); } '-' => { if nextch(rdr) == '>' { @@ -1048,7 +1048,7 @@ mod test { let TokenAndSpan {tok, sp: _} = env.string_reader.next_token(); let id = token::str_to_ident("\"#a\\b\x00c\""); - assert_eq!(tok, token::LIT_STR(id)); + assert_eq!(tok, token::LIT_STR_RAW(id, 3)); } #[test] fn line_doc_comments() { -- cgit 1.4.1-3-g733a5