summaryrefslogtreecommitdiff
path: root/llsVM.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-06-01 08:31:47 +0800
committerchai <chaifix@163.com>2018-06-01 08:31:47 +0800
commit6a4f1a224273118a5429094ddd83420b7d69b28d (patch)
treef96c714cda12af6300178cbe31880d17804802de /llsVM.c
parenta558be5f3d72775bd06c3814e002d355402a7acd (diff)
更新示例
Diffstat (limited to 'llsVM.c')
-rw-r--r--llsVM.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/llsVM.c b/llsVM.c
index e69de29..2102d60 100644
--- a/llsVM.c
+++ b/llsVM.c
@@ -0,0 +1,17 @@
+#include "lls/lls.h"
+
+int l_print()
+{
+
+ return 0;
+}
+
+const char* source = "print(\"hello, world\")";
+
+int main(int args, char* argv[])
+{
+ lls_Context* C = lls_newcontext();
+ lls_bindfunction(C, "print", l_print);
+ lls_executesource(C, source, strlen(source));
+ return 0;
+} \ No newline at end of file