예제 #1
0
파일: cirparser.py 프로젝트: B-Rich/pykit
 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)
예제 #2
0
파일: interp.py 프로젝트: aburan28/pykit
 def convert(self, arg):
     return types.convert(arg, self.op.type)
예제 #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)
예제 #4
0
파일: __init__.py 프로젝트: inaimathi/pykit
 def convert_args(self, args):
     return [types.convert(arg, argtype)
                 for arg, argtype in zip(args, self.f.type.argtypes)]
예제 #5
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)
예제 #6
0
파일: interp.py 프로젝트: inaimathi/pykit
 def convert(self, arg):
     return types.convert(arg, self.op.type)
예제 #7
0
파일: cirparser.py 프로젝트: aburan28/pykit
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, type)
     return Const(const)