xo-reader2: + SyntaxStateMachine.forward_children method
Support gc traversal with goal of making ParserStateMachine a gc root
This commit is contained in:
parent
ed3e26e718
commit
3af72fec64
91 changed files with 626 additions and 39 deletions
|
|
@ -48,6 +48,7 @@ namespace xo {
|
|||
public:
|
||||
using Super = DSyntaxStateMachine<DExpectFormalArgSsm>;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using DArena = xo::mm::DArena;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
|
|
@ -121,6 +122,13 @@ namespace xo {
|
|||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-expectformalargssm-gc-support gc support methods **/
|
||||
///@{
|
||||
|
||||
/** gc support: visit gc-aware child pointers **/
|
||||
void forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
#ifdef PROBABLY_NOT
|
||||
virtual void on_rightparen_token(const token_type & tk,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace xo {
|
|||
/** @defgroup scm-syntaxstatemachine-dexpectformalargssm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
|
|
@ -75,6 +76,8 @@ namespace xo {
|
|||
static void on_parsed_expression_with_token(DExpectFormalArgSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DExpectFormalArgSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DExpectFormalArgSsm & self, obj<ACollector> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue