/* file envframe.hpp * * author: Roland Conybeare, Aug 2024 */ #pragma once xxx; #include "xo/expression/Variable.hpp" #include "xo/expression/LocalEnv.hpp" #include namespace xo { namespace scm { #ifdef OBSOLETE /** @class envframe * @brief names/types of formal paremeters introduced by a function * * **/ class envframe { public: using Environment = xo::ast::Environment; using LocalEnv = xo::ast::LocalEnv; using Variable = xo::ast::Variable; public: envframe() = default; envframe(const std::vector> & argl, const rp & parent_env); const std::vector> & argl() const { return env_->argv(); } const rp & local_env() const { return env_; } /** lookup variable by @p name. If found, return it. * Otherwise return nullptr **/ bp lookup(const std::string & name) const; /** establish (replacing if already exists) binding for variable @p var. * Replacement intended for use in interactive sessions **/ void upsert(bp var); void print (std::ostream & os) const; private: rp env_; }; inline std::ostream & operator<< (std::ostream & os, const envframe & x) { x.print(os); return os; } #endif } /*namespace scm*/ } /*namespace xo*/ /* end envframe.hpp */