about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-21 08:31:32 +0000
committerbors <bors@rust-lang.org>2018-07-21 08:31:32 +0000
commitbd455ef165f110143b97106b4e7cd8c83cd21f03 (patch)
treed9aef588ff6493330f28505c3357f6ba3abd1d02 /src/libsyntax
parent17eb392cefdcf4b98c47f9ab36742e66a314932f (diff)
parent99eac011c6059de129de4b1c8ab7c6cd6794e6e4 (diff)
downloadrust-bd455ef165f110143b97106b4e7cd8c83cd21f03.tar.gz
rust-bd455ef165f110143b97106b4e7cd8c83cd21f03.zip
Auto merge of #52552 - eddyb:proc-macro-prep, r=alexcrichton
Prepare proc_macro for decoupling it from the rest of the compiler.

This is #49219 up to the point where the bridge is introduced. Aside from moving some code around, the largest change is the rewrite of `proc_macro::quote` to be simpler and do less introspection.

I'd like to also extend `quote!` with `${stmt;...;expr}` instead of just `$variable` (and maybe even `$(... $iter ...)*`), which seems pretty straight-forward now, but I don't know if/when I should.

r? @alexcrichton or @dtolnay cc @jseyfried @petrochenkov
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index bf790e6143a..9748e2947ee 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -1775,12 +1775,6 @@ fn ident_continue(c: Option<char>) -> bool {
     (c > '\x7f' && c.is_xid_continue())
 }
 
-// The string is a valid identifier or a lifetime identifier.
-pub fn is_valid_ident(s: &str) -> bool {
-    let mut chars = s.chars();
-    ident_start(chars.next()) && chars.all(|ch| ident_continue(Some(ch)))
-}
-
 #[cfg(test)]
 mod tests {
     use super::*;