| 1 | use crate::parser::core::rule_builder; |
| 2 | use crate::Node; |
| 3 | |
| 4 | /// Each member of inline rule chain must implement this trait |
| 5 | pub trait InlineRule : 'static { |
| 6 | const MARKER: char; |
| 7 | |
| 8 | fn check(state: &mut super::InlineState) -> Option<usize> { |
| 9 | Self::run(state).map(|(_node, len)| len) |
| 10 | } |
| 11 | |
| 12 | fn run(state: &mut super::InlineState) -> Option<(Node, usize)>; |
| 13 | } |
| 14 | |
| 15 | rule_builder!(InlineRule); |