use nom::bytes::complete::tag; use nom::character::complete::space0; use super::Context; use crate::error::Res; use crate::parser::util::get_consumed; use crate::parser::util::start_of_line; use crate::parser::DiarySexp; #[tracing::instrument(ret, level = "debug")] pub fn diary_sexp<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, DiarySexp<'s>> { start_of_line(context, input)?; let (remaining, _leading_whitespace) = space0(input)?; let (remaining, _clock) = tag("%%")(remaining)?; let (remaining, _gap_whitespace) = space0(remaining)?; let source = get_consumed(input, remaining); Ok((remaining, DiarySexp { source })) }