Add Python 2.3 rule for "if 1: ..."

Fully fixes #97 for Python 2.3. Python 2.4 was fixed in a previous commit.
This commit is contained in:
rocky
2017-04-13 01:14:49 -04:00
parent be9194c223
commit b4ded92822
3 changed files with 34 additions and 1 deletions

View File

@@ -218,6 +218,11 @@ class SourceWalker(GenericASTTraversal, object):
'importlist2': ( '%C', (0, maxint, ', ') ),
})
if version <= 2.4:
if version == 2.3:
TABLE_DIRECT.update({
'if1_stmt': ( '%|if 1\n%+%c%-', 5 )
})
global NAME_MODULE
NAME_MODULE = AST('stmt',
[ AST('assign',