1#ifndef REDUCT_INTRINSIC_H
2#define REDUCT_INTRINSIC_H 1
30#define REDUCT_INTRINSIC_NONE 0
31#define REDUCT_INTRINSIC_QUOTE 1
32#define REDUCT_INTRINSIC_LIST 2
33#define REDUCT_INTRINSIC_DO 3
34#define REDUCT_INTRINSIC_LAMBDA 4
35#define REDUCT_INTRINSIC_THREAD 5
36#define REDUCT_INTRINSIC_DEF 6
37#define REDUCT_INTRINSIC_IF 7
38#define REDUCT_INTRINSIC_COND 8
39#define REDUCT_INTRINSIC_MATCH 9
40#define REDUCT_INTRINSIC_AND 10
41#define REDUCT_INTRINSIC_OR 11
42#define REDUCT_INTRINSIC_NOT 12
43#define REDUCT_INTRINSIC_ADD 13
44#define REDUCT_INTRINSIC_SUB 14
45#define REDUCT_INTRINSIC_MUL 15
46#define REDUCT_INTRINSIC_DIV 16
47#define REDUCT_INTRINSIC_MOD 17
48#define REDUCT_INTRINSIC_INC 18
49#define REDUCT_INTRINSIC_DEC 19
50#define REDUCT_INTRINSIC_BAND 20
51#define REDUCT_INTRINSIC_BOR 21
52#define REDUCT_INTRINSIC_BXOR 22
53#define REDUCT_INTRINSIC_BNOT 23
54#define REDUCT_INTRINSIC_SHL 24
55#define REDUCT_INTRINSIC_SHR 25
56#define REDUCT_INTRINSIC_EQ 26
57#define REDUCT_INTRINSIC_NEQ 27
58#define REDUCT_INTRINSIC_SEQ 28
59#define REDUCT_INTRINSIC_SNEQ 29
60#define REDUCT_INTRINSIC_LT 30
61#define REDUCT_INTRINSIC_LE 31
62#define REDUCT_INTRINSIC_GT 32
63#define REDUCT_INTRINSIC_GE 33
64#define REDUCT_INTRINSIC_MAX 34
reduct_intrinsic_handler_t reductIntrinsicHandlers[REDUCT_INTRINSIC_MAX]
Intrinsic handler functions array.
const char * reductIntrinsics[REDUCT_INTRINSIC_MAX]
Intrinsic names array.
#define REDUCT_INTRINSIC_MAX
The amount of intrinsics.
reduct_native_fn reductIntrinsicNatives[REDUCT_INTRINSIC_MAX]
Intrinsic native functions array.
reduct_uint8_t reduct_intrinsic_t
Intrinsic types.
REDUCT_API void reduct_intrinsic_register_all(struct reduct *reduct)
Registers all Reduct intrinsics with the given Reduct instance.
void reduct_intrinsic_block_generic(struct reduct_compiler *compiler, struct reduct_item *list, reduct_uint32_t startIdx, struct reduct_expr *out)
Compiles a block of expressions (like a do block).
void(* reduct_intrinsic_handler_t)(struct reduct_compiler *compiler, struct reduct_item *expr, struct reduct_expr *out)
Intrinsic handler function type.
reduct_handle_t(* reduct_native_fn)(struct reduct *reduct, reduct_size_t argc, reduct_handle_t *argv)
Native function pointer type.
Native function registration.