xo-expression: + binding_path + assoc w/ each Variable
This commit is contained in:
parent
a94c55304b
commit
14796663b1
8 changed files with 105 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue