xo-reader2 xo-expression2: + DLambdaSsm [WIP]
This commit is contained in:
parent
666482a945
commit
0eb1d9b526
3 changed files with 15 additions and 9 deletions
|
|
@ -44,18 +44,26 @@ namespace xo {
|
|||
|
||||
bool is_resolved() const noexcept { return typeref_.is_resolved(); }
|
||||
|
||||
exprtype extype() const noexcept { return exprtype::constant; }
|
||||
obj<AGCObject> value() const noexcept { return value_; }
|
||||
TypeDescr value_td() const noexcept { return typeref_.td(); }
|
||||
TaggedPtr value_tp() const noexcept { return TaggedPtr(typeref_.td(), value_.data()); }
|
||||
|
||||
/** @defgroup scm-constant-expression-facet **/
|
||||
///@{
|
||||
|
||||
exprtype extype() const noexcept { return exprtype::constant; }
|
||||
TypeRef typeref() const noexcept { return typeref_; }
|
||||
TypeDescr valuetype() const noexcept { return typeref_.td(); }
|
||||
obj<AGCObject> value() const noexcept { return value_; }
|
||||
|
||||
void assign_valuetype(TypeDescr td) noexcept { typeref_.resolve(td); }
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-constant-printable-facet **/
|
||||
///@{
|
||||
|
||||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
///@}
|
||||
|
||||
private:
|
||||
static TypeDescr _lookup_td(typeseq tseq);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,14 +34,12 @@ namespace xo {
|
|||
DLocalSymtab * local_symtab,
|
||||
obj<AExpression> body);
|
||||
|
||||
#ifdef NOT_YET
|
||||
/** create instance using memory from @p mm **/
|
||||
static obj<AExpression,DLambdaExpr> make(obj<AAllocator> mm,
|
||||
TypeRef typeref,
|
||||
const DUniqueString * name,
|
||||
DLocalSymtab * local_symtab,
|
||||
obj<AExpression> body);
|
||||
#endif
|
||||
|
||||
/** create instance, using memory from @p mm **/
|
||||
static DLambdaExpr * _make(obj<AAllocator> mm,
|
||||
|
|
@ -53,6 +51,8 @@ namespace xo {
|
|||
/** @defgroup scm-lambdaexpr-methods **/
|
||||
///@{
|
||||
|
||||
DLocalSymtab * local_symtab() const noexcept { return local_symtab_; }
|
||||
|
||||
// get_free_variables()
|
||||
// visit_preorder()
|
||||
// visit_layer()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
**/
|
||||
|
||||
#include "DLambdaExpr.hpp"
|
||||
// #include "detail/IExpression_DLambdaExpr.hpp"
|
||||
#include "detail/IExpression_DLambdaExpr.hpp"
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/facet/FacetRegistry.hpp>
|
||||
|
|
@ -53,7 +53,6 @@ namespace xo {
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef NOT_YET
|
||||
obj<AExpression,DLambdaExpr>
|
||||
DLambdaExpr::make(obj<AAllocator> mm,
|
||||
TypeRef typeref,
|
||||
|
|
@ -62,9 +61,8 @@ namespace xo {
|
|||
obj<AExpression> body)
|
||||
{
|
||||
return obj<AExpression,DLambdaExpr>(_make(mm, typeref,
|
||||
name, local_symtab, body);
|
||||
name, local_symtab, body));
|
||||
}
|
||||
#endif
|
||||
|
||||
DLambdaExpr *
|
||||
DLambdaExpr::_make(obj<AAllocator> mm,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue