From 1f2bca5028af15c30622d4c42f295463166c89d5 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 4 Jan 2025 10:45:11 -0500 Subject: [PATCH] Not sure. --- src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.c b/src/main.c index 6133c80..a56a0ba 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,5 @@ #include +#include #include "include/ast.h" #include "include/dstr.h" @@ -18,6 +19,12 @@ extern int yyparse(); int main(int argc, char** argv) { + if (argc - 1 && strlen(argv[1]) > 0 && (inp = argv[1]) && !yyparse()) { + log_dbg("Parsed successfully!\n"); + exec_print(exec_expr(root)); + exit(0); + } + while (1) { Dstr* ln = dstr_init(); char c;