Skip to content

Commit

Permalink
move proc macros to internal module
Browse files Browse the repository at this point in the history
  • Loading branch information
basro committed Jan 11, 2024
1 parent 8eb7176 commit b905a32
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stylance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
#![cfg_attr(docsrs, feature(doc_cfg))]

#[doc(hidden)]
pub use stylance_macros::*;
pub mod internal {
pub use stylance_macros::*;
}

/// Reads a css file at compile time and generates a module containing the classnames found inside that css file.
/// Path is relative to the file that called the macro.
Expand Down Expand Up @@ -97,12 +99,12 @@ pub use stylance_macros::*;
macro_rules! import_style {
($ident:ident, $str:expr) => {
mod $ident {
::stylance::import_style_classes_rel!($str);
::stylance::internal::import_style_classes_rel!($str);
}
};
(pub $ident:ident, $str:expr) => {
pub mod $ident {
::stylance::import_style_classes_rel!($str);
::stylance::internal::import_style_classes_rel!($str);
}
};
}
Expand Down Expand Up @@ -139,12 +141,12 @@ macro_rules! import_style {
macro_rules! import_crate_style {
($ident:ident, $str:expr) => {
mod $ident {
::stylance::import_style_classes!($str);
::stylance::internal::import_style_classes!($str);
}
};
(pub $ident:ident, $str:expr) => {
pub mod $ident {
::stylance::import_style_classes!($str);
::stylance::internal::import_style_classes!($str);
}
};
}

0 comments on commit b905a32

Please sign in to comment.