feat(parser): clock parsing

This commit is contained in:
PoiScript 2019-04-23 18:52:52 +08:00
parent cd7e03accb
commit 69534576f1
4 changed files with 11 additions and 11 deletions

View file

@ -1,11 +1,6 @@
#![allow(unused_variables)]
use crate::{
elements::{Key, Planning},
headline::Headline,
objects::{Cookie, Timestamp},
parser::Parser,
};
use crate::{elements::*, headline::Headline, objects::*, Parser};
use jetscii::bytes;
use std::{
convert::From,
@ -130,7 +125,7 @@ pub trait HtmlHandler<W: Write, E: From<Error>> {
fn call(&mut self, w: &mut W, value: &str) -> Result<(), E> {
Ok(())
}
fn clock(&mut self, w: &mut W) -> Result<(), E> {
fn clock(&mut self, w: &mut W, clock: Clock<'_>) -> Result<(), E> {
Ok(())
}
fn comment(&mut self, w: &mut W, cont: &str) -> Result<(), E> {

View file

@ -31,7 +31,7 @@ macro_rules! handle_event {
ListItemEnd => $handler.list_end_item($writer)?,
Call { value } => $handler.call($writer, value)?,
Planning(p) => $handler.planning($writer, p)?,
Clock => $handler.clock($writer)?,
Clock(c) => $handler.clock($writer, c)?,
Timestamp(t) => $handler.timestamp($writer, t)?,
Comment(c) => $handler.comment($writer, c)?,
FixedWidth(f) => $handler.fixed_width($writer, f)?,