mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Fix parser when def has missing params
This commit is contained in:
@ -1850,7 +1850,18 @@ pub fn parse_signature(
|
||||
|
||||
if bytes.starts_with(b"[") {
|
||||
start += 1;
|
||||
} else {
|
||||
error = error.or_else(|| {
|
||||
Some(ParseError::Expected(
|
||||
"[".into(),
|
||||
Span {
|
||||
start,
|
||||
end: start + 1,
|
||||
},
|
||||
))
|
||||
});
|
||||
}
|
||||
|
||||
if bytes.ends_with(b"]") {
|
||||
end -= 1;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user