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

@ -9,6 +9,7 @@
#include "envframestack.hpp"
#include "parser_result.hpp"
#include "parserstatemachine.hpp"
#include "xo/expression/GlobalSymtab.hpp"
#include <stdexcept>
namespace xo {
@ -161,9 +162,12 @@ namespace xo {
/** create parser in initial state;
* parser is ready to receive tokens via @ref include_token
*
* At least for xo-interpreter will have non-empty symbol table.
*
* @p toplevel_symtab symbol table.
* @p debug_flag true to enable debug logging
**/
explicit parser(bool debug_flag);
parser(const rp<GlobalSymtab> & toplevel_symtab, bool debug_flag);
bool debug_flag() const { return psm_.debug_flag(); }