mirror of
https://github.com/nushell/nushell.git
synced 2024-11-15 04:54:46 +01:00
Merge pull request #1124 from quebin31/master
Fix positional macro on crate nu-macros
This commit is contained in:
commit
bfba2c57f8
@ -17,9 +17,9 @@ macro_rules! signature {
|
||||
#[macro_export]
|
||||
macro_rules! positional {
|
||||
($ident:tt, $name:tt (optional $shape:tt) - $desc:tt) => {
|
||||
let $ident = $ident.required(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
($ident:tt, $name:tt ($shape:tt)- $desc:tt) => {
|
||||
let $ident = $ident.optional(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
($ident:tt, $name:tt ($shape:tt)- $desc:tt) => {
|
||||
let $ident = $ident.required(stringify!($name), SyntaxShape::$shape, $desc);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user