Uniot Core
0.8.1
Loading...
Searching...
No Matches
uniot::Lisp Class Reference

Utility class for working with Lisp objects in C++. More...

#include <LispHelper.h>

Public Types

enum  Type : uint8_t {
  Unknown = 0 , Int = 1 , Bool = 2 , BoolInt = 3 ,
  Symbol = 4 , Cell = 5 , Any = 6
}
 Enumeration of supported Lisp data types. More...
 

Static Public Member Functions

static bool correct (Lisp::Type type)
 Checks if a type value is within the valid range.
 
static const char * str (Lisp::Type type)
 Converts a type enumeration value to a human-readable string.
 
static Lisp::Type getType (lisp::Object obj)
 Determines the Lisp::Type of a given Lisp object.
 

Detailed Description

Utility class for working with Lisp objects in C++.

Provides type definitions and helper methods for interacting with and identifying Lisp object types in a type-safe manner.

Member Enumeration Documentation

◆ Type

enum uniot::Lisp::Type : uint8_t

Enumeration of supported Lisp data types.

Enumerator
Unknown 

Unknown or unsupported type

Int 

Integer value

Bool 

Boolean value (true/nil)

BoolInt 

Combined Boolean/Integer value

Symbol 

Symbolic reference

Cell 

List cell/pair

Any 

Any valid type

Member Function Documentation

◆ correct()

static bool uniot::Lisp::correct ( Lisp::Type type)
inlinestatic

Checks if a type value is within the valid range.

Parameters
typeThe type to validate.
Return values
trueType is valid
falseType is invalid

◆ getType()

static Lisp::Type uniot::Lisp::getType ( lisp::Object obj)
inlinestatic

Determines the Lisp::Type of a given Lisp object.

Parameters
objThe Lisp object to analyze.
Return values
typeThe corresponding Lisp::Type value.

◆ str()

static const char * uniot::Lisp::str ( Lisp::Type type)
inlinestatic

Converts a type enumeration value to a human-readable string.

Parameters
typeThe type to convert to string.
Return values
typeString representation of the type

The documentation for this class was generated from the following file: