31#include <libminilisp.h>
40#define getPrimitiveName() (__func__)
47#define exportPrimitiveNameTo(name) \
48 char name[sizeof(__func__)]; \
49 snprintf(name, sizeof(name), __func__)
123 static const char *map[] = {
141 if (obj ==
nullptr) {
Utility class for working with Lisp objects in C++.
Definition LispHelper.h:90
Type
Enumeration of supported Lisp data types.
Definition LispHelper.h:96
@ BoolInt
Definition LispHelper.h:100
@ Symbol
Definition LispHelper.h:101
@ Cell
Definition LispHelper.h:102
@ Bool
Definition LispHelper.h:99
@ Int
Definition LispHelper.h:98
@ Any
Definition LispHelper.h:104
@ Unknown
Definition LispHelper.h:97
static bool correct(Lisp::Type type)
Checks if a type value is within the valid range.
Definition LispHelper.h:113
static Lisp::Type getType(lisp::Object obj)
Determines the Lisp::Type of a given Lisp object.
Definition LispHelper.h:140
static const char * str(Lisp::Type type)
Converts a type enumeration value to a human-readable string.
Definition LispHelper.h:122
LispStartReason
Why a script started running.
Definition LispHelper.h:166
struct Obj * Object
A pointer to a Lisp object structure.
Definition LispHelper.h:63
void * Root
A generic pointer representing the root of a Lisp environment.
Definition LispHelper.h:78
LispStopReason
Why a script stopped running.
Definition LispHelper.h:175
std::function< void(LispStartReason)> LispStartHook
Called after the interpreter is built and before the script is evaluated.
Definition LispHelper.h:186
struct Obj ** VarObject
A pointer to a pointer to a Lisp object structure.
Definition LispHelper.h:71
std::function< void(LispStopReason)> LispStopHook
Called before the interpreter is destroyed.
Definition LispHelper.h:192
@ Restored
A stored script, run from AppKit::attach() during boot.
Definition LispHelper.h:167
@ Received
A script that arrived over MQTT.
Definition LispHelper.h:168
@ Completed
The script ran to the end, or a finite task used up its passes.
Definition LispHelper.h:176
@ Cleared
An empty script arrived, which means "run nothing".
Definition LispHelper.h:178
@ Replaced
A new script arrived and took its place.
Definition LispHelper.h:177
@ Failed
A Lisp error tore the machine down.
Definition LispHelper.h:179
Contains type definitions and utilities for interacting with the Lisp interpreter.
Contains all classes and functions related to the Uniot Core.