diff options
| author | bors <bors@rust-lang.org> | 2013-08-10 16:32:18 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-10 16:32:18 -0700 |
| commit | bf809768ee8ff3ea4ef434721ff82b09a4df261a (patch) | |
| tree | f7492e25ff06c4eeb3d1e480f641344b306c4247 /src/libsyntax/parse/token.rs | |
| parent | 8b9e1ce75a3e1416f2db80d30f65879fd902183f (diff) | |
| parent | 20953bb1fbfafc3839e739f38ddf7d495eb1fe8b (diff) | |
| download | rust-bf809768ee8ff3ea4ef434721ff82b09a4df261a.tar.gz rust-bf809768ee8ff3ea4ef434721ff82b09a4df261a.zip | |
auto merge of #8444 : erickt/rust/rollup, r=cmr
This merges these PR together: #8430: r=thestinger #8370: r=thestinger #8386: r=bstrie #8388: r=thestinger #8390: r=graydon #8394: r=graydon #8402: r=thestinger #8403: r=catamorphism
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index fd491c1e890..c554f111bf9 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -105,6 +105,7 @@ pub enum nonterminal { nt_expr(@ast::expr), nt_ty( ast::Ty), nt_ident(ast::ident, bool), + nt_attr(@ast::Attribute), // #[foo] nt_path( ast::Path), nt_tt( @ast::token_tree), //needs @ed to break a circularity nt_matchers(~[ast::matcher]) @@ -205,6 +206,7 @@ pub fn to_str(input: @ident_interner, t: &Token) -> ~str { INTERPOLATED(ref nt) => { match nt { &nt_expr(e) => ::print::pprust::expr_to_str(e, input), + &nt_attr(e) => ::print::pprust::attribute_to_str(e, input), _ => { ~"an interpolated " + match (*nt) { @@ -212,6 +214,7 @@ pub fn to_str(input: @ident_interner, t: &Token) -> ~str { nt_block(*) => ~"block", nt_stmt(*) => ~"statement", nt_pat(*) => ~"pattern", + nt_attr(*) => fail!("should have been handled"), nt_expr(*) => fail!("should have been handled above"), nt_ty(*) => ~"type", nt_ident(*) => ~"identifier", |
