Commits

Volker Birk  committed 65335a4

bugfix: composing flags

  • Participants
  • Parent commits d3254d2
  • Tags 2.6.0

Comments (0)

Files changed (1)

File 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: