aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 17a10ad..ff70bf9 100644
--- a/main.c
+++ b/main.c
@@ -44,7 +44,11 @@ void print_ast() {
void print_sem() {
yyparse();
- semantics_check(ast_root);
+ if (ast_root)
+ {
+ semantics_check(ast_root);
+ }
+ else exit(1);
}
void print_help() {