blob: 33d1040729052249525aeda710f70aa841e92bec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* -------------------------------------------
Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
#pragma once
#ifdef __cplusplus
#include <public/frameworks/CoreFoundation.fwrk/headers/String.h>
#else
#include <libSystem/SystemKit/System.h>
#endif
struct LIBMSG_EXPR;
/// @brief an expression chain of LibMSG.
struct LIBMSG_EXPR final {
#ifdef __cplusplus
CF::CFString* l_key{nullptr};
CF::CFString* l_value{nullptr};
#else
VoidPtr l_key{nullptr};
VoidPtr l_value{nullptr};
#endif
LIBMSG_EXPR* l_head{nullptr};
LIBMSG_EXPR* l_tail{nullptr};
LIBMSG_EXPR* l_child{nullptr};
};
typedef Void (*libmsg_func_t)(LIBMSG_EXPR* arg);
IMPORT_C Void libmsg_init_library(libmsg_func_t* funcs, SizeT cnt);
IMPORT_C UInt32 libmsg_eval_library(struct LIBMSG_EXPR* head);
IMPORT_C UInt32 libmsg_close_library(Void);
|