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

felipesanches-svg
Marius Kintel 2012-10-06 18:01:17 -04:00
parent 3b6f16605c
commit fa9811c0f3
1 changed files with 2 additions and 2 deletions

View File

@ -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;