From 54e2e4f8b754fe4a0df9057c53f46b3b9244303e Mon Sep 17 00:00:00 2001 From: Ryan Chandler Date: Fri, 9 Dec 2022 01:54:01 +0000 Subject: [PATCH] parser: handle close tag at top-level --- src/parser/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 50e43a3..f5efe2c 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -49,6 +49,11 @@ pub fn parse(tokens: Vec) -> ParseResult { break; } + if state.current.kind == TokenKind::CloseTag { + state.next(); + continue; + } + ast.push(top_level_statement(&mut state)?); state.clear_comments();