diff options
Diffstat (limited to 'src/libsyntax/ext/tt/macro_rules.rs')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index c179e9959e0..e196bdccfe3 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -18,7 +18,7 @@ use ext::base; use ext::tt::macro_parser::{Success, Error, Failure}; use ext::tt::macro_parser::{NamedMatch, MatchedSeq, MatchedNonterminal}; use ext::tt::macro_parser::{parse, parse_or_else}; -use parse::lexer::{new_tt_reader, Reader}; +use parse::lexer::new_tt_reader; use parse::parser::Parser; use parse::attr::ParserAttr; use parse::token::{get_ident_interner, special_idents, gensym_ident}; @@ -129,8 +129,8 @@ fn generic_extension(cx: &ExtCtxt, for (i, lhs) in lhses.iter().enumerate() { // try each arm's matchers match **lhs { MatchedNonterminal(NtMatchers(ref mtcs)) => { - // `none` is because we're not interpolating - let arg_rdr = new_tt_reader(s_d, None, arg.to_owned()) as @Reader; + // `None` is because we're not interpolating + let arg_rdr = new_tt_reader(s_d, None, arg.to_owned()); match parse(cx.parse_sess(), cx.cfg(), arg_rdr, *mtcs) { Success(named_matches) => { let rhs = match *rhses[i] { @@ -150,12 +150,12 @@ fn generic_extension(cx: &ExtCtxt, // rhs has holes ( `$id` and `$(...)` that need filled) let trncbr = new_tt_reader(s_d, Some(named_matches), rhs); - let p = Parser(cx.parse_sess(), cx.cfg(), trncbr as @Reader); + let p = Parser(cx.parse_sess(), cx.cfg(), ~trncbr); // Let the context choose how to interpret the result. // Weird, but useful for X-macros. - return MRAny(@ParserAnyMacro { + return MRAny(~ParserAnyMacro { parser: RefCell::new(p), - } as @AnyMacro) + }) } Failure(sp, ref msg) => if sp.lo >= best_fail_spot.lo { best_fail_spot = sp; @@ -210,7 +210,7 @@ pub fn add_new_extension(cx: &mut ExtCtxt, arg.clone()); let argument_map = parse_or_else(cx.parse_sess(), cx.cfg(), - arg_reader as @Reader, + arg_reader, argument_gram); // Extract the arguments: |
