Skip to content

Commit

Permalink
Refactoring library import code
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jul 26, 2024
1 parent 78c2918 commit 4a78fd7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use pyo3::prelude::*;
use pyo3::{prelude::Python, prepare_freethreaded_python};
use sila_transpiler_infrastructure::{transpile_python, Block, Expr, Instruction, Operator, Type};
use std::{env, fs::File, io::read_to_string};

use sila_transpiler_infrastructure::*;

fn main() {
let args = env::args().collect::<Vec<_>>();
if args.len() > 2 {
Expand All @@ -11,7 +10,7 @@ fn main() {
.unwrap(),
);
if args[1] == "run" {
pyo3::prepare_freethreaded_python();
prepare_freethreaded_python();
Python::with_gil(|py| {
py.run_bound(&transpile_python(ast), None, None)
.expect("チノちゃん「うるさいですね...」");
Expand Down

0 comments on commit 4a78fd7

Please sign in to comment.