diff options
| author | bors <bors@rust-lang.org> | 2013-08-11 14:17:09 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-11 14:17:09 -0700 |
| commit | b285f1e6c90332188bb720bf320c507fc4156fdc (patch) | |
| tree | b1b5657b028f7a1c5253ae3bc8d87b806e464a6e /src/libsyntax/ext/tt | |
| parent | 63c62bea3ac2782ae421d5bd211f2e7393bad7a2 (diff) | |
| parent | 7343478d67ba3eb0c62dcc37db65d82d12b8e140 (diff) | |
| download | rust-b285f1e6c90332188bb720bf320c507fc4156fdc.tar.gz rust-b285f1e6c90332188bb720bf320c507fc4156fdc.zip | |
auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydon
Fix #5762 and various other aspects of object invocation. r? @graydon
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 29963a7b461..c208a7f7e3e 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -224,7 +224,7 @@ pub enum parse_result { pub fn parse_or_else( sess: @mut ParseSess, cfg: ast::CrateConfig, - rdr: @reader, + rdr: @mut reader, ms: ~[matcher] ) -> HashMap<ident, @named_match> { match parse(sess, cfg, rdr, ms) { @@ -237,7 +237,7 @@ pub fn parse_or_else( pub fn parse( sess: @mut ParseSess, cfg: ast::CrateConfig, - rdr: @reader, + rdr: @mut reader, ms: &[matcher] ) -> parse_result { let mut cur_eis = ~[]; diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 10735dad32f..54ac1f1e48f 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -59,7 +59,7 @@ pub fn add_new_extension(cx: @ExtCtxt, arg.clone()); let argument_map = parse_or_else(cx.parse_sess(), cx.cfg(), - arg_reader as @reader, + arg_reader as @mut reader, argument_gram); // Extract the arguments: @@ -101,7 +101,7 @@ pub fn add_new_extension(cx: @ExtCtxt, s_d, None, arg.to_owned() - ) as @reader; + ) as @mut reader; match parse(cx.parse_sess(), cx.cfg(), arg_rdr, *mtcs) { success(named_matches) => { let rhs = match rhses[i] { @@ -123,7 +123,7 @@ pub fn add_new_extension(cx: @ExtCtxt, rhs); let p = @Parser(cx.parse_sess(), cx.cfg(), - trncbr as @reader); + trncbr as @mut reader); // Let the context choose how to interpret the result. // Weird, but useful for X-macros. diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 9d3e916b500..13bad252243 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -30,7 +30,7 @@ struct TtFrame { } pub struct TtReader { - sp_diag: @span_handler, + sp_diag: @mut span_handler, // the unzipped tree: stack: @mut TtFrame, /* for MBE-style macro transcription */ @@ -45,7 +45,7 @@ pub struct TtReader { /** This can do Macro-By-Example transcription. On the other hand, if * `src` contains no `tt_seq`s and `tt_nonterminal`s, `interp` can (and * should) be none. */ -pub fn new_tt_reader(sp_diag: @span_handler, +pub fn new_tt_reader(sp_diag: @mut span_handler, interp: Option<HashMap<ident,@named_match>>, src: ~[ast::token_tree]) -> @mut TtReader { |
