cheax
Lisp dialect with C API
chx_value Struct Reference

Represents a value in the cheax environment. More...

#include <cheax.h>

Collaboration diagram for chx_value:

Data Fields

int type
 
union {
   chx_int   as_int
 Data when type is CHEAX_INT or CHEAX_BOOL. More...
 
   chx_double   as_double
 Data when type is CHEAX_DOUBLE. More...
 
   struct chx_list *   as_list
 Data when type is CHEAX_LIST. More...
 
   struct chx_id *   as_id
 Data when type is CHEAX_ID. More...
 
   struct chx_string *   as_string
 Data when type is CHEAX_STRING. More...
 
   struct chx_quote *   as_quote
 Data when type is CHEAX_QUOTE, CHEAX_COMMA or CHEAX_SPLICE.. More...
 
   struct chx_func *   as_func
 Data when type is CHEAX_FUNC. More...
 
   struct chx_ext_func *   as_ext_func
 Data when type is CHEAX_SPECIAL_OP or CHEAX_EXT_FUNC. More...
 
   struct chx_special_op *   as_special_op
 
   struct chx_env *   as_env
 Data when type is CHEAX_ENV. More...
 
   void *   user_ptr
 Data when type is CHEAX_USER_PTR. More...
 
   unsigned *   rtflags_ptr
 Runtime flags. More...
 
data
 Data stored in the value. More...
 

Detailed Description

Represents a value in the cheax environment.

Consists of a tuple of the value's type and the value's data.

Field Documentation

◆ type

int chx_value::type

Type code. Indicates how to intepret chx_value::data field.

◆ as_int

chx_int chx_value::as_int

Data when type is CHEAX_INT or CHEAX_BOOL.

◆ as_double

chx_double chx_value::as_double

Data when type is CHEAX_DOUBLE.

◆ as_list

struct chx_list* chx_value::as_list

Data when type is CHEAX_LIST.

◆ as_id

struct chx_id* chx_value::as_id

Data when type is CHEAX_ID.

◆ as_string

struct chx_string* chx_value::as_string

Data when type is CHEAX_STRING.

◆ as_quote

struct chx_quote* chx_value::as_quote

Data when type is CHEAX_QUOTE, CHEAX_COMMA or CHEAX_SPLICE..

◆ as_func

struct chx_func* chx_value::as_func

Data when type is CHEAX_FUNC.

◆ as_ext_func

struct chx_ext_func* chx_value::as_ext_func

Data when type is CHEAX_SPECIAL_OP or CHEAX_EXT_FUNC.

◆ as_special_op

struct chx_special_op* chx_value::as_special_op

◆ as_env

struct chx_env* chx_value::as_env

Data when type is CHEAX_ENV.

◆ user_ptr

void* chx_value::user_ptr

Data when type is CHEAX_USER_PTR.

◆ rtflags_ptr

unsigned* chx_value::rtflags_ptr

Runtime flags.

Note
For internal use.

◆ 

union { ... } chx_value::data

Data stored in the value.


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