Exemplo n.º 1
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, types.resolve_typedef(type))
     if isinstance(const, basestring):
         const = const[1:-1] # slice away quotes
     return Const(const)
Exemplo n.º 2
0
 def convert(self, arg):
     return types.convert(arg, self.op.type)
Exemplo n.º 3
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, types.resolve_typedef(type))
     if isinstance(const, basestring):
         const = const[1:-1]  # slice away quotes
     return Const(const)
Exemplo n.º 4
0
 def convert_args(self, args):
     return [types.convert(arg, argtype)
                 for arg, argtype in zip(args, self.f.type.argtypes)]
Exemplo n.º 5
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)
Exemplo n.º 6
0
 def convert(self, arg):
     return types.convert(arg, self.op.type)
Exemplo n.º 7
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)