diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 21:49:37 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 21:49:37 +0200 |
commit | bc946633e0bcae5fe63528ad743bcc67de7e347d (patch) | |
tree | 7a3d127148c13d84e92f38c319fb5aad1e88a6cb /src/operator-delete.cc | |
parent | 3ea7edf8c9bf7583c426178d4aaff4fb5b736bd2 (diff) |
created a Parser class
Diffstat (limited to 'src/operator-delete.cc')
-rw-r--r-- | src/operator-delete.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/operator-delete.cc b/src/operator-delete.cc index a706d01..fea9917 100644 --- a/src/operator-delete.cc +++ b/src/operator-delete.cc @@ -42,7 +42,7 @@ Operator::ProcessResult DeleteOperator::process(Depot &depot, Request &command) } } -Parser::ParseResult DeleteOperator::parse(Request &c_in) +Parser::ParseResult DeleteOperator::parse(Request &c_in, Parser &p) { constexpr auto ACCEPT = Parser::ParseResult::ACCEPT; @@ -51,18 +51,18 @@ Parser::ParseResult DeleteOperator::parse(Request &c_in) if (c_in.getUidMode()) return Parser::ParseResult::REJECT; Parser::ParseResult res; - if ((res = expectSPACE()) != ACCEPT) { + if ((res = p.expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE after DELETE"); return res; } std::string mailbox; - if ((res = expectMailbox(mailbox)) != ACCEPT) { + if ((res = p.expectMailbox(mailbox)) != ACCEPT) { session.setLastError("Expected mailbox after DELETE SPACE"); return res; } - if ((res = expectCRLF()) != ACCEPT) { + if ((res = p.expectCRLF()) != ACCEPT) { session.setLastError("Expected CRLF after DELETE SPACE mailbox"); return res; } |