lexa_framework/macros_rules/
using.rs

1// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2// ┃ Copyright: (c) 2023, Mike 'PhiSyX' S. (https://github.com/PhiSyX)         ┃
3// ┃ SPDX-License-Identifier: MPL-2.0                                          ┃
4// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
5// ┃                                                                           ┃
6// ┃  This Source Code Form is subject to the terms of the Mozilla Public      ┃
7// ┃  License, v. 2.0. If a copy of the MPL was not distributed with this      ┃
8// ┃  file, You can obtain one at https://mozilla.org/MPL/2.0/.                ┃
9// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
10
11#[macro_export]
12macro_rules! using {
13	(
14		$(
15			$name:ident ,
16		)*
17	) => {
18		$(
19			mod $name ;
20		)*
21
22		$(
23			pub use self:: $name :: *;
24		)*
25	};
26
27	(
28		$(
29			$directory:ident /
30			{
31			$(
32				$name:ident
33			),*
34			};
35		)*
36	) => {
37		$(
38			pub mod $directory {
39				$(
40					mod $name ;
41				)*
42
43				$(
44					pub use self:: $name ::*;
45				)*
46			}
47
48			pub use self:: $directory ::*;
49		)*
50	}
51}