Beispiel #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)
Beispiel #2
0
 def convert(self, arg):
     return types.convert(arg, self.op.type)
Beispiel #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)
Beispiel #4
0
 def convert_args(self, args):
     return [types.convert(arg, argtype)
                 for arg, argtype in zip(args, self.f.type.argtypes)]
Beispiel #5
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)
Beispiel #6
0
 def convert(self, arg):
     return types.convert(arg, self.op.type)
Beispiel #7
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)