def run(code): ast = Parser.parse(code) instructions = Generator.generate_code(ast) VM(instructions).interpret()
def transpile(code, target): if target.lower() == 'python': ast = Parser.parse(code) return PythonTranspiler.generate_code(ast)