Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/dylib.rs')
-rw-r--r--crates/proc-macro-srv/src/dylib.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/proc-macro-srv/src/dylib.rs b/crates/proc-macro-srv/src/dylib.rs
index 03433197b7..ba089c9549 100644
--- a/crates/proc-macro-srv/src/dylib.rs
+++ b/crates/proc-macro-srv/src/dylib.rs
@@ -54,6 +54,32 @@ impl Expander {
.expand(macro_name, macro_body, attribute, def_site, call_site, mixed_site)
}
+ pub(crate) fn expand_with_channels<S: ProcMacroSrvSpan>(
+ &self,
+ macro_name: &str,
+ macro_body: crate::token_stream::TokenStream<S>,
+ attribute: Option<crate::token_stream::TokenStream<S>>,
+ def_site: S,
+ call_site: S,
+ mixed_site: S,
+ cli_to_server: crossbeam_channel::Receiver<crate::SubResponse>,
+ server_to_cli: crossbeam_channel::Sender<crate::SubRequest>,
+ ) -> Result<crate::token_stream::TokenStream<S>, crate::PanicMessage>
+ where
+ <S::Server as proc_macro::bridge::server::Types>::TokenStream: Default,
+ {
+ self.inner.proc_macros.expand_with_channels(
+ macro_name,
+ macro_body,
+ attribute,
+ def_site,
+ call_site,
+ mixed_site,
+ cli_to_server,
+ server_to_cli,
+ )
+ }
+
pub(crate) fn list_macros(&self) -> impl Iterator<Item = (&str, ProcMacroKind)> {
self.inner.proc_macros.list_macros()
}