De-@ TokenTree.

This commit is contained in:
Eduard Burtescu 2014-03-27 16:40:35 +02:00
parent 7cf4d8bc44
commit 8f226e5694
7 changed files with 26 additions and 17 deletions

View file

@ -80,6 +80,7 @@ use owned_slice::OwnedSlice;
use collections::HashSet;
use std::kinds::marker;
use std::mem::replace;
use std::rc::Rc;
use std::vec;
#[allow(non_camel_case_types)]
@ -2101,7 +2102,7 @@ impl<'a> Parser<'a> {
let seq = match seq {
Spanned { node, .. } => node,
};
TTSeq(mk_sp(sp.lo, p.span.hi), @seq, s, z)
TTSeq(mk_sp(sp.lo, p.span.hi), Rc::new(seq), s, z)
} else {
TTNonterminal(sp, p.parse_ident())
}
@ -2144,7 +2145,7 @@ impl<'a> Parser<'a> {
result.push(parse_any_tt_tok(self));
self.open_braces.pop().unwrap();
TTDelim(@result)
TTDelim(Rc::new(result))
}
_ => parse_non_delim_tt_tok(self)
}