xo-expression: + environment implementation
This commit is contained in:
parent
829bffd007
commit
d836f13b88
3 changed files with 139 additions and 0 deletions
23
include/xo/expression/Environment.hpp
Normal file
23
include/xo/expression/Environment.hpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue