def _compilar(self): codigo_coral = self._ler_arquivo() codigo_py = self.coral.coralToPy(codigo_coral) codegen_modulo = Module(codigo_py, self.path) try: codegen_modulo.compile() except SyntaxError: raise else: with file(self.path_pyc, "wb") as f: codegen_modulo.dump(f)
def __init__(self, source, filename, visitor): PyCodeGenModule.__init__(self, source, filename) self.visitor = visitor