summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index dbac6e3..a27575c 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -190,8 +190,10 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
PyParser_AddToken(ps, (int)type, str,
tok->lineno, col_offset,
&(err_ret->expected))) != E_OK) {
- if (err_ret->error != E_DONE)
+ if (err_ret->error != E_DONE) {
PyObject_FREE(str);
+ err_ret->token = type;
+ }
break;
}
}