From fa9811c0f3314a0f343385c2cba7e691fa814b08 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 6 Oct 2012 18:01:17 -0400 Subject: bugfix: parser errors wasn't treated correctly, causing cmd-line tools to return without an error code, as well as error highlighting in the editor being broken diff --git a/src/parser.y b/src/parser.y index b36c41b..c11f0f2 100644 --- a/src/parser.y +++ b/src/parser.y @@ -566,11 +566,11 @@ Module *parse(const char *text, const char *path, int debug) // PRINTB_NOCACHE("New module: %s %p", "root" % rootmodule); parserdebug = debug; - parserparse(); + int parserretval = parserparse(); lexerdestroy(); lexerlex_destroy(); - if (!rootmodule) return NULL; + if (parserretval != 0) return NULL; parser_error_pos = -1; return rootmodule; -- cgit v0.10.1