Skip to content

Commit

Permalink
syntax: Allow pretty printing more interpolated items
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed May 15, 2015
1 parent 7ebaf1c commit eef6b4a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/libsyntax/print/pprust.rs
Expand Up @@ -287,19 +287,19 @@ pub fn token_to_string(tok: &Token) -> String {
token::SpecialVarNt(var) => format!("${}", var.as_str()),

token::Interpolated(ref nt) => match *nt {
token::NtExpr(ref e) => expr_to_string(&**e),
token::NtMeta(ref e) => meta_item_to_string(&**e),
token::NtTy(ref e) => ty_to_string(&**e),
token::NtPath(ref e) => path_to_string(&**e),
token::NtItem(..) => "an interpolated item".to_string(),
token::NtBlock(..) => "an interpolated block".to_string(),
token::NtStmt(..) => "an interpolated statement".to_string(),
token::NtPat(..) => "an interpolated pattern".to_string(),
token::NtIdent(..) => "an interpolated identifier".to_string(),
token::NtTT(..) => "an interpolated tt".to_string(),
token::NtArm(..) => "an interpolated arm".to_string(),
token::NtImplItem(..) => "an interpolated impl item".to_string(),
token::NtTraitItem(..) => "an interpolated trait item".to_string(),
token::NtExpr(ref e) => expr_to_string(&**e),
token::NtMeta(ref e) => meta_item_to_string(&**e),
token::NtTy(ref e) => ty_to_string(&**e),
token::NtPath(ref e) => path_to_string(&**e),
token::NtItem(ref e) => item_to_string(&**e),
token::NtBlock(ref e) => block_to_string(&**e),
token::NtStmt(ref e) => stmt_to_string(&**e),
token::NtPat(ref e) => pat_to_string(&**e),
token::NtIdent(ref e) => ident_to_string(&**e),
token::NtTT(ref e) => tt_to_string(&**e),
token::NtArm(ref e) => arm_to_string(&**e),
token::NtImplItem(ref e) => impl_item_to_string(&**e),
token::NtTraitItem(ref e) => trait_item_to_string(&**e),
}
}
}
Expand Down

0 comments on commit eef6b4a

Please sign in to comment.