Parse range for --range

This commit is contained in:
Joscha 2021-12-18 22:21:17 +01:00
parent d67bf0aeea
commit 279bf4a4d1
4 changed files with 103 additions and 3 deletions

View file

@ -142,3 +142,8 @@ empty_line = _{ WHITESPACE* ~ NEWLINE }
command = { include | timezone | task | note }
file = ${ SOI ~ (empty_line* ~ command)* ~ empty_line* ~ WHITESPACE* ~ EOI }
today = { "today" }
range_start = { (datum | today) ~ delta? }
range_end = { (datum | today) ~ delta? | delta }
range = { range_start ~ ("--" ~ range_end)? }