parser: handle close tag at top-level

This commit is contained in:
Ryan Chandler 2022-12-09 01:54:01 +00:00
parent e12abf8873
commit 54e2e4f8b7
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA

View File

@ -49,6 +49,11 @@ pub fn parse(tokens: Vec<Token>) -> ParseResult<Program> {
break; break;
} }
if state.current.kind == TokenKind::CloseTag {
state.next();
continue;
}
ast.push(top_level_statement(&mut state)?); ast.push(top_level_statement(&mut state)?);
state.clear_comments(); state.clear_comments();