xo-interpreter2 stack: work on apply for closures [WIP]
This commit is contained in:
parent
ce5232efd9
commit
5b97cddbcd
10 changed files with 79 additions and 31 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "String.hpp"
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -15,20 +16,29 @@ namespace xo {
|
|||
**/
|
||||
class DRuntimeError {
|
||||
public:
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
||||
public:
|
||||
/** convenience shortcut.**/
|
||||
static obj<AGCObject,DRuntimeError> make(obj<AAllocator> mm,
|
||||
const char * src_fn,
|
||||
const char * error_descr);
|
||||
|
||||
/** create instance using memory from allocator @p mm
|
||||
* @p src_fn identifies the (c++) function/method in which
|
||||
* error detercted.
|
||||
* @p error_descr contains human-readable error message;
|
||||
* will be copied by this function.
|
||||
**/
|
||||
DRuntimeError * _make(obj<AAllocator> mm,
|
||||
DString * src_fn,
|
||||
DString * error_descr);
|
||||
static DRuntimeError * _make(obj<AAllocator> mm,
|
||||
DString * src_fn,
|
||||
DString * error_descr);
|
||||
|
||||
DString * src_function() const noexcept { return src_function_; }
|
||||
DString * error_descr() const noexcept { return error_descr_; }
|
||||
|
||||
/** @defgroup scm-runtimeerror-printable-facet printable facet **/
|
||||
///@{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue