feat(parser): clock parsing
This commit is contained in:
parent
cd7e03accb
commit
69534576f1
4 changed files with 11 additions and 11 deletions
|
|
@ -86,7 +86,7 @@ pub enum Event<'a> {
|
|||
value: &'a str,
|
||||
},
|
||||
|
||||
Clock,
|
||||
Clock(Clock<'a>),
|
||||
|
||||
Comment(&'a str),
|
||||
FixedWidth(&'a str),
|
||||
|
|
@ -335,6 +335,12 @@ impl<'a> Parser<'a> {
|
|||
return Some((Event::ListBeg { ordered }, 0, line_begin, text.len()));
|
||||
}
|
||||
|
||||
if tail.starts_with("CLOCK:") {
|
||||
if let Some((clock, off)) = Clock::parse(tail) {
|
||||
return Some((Event::Clock(clock), off + line_begin, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: LaTeX environment
|
||||
if tail.starts_with("\\begin{") {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue