

def expand(self, generator, node, depth):
    if (not hasattr(node, self.field)):
        print(node.y)
    f = getattr(node, self.field)
    (layout, default) = generator._parsed_templates[('%s_%s' % (self.a, self.field))]
    if (not f):
        return generator._generate_from_template(default, node, depth)
    else:
        return generator._generate_from_template(layout, node, depth)

dataset/ETHPy150Open alehander42/pseudo/pseudo/code_generator_dsl.py SubTemplate.expand/original