diff --git a/schala-lang/src/parsing/combinator.rs b/schala-lang/src/parsing/combinator.rs index 3db803d..18bea8d 100644 --- a/schala-lang/src/parsing/combinator.rs +++ b/schala-lang/src/parsing/combinator.rs @@ -115,6 +115,7 @@ pub fn program(input: Span) -> ParseResult { //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 { many0(statement_delimiter), )), |(_, items, _)| items.into(), - ), + ), tok(eof)), )(input)?; let ast = AST { id, statements };