def start_file(self): print ast_cython_c.license_comment() + ''' cimport %s cdef class GraphQLAst: """Base class for all Ast pieces""" pass ''' % ast_cython_c.CMODULE_NAME
def start_file(self): print ast_cython_c.license_comment() + ''' from libc.string cimport memset cimport %(cmodule)s cimport GraphQLAstNode cimport cGraphQLAstNode cimport cGraphQLAst cimport GraphQLAst cdef class GraphQLAstVisitor: def visit_node(self, node): cdef %(cmodule)s.GraphQLAstVisitorCallbacks callbacks_c memset(&callbacks_c, 0, sizeof(callbacks_c)) set_callbacks(&callbacks_c) cdef void* userData = <void *>self cdef cGraphQLAstNode.GraphQLAstNode *node_c; node_c = (<GraphQLAstNode.GraphQLAstNode?>node)._node %(cmodule)s.graphql_node_visit(node_c, &callbacks_c, userData) ''' % {'cmodule': CMODULE_NAME}
def start_file(self): print ast_cython_c.license_comment() + """
def start_file(self): print ast_cython_c.license_comment() + '''