summaryrefslogtreecommitdiffstats
path: root/Parser/pegen.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-10-30 23:48:42 (GMT)
committerGitHub <noreply@github.com>2020-10-30 23:48:42 (GMT)
commit06f8c3328dcd81c84d1ee2b3a57b5381dcb38482 (patch)
treecc3ad1395744a8eba15c779480a9ce9276e8bc5f /Parser/pegen.c
parent6e03c0ad156797cd6e9132e895d55dac0344d340 (diff)
downloadcpython-06f8c3328dcd81c84d1ee2b3a57b5381dcb38482.zip
cpython-06f8c3328dcd81c84d1ee2b3a57b5381dcb38482.tar.gz
cpython-06f8c3328dcd81c84d1ee2b3a57b5381dcb38482.tar.bz2
bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_flufl rule (GH-23048)
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r--Parser/pegen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 216edd8..188fd28 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -62,8 +62,7 @@ init_normalization(Parser *p)
/* Checks if the NOTEQUAL token is valid given the current parser flags
0 indicates success and nonzero indicates failure (an exception may be set) */
int
-_PyPegen_check_barry_as_flufl(Parser *p) {
- Token *t = p->tokens[p->fill - 1];
+_PyPegen_check_barry_as_flufl(Parser *p, Token* t) {
assert(t->bytes != NULL);
assert(t->type == NOTEQUAL);