summaryrefslogtreecommitdiff
path: root/lls
diff options
context:
space:
mode:
Diffstat (limited to 'lls')
-rw-r--r--lls/lls.c16
-rw-r--r--lls/lls.h13
2 files changed, 25 insertions, 4 deletions
diff --git a/lls/lls.c b/lls/lls.c
index e8f26ea..927382d 100644
--- a/lls/lls.c
+++ b/lls/lls.c
@@ -24,7 +24,21 @@ typedef struct
} value;
} lls_Value;
+/* ָ,֧255 */
enum
{
-
+ MOVE = 1,
+ ADD,
};
+
+typedef struct
+{
+ int ins;
+ void* operant;
+} lls_Ins;
+
+
+int lls_bindfunction(lls_Context* C, const char* fname, lls_Func func)
+{
+
+}
diff --git a/lls/lls.h b/lls/lls.h
index 5f190a2..7157070 100644
--- a/lls/lls.h
+++ b/lls/lls.h
@@ -1,16 +1,23 @@
#ifndef __LLS_H
#define __LLS_H
+typedef int(*lls_Func)();
+
+typedef struct
+{
+ const char* name;
+ lls_Func func;
+} lls_FuncMap;
+
typedef struct
{
int top;
+ lls_FuncMap* funcMap;
} lls_Context;
lls_Context* lls_newcontext();
-typedef int (*lls_Function)();
-
-int lls_bindfunction(lls_Context* C, const char* fname, lls_Function func);
+int lls_bindfunction(lls_Context* C, const char* fname, lls_Func func);
int lls_bindvariable(lls_Context* C, const char* vname, void* variable);
int lls_bindset();