From 78e3d2819623001716e58ed9ea006a281702add1 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 26 Jan 2026 15:45:40 -0500 Subject: [PATCH] xo-expression2: + DApplyExpr::make --- src/expression2/DApplyExpr.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/expression2/DApplyExpr.cpp b/src/expression2/DApplyExpr.cpp index ce5e1951..ffc6372a 100644 --- a/src/expression2/DApplyExpr.cpp +++ b/src/expression2/DApplyExpr.cpp @@ -3,8 +3,9 @@ * @author Roland Conybeare, Jan 2026 **/ -#include "DApplyExpr.hpp" #include "Expression.hpp" +#include "DApplyExpr.hpp" +#include "detail/IExpression_DApplyExpr.hpp" #include #include @@ -15,7 +16,34 @@ namespace xo { using xo::mm::AGCObject; namespace scm { - /* incomplete! */ + obj + DApplyExpr::make2(obj mm, + TypeRef typeref, + obj fn_expr, + obj arg1, + obj arg2) + { + return obj + (DApplyExpr::_make2(mm, typeref, fn_expr, arg1, arg2)); + } + + DApplyExpr * + DApplyExpr::_make2(obj mm, + TypeRef typeref, + obj fn_expr, + obj arg1, + obj arg2) + { + DApplyExpr * result + = DApplyExpr::scaffold(mm, typeref, fn_expr, 2 /*n_args*/); + + result->assign_arg(0, arg1); + result->assign_arg(1, arg2); + + return result; + } + + /* incomplete, in the sense that does not populate args_[] */ DApplyExpr::DApplyExpr(TypeRef typeref, obj fn_expr, size_type n_args) : typeref_{typeref},