Opening of diary sexp.
This commit is contained in:
parent
fa88a7d600
commit
9d5b078c64
@ -1,8 +1,19 @@
|
||||
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>> {
|
||||
todo!()
|
||||
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 }))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user