From 3a31f0634bb1669eae64e83f595942986f867125 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Wed, 5 Jun 2019 22:04:52 +0300 Subject: Address review comments --- src/libsyntax/parse/parser.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 51bfe3527cf..43e7c9330e4 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -197,13 +197,17 @@ enum PrevTokenKind { #[derive(Clone)] pub struct Parser<'a> { pub sess: &'a ParseSess, - /// The current token. + /// The current normalized token. + /// "Normalized" means that some interpolated tokens + /// (`$i: ident` and `$l: lifetime` meta-variables) are replaced + /// with non-interpolated identifier and lifetime tokens they refer to. + /// Perhaps the normalized / non-normalized setup can be simplified somehow. pub token: Token, - /// The span of the previous token. + /// Span of the current non-normalized token. meta_var_span: Option, - /// The span of the previous token. + /// Span of the previous non-normalized token. pub prev_span: Span, - /// The previous token kind. + /// Kind of the previous normalized token (in simplified form). prev_token_kind: PrevTokenKind, restrictions: Restrictions, /// Used to determine the path to externally loaded source files. -- cgit 1.4.1-3-g733a5