xo-reader xo-expression: nested lambdas working properly + docs

This commit is contained in:
Roland Conybeare 2025-07-06 14:13:44 -05:00
commit 699ee5d38e
41 changed files with 736 additions and 137 deletions

View file

@ -5,6 +5,18 @@
namespace xo {
namespace ast {
std::string
Variable::gensym(const std::string & prefix) {
static std::size_t s_counter = 0;
++s_counter;
char buf[32];
snprintf(buf, sizeof(buf), "%ld", s_counter);
return prefix + std::string(buf);
}
void
Variable::attach_envs(bp<Environment> e) {
/** e makes accessible all enclosing lexical scopes **/