>
> Speaking specifically of XSLT, in your framework it would be possible
> to write a Transform that dumps out the tree as XML (like your
> printer, but fancier), runs some XSLT on it, then reads it back in.
> Most of my personal experience with XML has been unimpressive (usually
> 'cause it's way to bloated of a tool than needed for the task at hand,
> and slow).
True. But working a little on making transforms easy to write one might
find some middle ground, rough example:
class CoercionTransform(TemplateMatchTransform):
match=lambda x: isinstance(x, AssignmentNode) and x.lhs.type != x.rhs.type
def coerce_equals_assignment(node):
other_usages_of_lhs = self.lookup_functionwide(lambda x: x.name ==
node.lhs.name)
....
coerce_equals_assignment = make_template(coerce_equals_assignment, match)
(Dropping 2.3 support would make this nicer.)
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev