Fragment fixes

fragments.py:
 * Use "%x" specifier if for iterators
 * Add '%D' interpretation

pysource.py:
  TABLE_DIRECT can get messed up from running fragments
  duplicate "%x" specifier to igore fragment stuff
This commit is contained in:
rocky
2016-05-20 06:18:41 -04:00
parent 6956e88e0e
commit f834b46b84
2 changed files with 32 additions and 10 deletions

View File

@@ -1495,6 +1495,10 @@ class SourceWalker(GenericASTTraversal, object):
pass
pass
arg += 1
elif typ == 'x':
# This code is only used in fragments
assert isinstance(entry[arg], tuple)
arg += 1
elif typ == 'P':
p = self.prec
low, high, sep, self.prec = entry[arg]