summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 35c2bff..dc451f9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,20 +4,20 @@
#include <readline/history.h>
#include <string.h>
-#include "exec.h"
+#include "syntax.h"
+#include "stages.h"
int main() {
char* line;
- ShellState shstate = {.shell_vars = make_KeyValMap(1), .aliases = make_KeyValMap(1)};
while (1) {
line = readline("$ ");
if (line[0] == '\0') continue;
if (strcmp(line, "exit") == 0) exit(0);
add_history(line);
- process_input_line(line, &shstate);
+ Ast ast = lex(line);
+ PipelineTree pltree = process_ast(ast);
+ execute_pipeline_tree(pltree);
}
free(line);
}
-
-