Merge pull request #71 from kubouch/fix-module-error

Fix wrong error span
This commit is contained in:
JT 2021-09-27 10:28:21 +13:00 committed by GitHub
commit 5ccbf4df67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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