Merge pull request #5 from jonas-schievink/who-needs-macros
Remove src/macros.rs
This commit is contained in:
commit
0d652a3c94
|
@ -1,30 +0,0 @@
|
|||
#[macro_export]
|
||||
macro_rules! lua_multi {
|
||||
[] => { $crate::LNil };
|
||||
[$head: expr] => { $crate::LCons($head, $crate::LNil) };
|
||||
[$head: expr, $($tail: expr), *] => { $crate::LCons($head, lua_multi![$($tail), *]) };
|
||||
[$head: expr, $($tail: expr), *,] => { $crate::LCons($head, lua_multi![$($tail), *]) };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! lua_multi_pat {
|
||||
[] => { $crate::LNil{} };
|
||||
[$head: pat] => { $crate::LCons($head, $crate::LNil{}) };
|
||||
[$head: pat, $($tail: pat), *] => { $crate::LCons($head, lua_multi_pat![$($tail), *]) };
|
||||
[$head: pat, $($tail: pat), *,] => { $crate::LCons($head, lua_multi_pat![$($tail), *]) };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! LuaMulti {
|
||||
[] => { $crate::LNil };
|
||||
[$head: ty] => { $crate::LCons<$head, $crate::LNil> };
|
||||
[$head: ty, $($tail: ty), *] => { $crate::LCons<$head, LuaMulti![$($tail), *]> };
|
||||
[$head: ty, $($tail: ty), *,] => { $crate::LCons<$head, LuaMulti![$($tail), *]> };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! lua_cstr {
|
||||
($s:expr) => (
|
||||
concat!($s, "\0") as *const str as *const [c_char] as *const c_char
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue