xo-reader2: + regression2_register_facets()

This commit is contained in:
Roland Conybeare 2026-01-18 18:57:33 -05:00
commit 74db591328
4 changed files with 53 additions and 1 deletions

View file

@ -0,0 +1,15 @@
/** @file reader2_register_facets.hpp
*
* @author Roland Conybeare, Jan 2026
**/
#pragma once
namespace xo {
namespace scm {
/** Register reader2 (facet,impl) combinations with FacetRegistry **/
bool reader2_register_facets();
}
}
/* end reader2_register_facets.hpp */

View file

@ -13,7 +13,7 @@ set(SELF_SRCS
DExprSeqState.cpp
ISyntaxStateMachine_DExprSeqState.cpp
#reader2_register_facets.cpp
reader2_register_facets.cpp
#reader2_register_types.cpp
)

View file

@ -10,6 +10,10 @@ namespace xo {
using xo::facet::typeseq;
namespace scm {
ParserStack::ParserStack(obj<ASyntaxStateMachine> ssm,
ParserStack * parent)
: ssm_{ssm}, parent_{parent}
{}
ParserStack *
ParserStack::push(obj<AAllocator> mm,

View file

@ -0,0 +1,33 @@
/** @file reader2_register_facets.cpp
*
* @author Roland Conybeare, Jan 2026
**/
#include "reader2_register_facets.hpp"
#include <xo/reader2/ssm/ISyntaxStateMachine_DExprSeqState.hpp>
#include <xo/reader2/ssm/ASyntaxStateMachine.hpp>
#include <xo/facet/FacetRegistry.hpp>
#include <xo/indentlog/scope.hpp>
namespace xo {
using xo::facet::FacetRegistry;
using xo::facet::typeseq;
namespace scm {
bool
reader2_register_facets()
{
scope log(XO_DEBUG(true));
FacetRegistry::register_impl<ASyntaxStateMachine, DExprSeqState>();
log && log(xtag("DExprSeqState.tseq", typeseq::id<DExprSeqState>()));
return true;
}
} /*namespace scm*/
} /*namespace xo*/
/* end reader2_register_facets.cpp */