diff options
| author | Benjamin Herr <ben@0x539.de> | 2013-10-02 03:32:29 +0200 |
|---|---|---|
| committer | Benjamin Herr <ben@0x539.de> | 2013-10-08 01:44:05 +0200 |
| commit | 97878725532c4d1dd1af07e88175462178d78cdb (patch) | |
| tree | 22bbce6a302b11127fb7db196995affa8f272b3f /src/libsyntax/parse/lexer.rs | |
| parent | 18099fe085535d3d026db1a771c115b7a7ba6563 (diff) | |
| download | rust-97878725532c4d1dd1af07e88175462178d78cdb.tar.gz rust-97878725532c4d1dd1af07e88175462178d78cdb.zip | |
add token::LIT_STR_RAW(ident, num of # symbols)
Treat it as a synonym for LIT_STR for now.
Diffstat (limited to 'src/libsyntax/parse/lexer.rs')
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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() { |
