xo-expression: + environment implementation

This commit is contained in:
Roland Conybeare 2024-06-30 19:10:56 -04:00
commit d836f13b88
3 changed files with 139 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/* file Environment.hpp
*
* author: Roland Conybeare, Jun 2024
*/
#pragma once
#include "xo/refcnt/Refcounted.hpp"
#include "Variable.hpp"
namespace xo {
namespace ast {
class Environment : public ref::Refcount {
public:
/** lookup variable-expression @p vname in this environment
**/
virtual ref::brw<Variable> lookup_var(const std::string & vname) const = 0;
};
} /*namespace ast*/
} /*namespace xo*/
/* end Environment.hpp */