def serialize(self): yield Comment('Namespace: {0}'.format(self.name)) yield CommandCall([Symbol(self.name)]) yield [i for i in self.serialize_nested()] yield CommandCall([Symbol('..')])
def serialize(self): self.on_enter() def do_prop(prop): value = prop.do_get(self.entity) return CommandCall([ Symbol('set'), BinaryParameter(prop.name, '=', self.literalize_value(value)) ]) yield Comment('Namespace: {0}'.format(self.name)) yield CommandCall([Symbol(self.name)]) for j in self.property_mappings: if not j.get: continue if not j.set: continue yield do_prop(j) yield [i for i in self.serialize_nested()] yield CommandCall([Symbol('..')])