Exemplo n.º 1
0
 def nonterminal(self, atype, args):
     #
     # Flatten AST a bit by not making nodes if there's only
     # one child, but retain a few primary structural
     # elements.
     #
     if len(args) == 1 and not atype in self.primaryTypes:
         return args[0]
     return GenericASTBuilder.nonterminal(self, atype, args)