xo-interpreter: plumb initial global symtab so builtins reach parser

This commit is contained in:
Roland Conybeare 2025-11-27 11:50:34 -05:00
commit 79d32b61c6
14 changed files with 57 additions and 23 deletions

View file

@ -24,13 +24,15 @@ namespace xo {
namespace scm {
// ----- parser -----
parser::parser(bool debug_flag)
parser::parser(const rp<GlobalSymtab> & toplevel_symtab, bool debug_flag)
: psm_{debug_flag}
{
#ifdef OBSOLETE
/* top-level environment. initially empty */
rp<SymbolTable> toplevel_env = GlobalSymtab::make_empty();
#endif
this->psm_.env_stack_.push_envframe(toplevel_env);
this->psm_.env_stack_.push_envframe(toplevel_symtab);
}
bool