Skip to content

Commit

Permalink
Report error for missing closing tag token (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
emi2k01 authored Sep 18, 2021
1 parent d8941fe commit 4b31795
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: unexpected end of input
--> $DIR/element-missing-body.rs:4:5
error: expected `;`, found end of macro
--> $DIR/non-closed-element.rs:4:5
|
4 | / html! {
5 | | p
Expand Down
3 changes: 2 additions & 1 deletion maud_macros/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ impl Parser {
semi_span: SpanRange::single_span(punct.span()),
}
}
_ => match self.markup() {
Some(_) => match self.markup() {
ast::Markup::Block(block) => ast::ElementBody::Block { block },
markup => {
let markup_span = markup.span();
Expand All @@ -553,6 +553,7 @@ impl Parser {
);
}
},
None => abort_call_site!("expected `;`, found end of macro"),
};
ast::Markup::Element { name, attrs, body }
}
Expand Down

0 comments on commit 4b31795

Please sign in to comment.