From 27bf62b70eeb6f4cb620be5630c4c4506be3539f Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 24 May 2021 18:43:42 +0200 Subject: Move `TokenMap` to its own file --- crates/mbe/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/mbe/src/lib.rs') diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index 3af5bc18b..b7aa64713 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs @@ -14,6 +14,7 @@ mod tests; #[cfg(test)] mod benchmark; +mod token_map; use std::fmt; @@ -65,8 +66,9 @@ impl fmt::Display for ExpandError { pub use crate::syntax_bridge::{ ast_to_token_tree, parse_exprs_with_sep, parse_to_token_tree, syntax_node_to_token_tree, - token_tree_to_syntax_node, TokenMap, + token_tree_to_syntax_node, }; +pub use crate::token_map::TokenMap; /// This struct contains AST for a single `macro_rules` definition. What might /// be very confusing is that AST has almost exactly the same shape as -- cgit v1.2.3 From c8f40b1503cb461b935f5fb0a44fa8e26976c363 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 24 May 2021 21:47:01 +0200 Subject: Fixup --- crates/mbe/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crates/mbe/src/lib.rs') diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index b7aa64713..b95374b76 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs @@ -64,11 +64,13 @@ impl fmt::Display for ExpandError { } } -pub use crate::syntax_bridge::{ - ast_to_token_tree, parse_exprs_with_sep, parse_to_token_tree, syntax_node_to_token_tree, - token_tree_to_syntax_node, +pub use crate::{ + syntax_bridge::{ + ast_to_token_tree, parse_exprs_with_sep, parse_to_token_tree, syntax_node_to_token_tree, + token_tree_to_syntax_node, + }, + token_map::TokenMap, }; -pub use crate::token_map::TokenMap; /// This struct contains AST for a single `macro_rules` definition. What might /// be very confusing is that AST has almost exactly the same shape as -- cgit v1.2.3