adding test case to check marking/unmarking

This commit is contained in:
John Clements
2013-06-25 11:43:52 -07:00
parent b7c0512b27
commit 91d3c36430
3 changed files with 25 additions and 12 deletions

View File

@@ -126,7 +126,7 @@ fn fold_mac_(m: &mac, fld: @ast_fold) -> mac {
// build a new vector of tts by appling the given function to
// all of the identifiers in the token trees.
pub fn fold_tts(tts : &[token_tree], f: @fn(ident)->ident) -> ~[token_tree] {
pub fn fold_tts(tts : &[token_tree], f: @fn(Ident)->Ident) -> ~[token_tree] {
do tts.map |tt| {
match *tt {
tt_tok(span, ref tok) =>
@@ -145,7 +145,7 @@ pub fn fold_tts(tts : &[token_tree], f: @fn(ident)->ident) -> ~[token_tree] {
}
// apply ident folder if it's an ident, otherwise leave it alone
fn maybe_fold_ident(t : &token::Token, f: @fn(ident)->ident) -> token::Token {
fn maybe_fold_ident(t : &token::Token, f: @fn(Ident)->Ident) -> token::Token {
match *t {
token::IDENT(id,followed_by_colons) =>
token::IDENT(f(id),followed_by_colons),