blob: cbc47301862bfb00d5a02a21773dbe00cdb192de (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
//! CH Utilities - Macro Rules
//!
//! Provides convenient macros for developing the game CH
#![deny(missing_docs)]
/// Import modules and re-export all of their public items.
///
/// This macro declares modules with `mod $module;` and then re-exports
/// everything from them with `pub use $module::*;`, making the items of the
/// modules available as if they were defined in the current scope.
///
/// Supports both single and multiple module imports:
///
/// # Examples
///
/// ```
/// import!(my_module);
/// import!(foo, bar, zsq);
/// ```
#[macro_export]
macro_rules! import {
($($module:ident),+ $(,)?) => {
$(
mod $module;
pub use $module::*;
)+
};
}
|