xo-reader: refactor: + expect_type_xs [wip]

This commit is contained in:
Roland Conybeare 2024-08-10 17:02:50 -05:00
commit 1087e57a62
5 changed files with 55 additions and 2 deletions

View 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 */

View file

@ -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_; }