xo-expression: + binding_path + assoc w/ each Variable

This commit is contained in:
Roland Conybeare 2024-07-02 16:57:07 -04:00
commit 14796663b1
8 changed files with 105 additions and 3 deletions

View file

@ -1,9 +1,16 @@
/* @file Variable.cpp */
#include "Variable.hpp"
#include "Environment.hpp"
namespace xo {
namespace ast {
void
Variable::attach_envs(ref::brw<Environment> e) {
/** e makes accessible all enclosing lexical scopes **/
this->path_ = e->lookup_binding(this->name_);
} /*attach_envs*/
void
Variable::display(std::ostream & os) const {
os << "<Variable"