xo-reader: refactor: + expect_type_xs [wip]
This commit is contained in:
parent
08497a371c
commit
1087e57a62
5 changed files with 55 additions and 2 deletions
25
include/xo/reader/expect_type_xs.hpp
Normal file
25
include/xo/reader/expect_type_xs.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* file expect_type_xs.hpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2024
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "exprstate.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class expect_type_xs
|
||||
* @brief state-machine for accepting a typename-expression
|
||||
**/
|
||||
class expect_type_xs : public exprstate {
|
||||
public:
|
||||
expect_type_xs();
|
||||
|
||||
static std::unique_ptr<expect_type_xs> make();
|
||||
};
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end expect_type_xs.hpp */
|
||||
|
|
@ -75,9 +75,11 @@ namespace xo {
|
|||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_symbol));
|
||||
}
|
||||
#endif
|
||||
#ifdef RELOCATED
|
||||
static std::unique_ptr<exprstate> expect_type() {
|
||||
return std::make_unique<exprstate>(exprstate(exprstatetype::expect_type));
|
||||
}
|
||||
#endif
|
||||
|
||||
exprstatetype exs_type() const { return exs_type_; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue