summaryrefslogtreecommitdiff
path: root/lls/lls.c
blob: 81d54a71b3d455b63b851f3e29db65df2895abdf (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
37
38
39
40
41
42
43
#include "lls.h"

/* value type */
enum
{
    VT_UNKNOWN = 0,
    VT_NULL,     // null     |        | 
    VT_NUMBER,   // number   | float  | 
    VT_STRING,   // string   | char*  | 
    VT_BOOLEAN,  // boolean  | char   |
    VT_SET,      // set      | struct | 
    VT_FUNCTION, // function | void*  | ڴͬĺ
};

typedef struct
{
    int type; 
    union
    {
        float _number; 
        char* _string; 
        char  _bool; 
        void* _struct;
    } value;
} lls_Value;

/* ָ,֧255 */
enum
{
    MOVE = 1, 
    ADD, 
};

typedef struct
{
    int ins; 
    void* operant;
} lls_Ins;

int lls_bindfunction(lls_Env* env, const char* fname, lls_Func func)
{

}