diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -77,9 +77,11 @@ int main(int argc,char **argv){ return 1; } - AST *ast=parse(source); + char *errmsg; + AST *ast=parse(source,&errmsg); if(ast==NULL){ - fprintf(stderr,"Parsing error!\n"); + fprintf(stderr,"%s\n",errmsg); + free(errmsg); return 1; } ast_debug(stderr,ast); |