Use location
This commit is contained in:
parent
77030091bb
commit
222e0aad08
@ -91,10 +91,11 @@ fn block(input: Span) -> ParseResult<Block> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn statement(input: Span) -> ParseResult<Statement> {
|
fn statement(input: Span) -> ParseResult<Statement> {
|
||||||
|
let pos: usize = position(input)?.1.location_offset();
|
||||||
context("Parsing-statement",
|
context("Parsing-statement",
|
||||||
map(expression, |expr| Statement {
|
map(expression, move |expr| Statement {
|
||||||
id: Default::default(),
|
id: Default::default(),
|
||||||
location: Default::default(),
|
location: pos.into(),
|
||||||
kind: StatementKind::Expression(expr),
|
kind: StatementKind::Expression(expr),
|
||||||
}))(input)
|
}))(input)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user