aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..85dd445
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,16 @@
+#include <lyn/lyn.h>
+#include <lyn/debug.h>
+
+int main(int argc, char *argv[])
+{
+ if (argc != 2) {
+ error("wrong number of arguments (should be just one for a file)");
+ return -1;
+ }
+
+ struct lyn lyn = lyn_create();
+ int ret = lyn_eval_file(&lyn, argv[1]);
+ lyn_destroy(&lyn);
+
+ return ret;
+}