xo-reader: refactor: + expect_expr_xs cls [wip]
This commit is contained in:
parent
f0f4c57362
commit
5a4923e5cf
6 changed files with 62 additions and 33 deletions
29
include/xo/reader/expect_expr_xs.hpp
Normal file
29
include/xo/reader/expect_expr_xs.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* file expect_expr_xs.hpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2024
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "exprstate.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
||||
/** @class expect_expr_xs
|
||||
* @brief state machine to expect + capture an expression
|
||||
**/
|
||||
class expect_expr_xs : public exprstate {
|
||||
public:
|
||||
expect_expr_xs();
|
||||
|
||||
static std::unique_ptr<expect_expr_xs> expect_rhs_expression();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end expect_expr_xs.hpp */
|
||||
|
|
@ -70,9 +70,11 @@ namespace xo {
|
|||
{}
|
||||
virtual ~exprstate() = default;
|
||||
|
||||
#ifdef RELOCATED
|
||||
static std::unique_ptr<exprstate> expect_rhs_expression() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_rhs_expression));
|
||||
}
|
||||
#endif
|
||||
static std::unique_ptr<exprstate> expect_symbol() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_symbol));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue