Rename TokenTree variants for clarity
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
This commit is contained in:
@@ -1020,14 +1020,14 @@ impl<'a> State<'a> {
|
||||
/// expression arguments as expressions). It can be done! I think.
|
||||
pub fn print_tt(&mut self, tt: &ast::TokenTree) -> IoResult<()> {
|
||||
match *tt {
|
||||
ast::TTDelim(_, ref open, ref tts, ref close) => {
|
||||
ast::TTDelimited(_, ref open, ref tts, ref close) => {
|
||||
try!(word(&mut self.s, parse::token::to_string(&open.token).as_slice()));
|
||||
try!(space(&mut self.s));
|
||||
try!(self.print_tts(tts.as_slice()));
|
||||
try!(space(&mut self.s));
|
||||
word(&mut self.s, parse::token::to_string(&close.token).as_slice())
|
||||
},
|
||||
ast::TTTok(_, ref tk) => {
|
||||
ast::TTToken(_, ref tk) => {
|
||||
try!(word(&mut self.s, parse::token::to_string(tk).as_slice()));
|
||||
match *tk {
|
||||
parse::token::DOC_COMMENT(..) => {
|
||||
@@ -1036,7 +1036,7 @@ impl<'a> State<'a> {
|
||||
_ => Ok(())
|
||||
}
|
||||
}
|
||||
ast::TTSeq(_, ref tts, ref sep, zerok) => {
|
||||
ast::TTSequence(_, ref tts, ref sep, zerok) => {
|
||||
try!(word(&mut self.s, "$("));
|
||||
for tt_elt in (*tts).iter() {
|
||||
try!(self.print_tt(tt_elt));
|
||||
|
||||
Reference in New Issue
Block a user