Commits

Anonymous committed 65335a4

bugfix: composing flags

Comments (0)

Files changed (1)

pypeg2/__init__.py

         except AttributeError:
             pass
         else:
-            return thing.compose()
+            return terminal_indent() + thing.compose()
 
         if not grammar:
             try:
         elif isinstance(grammar, attr.Class):
             if grammar.subtype == "Flag":
                 if getattr(thing, grammar.name):
-                    result = self.compose(grammar.thing)
+                    result = self.compose(thing, grammar.thing)
                 else:
                     result = terminal_indent()
             else: