Fix "for ... if" bug introduced since 3.6.2...

However we've isolated and documented the 3.x grammar a little bit better
This commit is contained in:
rocky
2020-01-17 04:29:47 -05:00
parent 549c33113b
commit 027c9a7dc0
7 changed files with 31 additions and 8 deletions

View File

@@ -371,14 +371,13 @@ TABLE_DIRECT = {
# 'return': ( '%|return %c\n', 0),
'return_if_stmt': ( 'return %c\n', 0),
'ifstmt': ( '%|if %c:\n%+%c%-',
"ifstmt": ( "%|if %c:\n%+%c%-",
0, # "testexpr" or "testexpr_then"
1, # "_ifstmts_jump" or "return_stmts"
),
'iflaststmt': ( '%|if %c:\n%+%c%-', 0, 1 ),
'iflaststmtl': ( '%|if %c:\n%+%c%-', 0, 1 ),
'testtrue': ( 'not %p',
'iflaststmt': ( "%|if %c:\n%+%c%-", 0, 1 ),
'iflaststmtl': ( "%|if %c:\n%+%c%-", 0, 1 ),
'testtrue': ( "not %p",
(0, PRECEDENCE['unary_not']) ),
# Generally the args here are 0: (some sort of) "testexpr",