Add a not yet implemented function.

This helps when creating new parsers since todo!()s will panic the whole parser.
This commit is contained in:
Tom Alexander
2023-04-24 20:08:12 -04:00
parent ab7eb76e13
commit a5585eb01f
2 changed files with 10 additions and 5 deletions

View File

@@ -236,6 +236,13 @@ pub fn text_until_exit<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<
))(input)
}
#[allow(dead_code)]
pub fn not_yet_implemented() -> Res<&'static str, ()> {
return Err(nom::Err::Error(CustomError::MyError(MyError(
"Not implemented yet.",
))));
}
#[cfg(test)]
mod tests {
use super::*;