lol_html/parser/state_machine/syntax_dsl/
state.rs1macro_rules! state {
2 (
3 $name:ident $(<-- ( $($enter_actions:tt)* ))* {
4 $($arms:tt)*
5 }
6
7 $($rest:tt)*
8 ) => {
9 #[allow(unused_variables)]
10 fn $name(&mut self, context: &mut Self::Context, input: &[u8]) -> StateResult {
11 #[allow(clippy::never_loop)]
13 loop {
14 let ch = self.consume_ch(input);
15
16 state_body!(|[self, context, input, ch]|> [$($arms)*], [$($($enter_actions)*)*]);
17 }
18 }
19
20 state!($($rest)*);
21 };
22
23 () => ();
25}