xo-interpreter2 stack: modularize nth() primitive setup/install

This commit is contained in:
Roland Conybeare 2026-03-15 09:47:14 -05:00
commit e67117c815
6 changed files with 22 additions and 5 deletions

View file

@ -90,6 +90,7 @@ namespace xo {
obj<AAllocator> expr_alloc() const noexcept { return expr_alloc_; }
DGlobalSymtab * global_symtab() const noexcept { return global_symtab_.data(); }
DLocalSymtab * local_symtab() const noexcept { return local_symtab_; }
DGlobalEnv * global_env() const noexcept { return global_env_.data(); }
const ParserResult & result() const noexcept { return result_; }
/** polymoprhihc multiply primitive. Use to implement infix op* **/

View file

@ -184,6 +184,7 @@ namespace xo {
///@{
DGlobalSymtab * global_symtab() const noexcept;
DGlobalEnv * global_env() const noexcept;
bool debug_flag() const { return debug_flag_; }

View file

@ -57,6 +57,9 @@ namespace xo {
/** top-level symbol table **/
DGlobalSymtab * global_symtab() const noexcept;
/** top-level global environment (e.g. contains built-in primitives) **/
DGlobalEnv * global_env() const noexcept;
/** visit reader-owned memory pools; call visitor(info) for each.
* Specifically exclude expr_alloc, since we don't consider
* that reader-owned