about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorBenjamin Herr <ben@0x539.de>2013-10-02 03:32:29 +0200
committerBenjamin Herr <ben@0x539.de>2013-10-08 01:44:05 +0200
commit97878725532c4d1dd1af07e88175462178d78cdb (patch)
tree22bbce6a302b11127fb7db196995affa8f272b3f /src/libsyntax/parse/parser.rs
parent18099fe085535d3d026db1a771c115b7a7ba6563 (diff)
downloadrust-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/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cad19543608..c8689db417c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1283,6 +1283,7 @@ impl Parser {
             token::LIT_FLOAT_UNSUFFIXED(s) =>
                 lit_float_unsuffixed(self.id_to_str(s)),
             token::LIT_STR(s) => lit_str(self.id_to_str(s)),
+            token::LIT_STR_RAW(s, _) => lit_str(self.id_to_str(s)),
             token::LPAREN => { self.expect(&token::RPAREN); lit_nil },
             _ => { self.unexpected_last(tok); }
         }
@@ -4345,7 +4346,8 @@ impl Parser {
     // parse a string as an ABI spec on an extern type or module
     fn parse_opt_abis(&self) -> Option<AbiSet> {
         match *self.token {
-            token::LIT_STR(s) => {
+            token::LIT_STR(s)
+            | token::LIT_STR_RAW(s, _) => {
                 self.bump();
                 let the_string = ident_to_str(&s);
                 let mut abis = AbiSet::empty();
@@ -4932,7 +4934,8 @@ impl Parser {
 
     pub fn parse_optional_str(&self) -> Option<@str> {
         match *self.token {
-            token::LIT_STR(s) => {
+            token::LIT_STR(s)
+            | token::LIT_STR_RAW(s, _) => {
                 self.bump();
                 Some(ident_to_str(&s))
             }