diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-13 12:08:55 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-13 12:08:55 +0000 |
commit | bfe67afa8a9238bd2a3bfdc9079917c81c8cfef3 (patch) | |
tree | 95def4507da8b4def421efa8b868e4d3dfe1ffb2 /apps/cassiopeia/src/format/parser.rs | |
parent | 56212d7154b5e59f663af64b4b437d6ca44d7a8a (diff) |
cassiopeia: changing parser output to more generic IR structure
This allows a few things: a, it's a persistant format that we can
mirror to disk again, AND can adapt because all type information is
known, and it allows for new entries to be added to the IR more
easily, without having to worry about exact formatting, or
re-inferring order from the TimeFile abstraction.
Diffstat (limited to 'apps/cassiopeia/src/format/parser.rs')
-rw-r--r-- | apps/cassiopeia/src/format/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/cassiopeia/src/format/parser.rs b/apps/cassiopeia/src/format/parser.rs index 430fee6332a7..d1f0bcdebc68 100644 --- a/apps/cassiopeia/src/format/parser.rs +++ b/apps/cassiopeia/src/format/parser.rs @@ -53,6 +53,9 @@ pub(crate) fn parse<'l>(lex: LineLexer<'l>) -> LineCfg { (Stop(_), LineToken { tt: T::Date, slice }) => Stop(parse_datetime(slice)), (Invoice(_), LineToken { tt: T::Date, slice }) => Invoice(parse_date(slice)), + // Pass empty lines through, + (Empty, _) => Empty, + // Ignore everything else (which will be filtered) _ => Ignore, }) |