diff options
-rw-r--r-- | error.txt | 3 | ||||
-rw-r--r-- | parser.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/error.txt b/error.txt new file mode 100644 index 0000000..14bcb38 --- /dev/null +++ b/error.txt @@ -0,0 +1,3 @@ +def main(){ + print(if 1 kaas; else swag); +} @@ -686,9 +686,7 @@ AST* parse(const char *source,char **errmsg){ int reslen; AST *pr=parseprogram(source,&reslen); source+=reslen; - Token next=nexttoken(&source,false); - DBG(printtoken(stderr,next,"afterparse")); - if(next.type!=TT_EOF||!pr){ + if(lasttoken.type!=TT_EOF||!pr){ *errmsg=reportparseerror(source); if(pr)ast_free(pr); return NULL; |