On Thu, Aug 5, 2010 at 2:43 AM, Dag Sverre Seljebotn <[email protected]> wrote: > Actually, in the first pass, one could implement DotNetCodeGenerator > like this: > > class DotNetCodeGenerator(CLikeCodeGenerator): > # Default fallback to CPython generation > def visit_Node(self, node): > node.generate_...(self.code) > > def visit_ExprNode(self, node): > # Slightly different logic I believe... > node.generate_...(self.code) > > # Any .NET specific stuff > def visit_FuncNode(self, node): ...
It looks like this would work if you're calling generate_result_code, say. Other generate_ methods, like generate_function_definitions, are recursive, so if you ever called the CPython version that would be used for all of the children of the node as well as the node itself -- there's no mechanism for the transform to get control back. > Dag Sverre Carl _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
