summaryrefslogtreecommitdiff
path: root/lls
diff options
context:
space:
mode:
Diffstat (limited to 'lls')
-rw-r--r--lls/lls.c30
-rw-r--r--lls/lls.h22
2 files changed, 52 insertions, 0 deletions
diff --git a/lls/lls.c b/lls/lls.c
new file mode 100644
index 0000000..e8f26ea
--- /dev/null
+++ b/lls/lls.c
@@ -0,0 +1,30 @@
+#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;
+
+enum
+{
+
+};
diff --git a/lls/lls.h b/lls/lls.h
new file mode 100644
index 0000000..5f190a2
--- /dev/null
+++ b/lls/lls.h
@@ -0,0 +1,22 @@
+#ifndef __LLS_H
+#define __LLS_H
+
+typedef struct
+{
+ int top;
+} lls_Context;
+
+lls_Context* lls_newcontext();
+
+typedef int (*lls_Function)();
+
+int lls_bindfunction(lls_Context* C, const char* fname, lls_Function func);
+int lls_bindvariable(lls_Context* C, const char* vname, void* variable);
+int lls_bindset();
+
+int lls_executefile(lls_Context* C, const char* file);
+int lls_executesource(lls_Context* C, const void* buffer, int size);
+
+
+
+#endif \ No newline at end of file