Skip to content

Commit

Permalink
Merge pull request #1124 from quebin31/master
Browse files Browse the repository at this point in the history
Fix positional macro on crate nu-macros
  • Loading branch information
Jonathan Turner committed Dec 26, 2019
2 parents e7ce6f2 + c69bf9f commit bfba2c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/nu-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
let $ident = $ident.optional(stringify!($name), SyntaxShape::$shape, $desc);
};
($ident:tt, $name:tt ($shape:tt)- $desc:tt) => {
let $ident = $ident.optional(stringify!($name), SyntaxShape::$shape, $desc);
let $ident = $ident.required(stringify!($name), SyntaxShape::$shape, $desc);
};
}

0 comments on commit bfba2c5

Please sign in to comment.