Fix wrong error span

This commit is contained in:
Jakub Žádník 2021-09-26 23:58:30 +03:00
parent 756269ee8d
commit 9ee4dc49ee

View File

@ -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],
)),
),
};