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
|
||||
let (rest, statements) = context(
|
||||
"AST",
|
||||
terminated(
|
||||
map(
|
||||
tuple((
|
||||
many0(statement_delimiter),
|
||||
@ -122,7 +123,7 @@ pub fn program(input: Span) -> ParseResult<AST> {
|
||||
many0(statement_delimiter),
|
||||
)),
|
||||
|(_, items, _)| items.into(),
|
||||
),
|
||||
), tok(eof)),
|
||||
)(input)?;
|
||||
|
||||
let ast = AST { id, statements };
|
||||
|
Loading…
Reference in New Issue
Block a user