xo-reader2: + DExpectFormalArglistSsm starts DExpectFormalArgSsm

This commit is contained in:
Roland Conybeare 2026-01-28 18:31:10 -05:00
commit 089bd9fcbb
7 changed files with 39 additions and 22 deletions

View file

@ -4,12 +4,14 @@
**/
#include "DExpectFormalArgSsm.hpp"
#include "ssm/ISyntaxStateMachine_DExpectFormalArgSsm.hpp"
#include "DExpectSymbolSsm.hpp"
#include "ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp"
#ifdef NOT_YET
#include "expect_symbol_xs.hpp"
#include "expect_type_xs.hpp"
#include "parserstatemachine.hpp"
#include "exprstatestack.hpp"
//#include "parserstatemachine.hpp"
//#include "exprstatestack.hpp"
#include "xo/expression/Variable.hpp"
#endif
@ -38,6 +40,12 @@ namespace xo {
DExpectFormalArgSsm::DExpectFormalArgSsm() = default;
obj<ASyntaxStateMachine,DExpectFormalArgSsm>
DExpectFormalArgSsm::make(DArena & mm)
{
return obj<ASyntaxStateMachine,DExpectFormalArgSsm>(_make(mm));
}
DExpectFormalArgSsm *
DExpectFormalArgSsm::_make(DArena & mm)
{
@ -46,6 +54,14 @@ namespace xo {
return new (mem) DExpectFormalArgSsm();
}
void
DExpectFormalArgSsm::start(ParserStateMachine * p_psm)
{
p_psm->push_ssm(DExpectFormalArgSsm::make(p_psm->parser_alloc()));
DExpectSymbolSsm::start(p_psm);
}
syntaxstatetype
DExpectFormalArgSsm::ssm_type() const noexcept {
return syntaxstatetype::expect_formal_arg;
@ -161,14 +177,8 @@ namespace xo {
expr,
this->get_expect_str());
}
#ifdef NOT_YET
void
DExpectFormalSsm::start(ParserStateMachine * p_psm) {
p_psm->push_exprstate(expect_formal_xs::make());
expect_symbol_xs::start(p_psm);
}
expect_formal_xs::expect_formal_xs()
: exprstate(exprstatetype::expect_formal)
{}