diff options
| author | Paul Stansifer <paul.stansifer@gmail.com> | 2012-11-26 22:34:01 -0500 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-11-29 12:09:11 -0800 |
| commit | 7051d622c0536718816152b14ff04a0072884d7e (patch) | |
| tree | 49938aac8f8067d5de9fead51cc4a291cfc84909 /src/libsyntax/parse | |
| parent | 9ff8d1876630e7e3d1b0eef6c0c51610a19c4b98 (diff) | |
| download | rust-7051d622c0536718816152b14ff04a0072884d7e.tar.gz rust-7051d622c0536718816152b14ff04a0072884d7e.zip | |
Properly sync macro_parser.rs after it escapes out to the Rust parser. Closes #3201.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 52e001f8d5c..96364790956 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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; |
