Example #1
0
 def translate_FunctionType(self, func_type):
     args = []
     for arg in func_type.arguments:
         args.append(self.visit_translate(arg))
     args = cw_ast.arguments(args, None, None, [])
     returns = self.visit_translate(func_type.returns)
     func_type = cw_ast.CFunctionType(args, returns)
     return func_type
Example #2
0
 def translate_FunctionType(self, func_type):
     args = []
     for arg in func_type.arguments:
         args.append(self.visit_translate(arg))
     args = cw_ast.arguments(args, None, None, [])
     returns = self.visit_translate(func_type.returns)
     func_type = cw_ast.CFunctionType(args, returns)
     return func_type
Example #3
0
 def translate_Function(self, func):
     name = func.name
     args = []
     for arg in func.arguments:
         args.append(self.visit_translate(arg))
     args = cw_ast.arguments(args, None, None, [])
     returns = self.visit_translate(func.returns)
     func_def = cw_ast.CFunctionDecl(name, args, returns, None)
     return func_def
Example #4
0
 def visit_Function(self, func):
     name = func.name
     args = []
     for arg in func.arguments:
         args.append(self.visit_translate(arg))
     args = cw_ast.arguments(args, None, None, [])
     returns = self.visit_translate(func.returns)
     func_def = cw_ast.CFunctionDecl(name, args, returns, None)
     self.pxd_nodes.append(func_def)