Force program() to consume all input
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user