Properly sync macro_parser.rs after it escapes out to the Rust parser. Closes #3201.

This commit is contained in:
Paul Stansifer 2012-11-26 22:34:01 -05:00 committed by Graydon Hoare
parent 9ff8d18766
commit 7051d622c0
3 changed files with 13 additions and 9 deletions

View file

@ -191,6 +191,7 @@ fn Parser(sess: parse_sess, cfg: ast::crate_cfg,
buffer: [mut {tok: tok0.tok, sp: span0}, ..4],
buffer_start: 0,
buffer_end: 0,
tokens_consumed: 0u,
restriction: UNRESTRICTED,
quote_depth: 0u,
keywords: token::keyword_table(),
@ -209,6 +210,7 @@ struct Parser {
mut buffer: [mut {tok: token::Token, sp: span} * 4],
mut buffer_start: int,
mut buffer_end: int,
mut tokens_consumed: uint,
mut restriction: restriction,
mut quote_depth: uint, // not (yet) related to the quasiquoter
reader: reader,
@ -235,6 +237,7 @@ impl Parser {
};
self.token = next.tok;
self.span = next.sp;
self.tokens_consumed += 1u;
}
fn swap(next: token::Token, +lo: BytePos, +hi: BytePos) {
self.token = next;