Force program() to consume all input
This commit is contained in:
parent
219f5a183a
commit
bb26d9e674
@ -115,6 +115,7 @@ pub fn program(input: Span) -> ParseResult<AST> {
|
|||||||
//TODO `rest` should be empty
|
//TODO `rest` should be empty
|
||||||
let (rest, statements) = context(
|
let (rest, statements) = context(
|
||||||
"AST",
|
"AST",
|
||||||
|
terminated(
|
||||||
map(
|
map(
|
||||||
tuple((
|
tuple((
|
||||||
many0(statement_delimiter),
|
many0(statement_delimiter),
|
||||||
@ -122,7 +123,7 @@ pub fn program(input: Span) -> ParseResult<AST> {
|
|||||||
many0(statement_delimiter),
|
many0(statement_delimiter),
|
||||||
)),
|
)),
|
||||||
|(_, items, _)| items.into(),
|
|(_, items, _)| items.into(),
|
||||||
),
|
), tok(eof)),
|
||||||
)(input)?;
|
)(input)?;
|
||||||
|
|
||||||
let ast = AST { id, statements };
|
let ast = AST { id, statements };
|
||||||
|
Loading…
Reference in New Issue
Block a user