Go over "yield" and other precedence

This commit is contained in:
rocky
2020-04-09 20:27:07 -04:00
parent 42d3c4db61
commit 5c6365d8a1
4 changed files with 421 additions and 364 deletions

View File

@@ -264,7 +264,11 @@ def customize_for_version37(self, version):
and opname == "CALL_FUNCTION_1"
or not re.match("\d", opname[-1])
):
self.template_engine(("%c(%c)", (0, "expr"), 1), node)
self.template_engine(
("%c(%p)",
(0, "expr"),
(1, PRECEDENCE["yield"]-1)),
node)
self.prec = p
self.prune()
else: