Add 'xo-reader/' from commit 'c46c0f1cc4'
git-subtree-dir: xo-reader git-subtree-mainline:dacdeb2cd7git-subtree-split:c46c0f1cc4
This commit is contained in:
commit
0ae98c211d
48 changed files with 5184 additions and 0 deletions
34
xo-reader/src/reader/envframe.cpp
Normal file
34
xo-reader/src/reader/envframe.cpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* file envframe.cpp
|
||||
*
|
||||
* author: Roland Conybeare
|
||||
*/
|
||||
|
||||
#include "envframe.hpp"
|
||||
#include "xo/indentlog/print/vector.hpp"
|
||||
|
||||
namespace xo {
|
||||
using xo::ast::Variable;
|
||||
|
||||
namespace scm {
|
||||
rp<Variable>
|
||||
envframe::lookup(const std::string & x) const {
|
||||
for (const auto & var : argl_) {
|
||||
if (x == var->name())
|
||||
return var;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
envframe::print(std::ostream & os) const {
|
||||
os << "<envframe"
|
||||
<< xtag("argl", argl_)
|
||||
<< ">";
|
||||
}
|
||||
|
||||
} /*namespace scm */
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end envframe.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue