diff options
Diffstat (limited to 'src/operator-append.cc')
-rw-r--r-- | src/operator-append.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/operator-append.cc b/src/operator-append.cc index 0e856ba..fdebad6 100644 --- a/src/operator-append.cc +++ b/src/operator-append.cc @@ -249,7 +249,7 @@ Operator::ProcessResult AppendOperator::process(Depot &depot, Request &command) return ProcessResult::OK; } -Parser::ParseResult AppendOperator::parse(Request &c_in) +Parser::ParseResult AppendOperator::parse(Request &c_in, Parser &p) { constexpr auto ACCEPT = Parser::ParseResult::ACCEPT; @@ -258,49 +258,49 @@ Parser::ParseResult AppendOperator::parse(Request &c_in) if (c_in.getUidMode()) return Parser::ParseResult::REJECT; - if ((res = expectSPACE()) != ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE after APPEND"); return res; } string mailbox; - if ((res = expectMailbox(mailbox)) != ACCEPT) { + if ((res = p.expectMailbox(mailbox)) != ACCEPT) { session.setLastError("Expected mailbox after APPEND SPACE"); return res; } c_in.setMailbox(mailbox); - if ((res = expectSPACE()) != ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE after APPEND SPACE mailbox"); return res; } - if ((res = expectThisString("(")) == ACCEPT) { - if ((res = expectFlag(c_in.getFlags())) == ACCEPT) { + if ((res = p.expectThisString("(")) == ACCEPT) { + if ((res = p.expectFlag(c_in.getFlags())) == ACCEPT) { while (1) { - if ((res = expectSPACE()) != ACCEPT) break; - if ((res = expectFlag(c_in.getFlags())) != ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) break; + if ((res = p.expectFlag(c_in.getFlags())) != ACCEPT) { session.setLastError("expected a flag after the '('"); return res; } } } - if ((res = expectThisString(")")) != ACCEPT) { + if ((res = p.expectThisString(")")) != ACCEPT) { session.setLastError("expected a ')'"); return res; } - if ((res = expectSPACE()) != ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) { session.setLastError("expected a SPACE after the flag list"); return res; } } string date; - if ((res = expectDateTime(date)) == ACCEPT) { - if ((res = expectSPACE()) != ACCEPT) { + if ((res = p.expectDateTime(date)) == ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) { session.setLastError("expected a SPACE after date_time"); return res; } |