aboutsummaryrefslogtreecommitdiff
path: root/src/checker.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-16 16:38:05 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-16 16:38:05 +0100
commitc69df7cd3ad21ead185437c44531686be9a391e0 (patch)
tree1eebc04d911189d30081dc8431d4b4c5850ef48f /src/checker.c
parent67d8f48553209b65a813d643d97939214504ee5e (diff)
Exit program if there were syntax errors
Diffstat (limited to 'src/checker.c')
-rw-r--r--src/checker.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/checker.c b/src/checker.c
index f8ecac489..c0bc83273 100644
--- a/src/checker.c
+++ b/src/checker.c
@@ -714,6 +714,10 @@ void destroy_checker_info(CheckerInfo *i) {
void init_checker(Checker *c, Parser *parser, BuildContext *bc) {
+ if (global_error_collector.count > 0) {
+ gb_exit(1);
+ }
+
gbAllocator a = heap_allocator();
c->parser = parser;