diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 19:28:50 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 19:28:50 +0200 |
commit | 3ea7edf8c9bf7583c426178d4aaff4fb5b736bd2 (patch) | |
tree | ae78ebf9e9d1f70da8a6fdad1504063644ee8f1e /src/operator-store.cc | |
parent | 1a7c572099edf744d6bb67318cff215de3fcd897 (diff) |
use some enum classes
move ParseResult to recursivedescent.h
Diffstat (limited to 'src/operator-store.cc')
-rw-r--r-- | src/operator-store.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/operator-store.cc b/src/operator-store.cc index 4c5b9d4..23d97e2 100644 --- a/src/operator-store.cc +++ b/src/operator-store.cc @@ -29,7 +29,7 @@ const string StoreOperator::getName() const return "STORE"; } -int StoreOperator::getState() const +Session::State StoreOperator::getState() const { return Session::SELECTED; } @@ -117,14 +117,16 @@ Operator::ProcessResult StoreOperator::process(Depot &depot, Request &command) command.getUidMode()); } - return OK; + return ProcessResult::OK; } -Operator::ParseResult StoreOperator::parse(Request &c_in) const +Parser::ParseResult StoreOperator::parse(Request &c_in) { + constexpr auto ACCEPT = Parser::ParseResult::ACCEPT; + Session &session = Session::getInstance(); - Operator::ParseResult res; + Parser::ParseResult res; if ((res = expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE"); return res; |