mirror of
https://github.com/danog/parser.git
synced 2024-11-26 20:04:57 +01:00
parser: handle close tag at top-level
This commit is contained in:
parent
e12abf8873
commit
54e2e4f8b7
@ -49,6 +49,11 @@ pub fn parse(tokens: Vec<Token>) -> ParseResult<Program> {
|
||||
break;
|
||||
}
|
||||
|
||||
if state.current.kind == TokenKind::CloseTag {
|
||||
state.next();
|
||||
continue;
|
||||
}
|
||||
|
||||
ast.push(top_level_statement(&mut state)?);
|
||||
|
||||
state.clear_comments();
|
||||
|
Loading…
Reference in New Issue
Block a user