diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-18 22:35:27 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-23 18:25:23 +0300 |
commit | 7c5f098511b8f612a17f4ccdd8a4924c325d37e1 (patch) | |
tree | 4a97d802557bbffcadfcfd776c8e4afdb31d96aa /src/main.c | |
parent | 18262dcbecd97591dd15ee9274a81abb8c2ba1c4 (diff) | |
download | lyn-7c5f098511b8f612a17f4ccdd8a4924c325d37e1.tar.gz lyn-7c5f098511b8f612a17f4ccdd8a4924c325d37e1.zip |
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
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
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; +} |