Commit e66d97dc authored by Christian Heimes's avatar Christian Heimes

merge

parents 58235ae4 eb793f00
...@@ -45,7 +45,7 @@ PyGrammar_LabelRepr(label *lb) ...@@ -45,7 +45,7 @@ PyGrammar_LabelRepr(label *lb)
else else
return lb->lb_str; return lb->lb_str;
} }
else { else if (lb->lb_type < N_TOKENS) {
if (lb->lb_str == NULL) if (lb->lb_str == NULL)
return _PyParser_TokenNames[lb->lb_type]; return _PyParser_TokenNames[lb->lb_type];
else { else {
...@@ -54,4 +54,7 @@ PyGrammar_LabelRepr(label *lb) ...@@ -54,4 +54,7 @@ PyGrammar_LabelRepr(label *lb)
return buf; return buf;
} }
} }
else {
Py_FatalError("invalid label");
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment