mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
Merge pull request #71 from kubouch/fix-module-error
Fix wrong error span
This commit is contained in:
commit
5ccbf4df67
1 changed files with 4 additions and 1 deletions
|
@ -287,7 +287,10 @@ pub fn parse_module(
|
|||
}
|
||||
_ => (
|
||||
garbage_statement(&pipeline.commands[0].parts),
|
||||
Some(ParseError::Expected("def".into(), block_span)),
|
||||
Some(ParseError::Expected(
|
||||
"def".into(),
|
||||
pipeline.commands[0].parts[0],
|
||||
)),
|
||||
),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue