There was an error while loading. Please reload this page.
1 parent 43d82df commit 53d2dc4Copy full SHA for 53d2dc4
1 file changed
Parser/grammar1.c
@@ -45,7 +45,7 @@ PyGrammar_LabelRepr(label *lb)
45
else
46
return lb->lb_str;
47
}
48
- else {
+ else if (lb->lb_type < N_TOKENS) {
49
if (lb->lb_str == NULL)
50
return _PyParser_TokenNames[lb->lb_type];
51
else {
@@ -54,4 +54,7 @@ PyGrammar_LabelRepr(label *lb)
54
return buf;
55
56
57
+ else {
58
+ Py_FatalError("invalid label");
59
+ }
60
0 commit comments