xo-interpreter2 stack: work on variable references [WIP]

This commit is contained in:
Roland Conybeare 2026-02-05 10:44:11 -05:00
commit da1f099b4f
2 changed files with 16 additions and 0 deletions

View file

@ -24,6 +24,9 @@ namespace xo {
static Binding global() { return Binding(s_link_global, 0); }
static Binding local(int32_t j_slot) { return Binding(0, j_slot); }
bool is_null() const {
return (i_link_ == s_link_sentinel) && (j_slot_ == -1);
}
bool is_global() const { return i_link_ == s_link_global; }
bool is_local() const { return (i_link_ == 0) && (j_slot_ >= 0); }

View file

@ -0,0 +1,13 @@
/** @file Variable.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include "DVariable.hpp"
#include "detail/IExpression_DVariable.hpp"
#include "detail/IGCObject_DVariable.hpp"
#include "detail/IPrintable_DVariable.hpp"
/* end Variable.hpp */