This commit is contained in:
Michael Zhang 2021-02-22 22:42:13 -06:00
parent 4ed45e52f0
commit 621ab2770a
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 19 additions and 1 deletions

View file

@ -2,3 +2,6 @@
Panorama is a personal information manager. Panorama is a personal information manager.
[Click here for API docs][1]
[1]: https://iptq.github.io/panorama/api/panorama/

View file

@ -207,6 +207,20 @@ fn build_mailbox_data(pair: Pair<Rule>) -> MailboxData {
} }
fn build_mailbox_list(pair: Pair<Rule>) -> (Vec<String>, Option<String>, String) { fn build_mailbox_list(pair: Pair<Rule>) -> (Vec<String>, Option<String>, String) {
if !matches!(pair.as_rule(), Rule::mailbox_list) {
unreachable!("{:#?}", pair);
}
let mut pairs = pair.into_inner();
let mut pair = pairs.next().unwrap();
// let mut flags = Vec::new();
if let Rule::mailbox_list_flags = pair.as_rule() {
let pairs = pair.into_inner();
for pair in pairs {
}
}
// debug!("pair: {:#?}", pair);
todo!() todo!()
} }

View file

@ -69,7 +69,8 @@ mailbox_data_exists = { number ~ sp ~ ^"EXISTS" }
mailbox_data_flags = { ^"FLAGS" ~ sp ~ flag_list } mailbox_data_flags = { ^"FLAGS" ~ sp ~ flag_list }
mailbox_data_recent = { number ~ sp ~ ^"RECENT" } mailbox_data_recent = { number ~ sp ~ ^"RECENT" }
mailbox_data_list = { ^"LIST" ~ sp ~ mailbox_list } mailbox_data_list = { ^"LIST" ~ sp ~ mailbox_list }
mailbox_list = { "(" ~ mbx_list_flags* ~ ")" ~ sp ~ mailbox_list_string ~ sp ~ mailbox } mailbox_list = { mailbox_list_flags ~ sp ~ mailbox_list_string ~ sp ~ mailbox }
mailbox_list_flags = { "(" ~ mbx_list_flags* ~ ")" }
mailbox_list_string = { dquote ~ quoted_char ~ dquote | nil } mailbox_list_string = { dquote ~ quoted_char ~ dquote | nil }
mbx_list_flags = { (mbx_list_oflag ~ sp)* ~ mbx_list_sflag ~ (sp ~ mbx_list_oflag)* | mbx_list_oflag ~ (sp ~ mbx_list_oflag)* } mbx_list_flags = { (mbx_list_oflag ~ sp)* ~ mbx_list_sflag ~ (sp ~ mbx_list_oflag)* | mbx_list_oflag ~ (sp ~ mbx_list_oflag)* }
mbx_list_oflag = { "\\NoInferiors" | flag_extension } mbx_list_oflag = { "\\NoInferiors" | flag_extension }