From 1282cfa24512831c2da16ea551023e75667cc644 Mon Sep 17 00:00:00 2001 From: dx Date: Wed, 6 May 2020 06:08:50 +0100 Subject: +repl to main --- Converter/src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Converter') diff --git a/Converter/src/main.c b/Converter/src/main.c index 58dd1b4..b60e80e 100644 --- a/Converter/src/main.c +++ b/Converter/src/main.c @@ -19,4 +19,15 @@ int main(int argc, char *argv[]) puts(compile_line(argv[1], strnlen(argv[1], 1024), "")); } } + + else + { + while (1) + { + printf("> "); + char *buf = malloc(sizeof(*buf) * 1024); + fgets(buf, 1024, stdin); + puts(compile_line(buf, 1024, "")); + } + } } -- cgit v1.2.3-13-gbd6f