xo-interpreter2 stack: lambda expr -> closure runs in VSM utest

This commit is contained in:
Roland Conybeare 2026-02-08 23:32:20 -05:00
commit e219ea0db3
13 changed files with 179 additions and 13 deletions

View file

@ -58,6 +58,12 @@ namespace xo {
std::size_t forward_children(obj<ACollector> gc) noexcept;
///@}
/** @defgroup scm-localenv-printable-facet **/
///@{
bool pretty(const ppindentinfo & ppii) const noexcept;
///@}
private:
/** parent environment (from closure) **/

View file

@ -7,6 +7,6 @@
#include "DLocalEnv.hpp"
#include "detail/IGCObject_DLocalEnv.hpp"
//#include "detail/IPrintable_DLocalEnv.hpp"
#include "detail/IPrintable_DLocalEnv.hpp"
/* end LocalEnv.hpp */

View file

@ -216,6 +216,7 @@ namespace xo {
* in execution
**/
DLocalEnv * local_env_ = nullptr;
protected: // temporarily, to appease compiler
/** environment pointer. Maintains bindings
* for global variables.

View file

@ -0,0 +1,62 @@
/** @file IPrintable_DLocalEnv.hpp
*
* Generated automagically from ingredients:
* 1. code generator:
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DLocalEnv.json5]
* 2. jinja2 template for abstract facet .hpp file:
* [iface_facet_repr.hpp.j2]
* 3. idl for facet methods
* [idl/IPrintable_DLocalEnv.json5]
**/
#pragma once
#include "Printable.hpp"
#include <xo/printable2/Printable.hpp>
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
#include "DLocalEnv.hpp"
namespace xo { namespace scm { class IPrintable_DLocalEnv; } }
namespace xo {
namespace facet {
template <>
struct FacetImplementation<xo::print::APrintable,
xo::scm::DLocalEnv>
{
using ImplType = xo::print::IPrintable_Xfer
<xo::scm::DLocalEnv,
xo::scm::IPrintable_DLocalEnv>;
};
}
}
namespace xo {
namespace scm {
/** @class IPrintable_DLocalEnv
**/
class IPrintable_DLocalEnv {
public:
/** @defgroup scm-printable-dlocalenv-type-traits **/
///@{
using ppindentinfo = xo::print::APrintable::ppindentinfo;
using Copaque = xo::print::APrintable::Copaque;
using Opaque = xo::print::APrintable::Opaque;
///@}
/** @defgroup scm-printable-dlocalenv-methods **/
///@{
// const methods
/** Pretty-printing support for this object.
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
static bool pretty(const DLocalEnv & self, const ppindentinfo & ppii);
// non-const methods
///@}
};
} /*namespace scm*/
} /*namespace xo*/
/* end */