xo-reader2: + SyntaxStateMachine.forward_children method

Support gc traversal with goal of making ParserStateMachine a gc root
This commit is contained in:
Roland Conybeare 2026-03-24 17:43:45 -04:00
commit 3af72fec64
91 changed files with 626 additions and 39 deletions

View file

@ -90,6 +90,7 @@ namespace xo {
public:
using Super = DSyntaxStateMachine<DProgressSsm>;
using TypeDescr = xo::reflect::TypeDescr;
using ACollector = xo::mm::ACollector;
using DArena = xo::mm::DArena;
using ppindentinfo = xo::print::ppindentinfo;
@ -214,6 +215,13 @@ namespace xo {
void print(std::ostream & os) const override;
#endif
/** @defgroup scm-progressssm-gc-support gc support methods **/
///@{
void forward_children(obj<ACollector> gc) noexcept;
///@}
private:
/** populate an expression here, may be followed by an operator **/
obj<AExpression> lhs_;