From 7c5f098511b8f612a17f4ccdd8a4924c325d37e1 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 18 Oct 2024 22:35:27 +0300 Subject: initial parser+lexer + AST might still change, also not a *huge* fan of having to reverse all arrays but I guess it's unlikely to be a significant bottleneck --- src/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main.c (limited to 'src/main.c') 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 +#include + +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; +} -- cgit v1.2.3