Skip to content

Commit

Permalink
html: report unknown captures with suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Feb 22, 2025
1 parent 7180d5d commit 84f994a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ macro_rules! formatter_captures {
(($context:ident, $node:ident, $entering:ident, $suppress_children:ident), suppress_children, $bind:ident) => {
let mut $bind = &mut $suppress_children;
};
(($context:ident, $node:ident, $entering:ident, $suppress_children:ident), $unknown:ident, $bind:ident) => {
compile_error!(concat!("unknown capture '", stringify!($unknown), "'; available are 'context', 'output', 'entering', 'node', 'suppress_children'"));
};
(($context:ident, $node:ident, $entering:ident, $suppress_children:ident), ($capture:ident)) => {
$crate::formatter_captures!(($context, $node, $entering, $suppress_children), $capture, $capture);
};
Expand Down

0 comments on commit 84f994a

Please sign in to comment.