diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-12-30 14:04:00 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-01-02 14:16:07 -0800 |
| commit | f499d365ada01a23bd046bac9b1bef7ccdb9fa8c (patch) | |
| tree | f8f22773382ac7774384f8ec58417f16e04f9041 /src/libsyntax/ext/format.rs | |
| parent | 0df9b850ac1ed3abd0ff5abfbb716af83501dd5a (diff) | |
| download | rust-f499d365ada01a23bd046bac9b1bef7ccdb9fa8c.tar.gz rust-f499d365ada01a23bd046bac9b1bef7ccdb9fa8c.zip | |
libsyntax: Make the parser mutable
Diffstat (limited to 'src/libsyntax/ext/format.rs')
| -rw-r--r-- | src/libsyntax/ext/format.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 3bfab7da9b4..2d4bdd3da23 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -53,11 +53,11 @@ struct Context<'a> { impl<'a> Context<'a> { /// Parses the arguments from the given list of tokens, returning None if /// there's a parse error so we can continue parsing other format! expressions. - fn parse_args(&mut self, sp: Span, - tts: &[ast::token_tree]) -> (@ast::Expr, Option<@ast::Expr>) { - let p = rsparse::new_parser_from_tts(self.ecx.parse_sess(), - self.ecx.cfg(), - tts.to_owned()); + fn parse_args(&mut self, sp: Span, tts: &[ast::token_tree]) + -> (@ast::Expr, Option<@ast::Expr>) { + let mut p = rsparse::new_parser_from_tts(self.ecx.parse_sess(), + self.ecx.cfg(), + tts.to_owned()); // Parse the leading function expression (maybe a block, maybe a path) let extra = p.parse_expr(); if !p.eat(&token::COMMA) { |
