From 550d7fbe3cbf2af4a47fca6c9bbefaf798cd7b7b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:46:20 +0200 Subject: Rename ra_tt -> tt --- crates/ra_proc_macro_srv/src/dylib.rs | 6 +++--- crates/ra_proc_macro_srv/src/lib.rs | 2 +- crates/ra_proc_macro_srv/src/rustc_server.rs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/ra_proc_macro_srv/src') diff --git a/crates/ra_proc_macro_srv/src/dylib.rs b/crates/ra_proc_macro_srv/src/dylib.rs index 1addbbd54..9b6cc91ef 100644 --- a/crates/ra_proc_macro_srv/src/dylib.rs +++ b/crates/ra_proc_macro_srv/src/dylib.rs @@ -128,9 +128,9 @@ impl Expander { pub fn expand( &self, macro_name: &str, - macro_body: &ra_tt::Subtree, - attributes: Option<&ra_tt::Subtree>, - ) -> Result { + macro_body: &tt::Subtree, + attributes: Option<&tt::Subtree>, + ) -> Result { let parsed_body = TokenStream::with_subtree(macro_body.clone()); let parsed_attributes = attributes diff --git a/crates/ra_proc_macro_srv/src/lib.rs b/crates/ra_proc_macro_srv/src/lib.rs index 922bb84bb..1fc2eef82 100644 --- a/crates/ra_proc_macro_srv/src/lib.rs +++ b/crates/ra_proc_macro_srv/src/lib.rs @@ -5,7 +5,7 @@ //! //! But we adapt it to better fit RA needs: //! -//! * We use `ra_tt` for proc-macro `TokenStream` server, it is easier to manipulate and interact with +//! * We use `tt` for proc-macro `TokenStream` server, it is easier to manipulate and interact with //! RA than `proc-macro2` token stream. //! * By **copying** the whole rustc `lib_proc_macro` code, we are able to build this with `stable` //! rustc rather than `unstable`. (Although in gerenal ABI compatibility is still an issue) diff --git a/crates/ra_proc_macro_srv/src/rustc_server.rs b/crates/ra_proc_macro_srv/src/rustc_server.rs index cc32d5a6d..d534d1337 100644 --- a/crates/ra_proc_macro_srv/src/rustc_server.rs +++ b/crates/ra_proc_macro_srv/src/rustc_server.rs @@ -1,15 +1,14 @@ -//! Rustc proc-macro server implementation with ra_tt +//! Rustc proc-macro server implementation with tt //! //! Based on idea from https://github.com/fedochet/rust-proc-macro-expander //! The lib-proc-macro server backend is `TokenStream`-agnostic, such that //! we could provide any TokenStream implementation. //! The original idea from fedochet is using proc-macro2 as backend, -//! we use ra_tt instead for better intergation with RA. +//! we use tt instead for better intergation with RA. //! //! FIXME: No span and source file information is implemented yet use crate::proc_macro::bridge::{self, server}; -use ra_tt as tt; use std::collections::{Bound, HashMap}; use std::hash::Hash; @@ -153,9 +152,10 @@ pub struct TokenStreamBuilder { /// Public implementation details for the `TokenStream` type, such as iterators. pub mod token_stream { - use super::{tt, TokenStream, TokenTree}; use std::str::FromStr; + use super::{TokenStream, TokenTree}; + /// An iterator over `TokenStream`'s `TokenTree`s. /// The iteration is "shallow", e.g., the iterator doesn't recurse into delimited groups, /// and returns whole groups as token trees. -- cgit v1.2.3