summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-10-06 22:01:17 (GMT)
committerMarius Kintel <marius@kintel.net>2012-10-06 22:01:17 (GMT)
commitfa9811c0f3314a0f343385c2cba7e691fa814b08 (patch)
tree59653d9534727d41893b7383791ea3387b1a6b2f /src/parser.y
parent3b6f16605c2dcdabca39dd0d61653cc8c72fa72d (diff)
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
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y4
1 files changed, 2 insertions, 2 deletions
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;
contact: Jan Huwald // Impressum