Define a RematchObject trait for matching radio links based on radio targets.
This commit is contained in:
parent
5108dfb8f4
commit
397083c658
@ -6,6 +6,7 @@ use nom::combinator::verify;
|
||||
use nom::multi::many_till;
|
||||
|
||||
use super::Context;
|
||||
use super::Object;
|
||||
use crate::error::Res;
|
||||
use crate::parser::exiting::ExitClass;
|
||||
use crate::parser::object_parser::minimal_set_object;
|
||||
@ -54,3 +55,11 @@ pub fn radio_target<'r, 's>(
|
||||
fn radio_target_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||
alt((tag("<"), tag(">"), line_ending))(input)
|
||||
}
|
||||
|
||||
pub trait RematchObject {
|
||||
fn rematch_object<'r, 's>(
|
||||
&self,
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, Object<'s>>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user