From 425a140485dc3ba70c4e30e10cd8d5fd92a458c5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 30 Dec 2013 14:40:31 -0800 Subject: libsyntax: De-`@mut` `quote_depth` in the parser --- src/libsyntax/parse/mod.rs | 2 +- src/libsyntax/parse/parser.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 1200c5db611..a1f770a5fde 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -175,7 +175,7 @@ pub fn parse_tts_from_source_str( name, source ); - *p.quote_depth += 1u; + p.quote_depth += 1u; // right now this is re-creating the token trees from ... token trees. maybe_aborted(p.parse_all_token_trees(),p) } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2a4658854c3..806da6988d8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -315,7 +315,7 @@ pub fn Parser(sess: @mut ParseSess, buffer_end: @mut 0, tokens_consumed: @mut 0, restriction: @mut UNRESTRICTED, - quote_depth: @mut 0, + quote_depth: 0, obsolete_set: @mut HashSet::new(), mod_path_stack: @mut ~[], open_braces: @mut ~[], @@ -340,7 +340,7 @@ pub struct Parser { buffer_end: @mut int, tokens_consumed: @mut uint, restriction: @mut restriction, - quote_depth: @mut uint, // not (yet) related to the quasiquoter + quote_depth: uint, // not (yet) related to the quasiquoter reader: @mut reader, interner: @token::ident_interner, /// The set of seen errors about obsolete syntax. Used to suppress @@ -2097,7 +2097,7 @@ impl Parser { token_str)) }, /* we ought to allow different depths of unquotation */ - token::DOLLAR if *p.quote_depth > 0u => { + token::DOLLAR if p.quote_depth > 0u => { p.bump(); let sp = *p.span; -- cgit 1.4.1-3-g733a5