xo-interpreter2 stack: work on variable references [WIP]
This commit is contained in:
parent
4278ea726a
commit
da1f099b4f
2 changed files with 16 additions and 0 deletions
|
|
@ -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); }
|
||||
|
||||
|
|
|
|||
13
include/xo/expression2/Variable.hpp
Normal file
13
include/xo/expression2/Variable.hpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue