about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorLymia Aluysia <lymia@lymiahugs.com>2018-03-18 11:21:38 -0500
committerLymia Aluysia <lymia@lymiahugs.com>2018-03-18 11:21:38 -0500
commitd2e7953d1325b1a1fe1cef526dbe8d23fa3e00a1 (patch)
tree08deec42d6be062a0818322402dab039e985ac4e /src/libsyntax/parse/lexer
parent7d5c29b9eae5857c040bf6f1b2d729596c8af3ae (diff)
downloadrust-d2e7953d1325b1a1fe1cef526dbe8d23fa3e00a1.tar.gz
rust-d2e7953d1325b1a1fe1cef526dbe8d23fa3e00a1.zip
Move raw_identifiers check to the lexer.
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 8e746ea69e7..068929c8948 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -1155,6 +1155,10 @@ impl<'a> StringReader<'a> {
                             &format!("`r#{}` is not currently supported.", ident.name)
                         ).raise();
                     }
+                    if is_raw_ident {
+                        let span = self.mk_sp(raw_start, self.pos);
+                        self.sess.raw_identifier_spans.borrow_mut().push(span);
+                    }
                     token::Ident(ident, is_raw_ident)
                 }));
             }