zksecurity / noname

Noname: a programming language to write zkapps
https://zksecurity.github.io/noname/
178 stars 44 forks source link

Convenient function to init type checker #67

Open katat opened 3 months ago

katat commented 3 months ago

so that it can simplify and encapsulate the following construction:

let mut sources = Sources::new();
let mut tast = TypeChecker::new();
let this_module = None;
let _node_id = typecheck_next_file(
    &mut tast,
    this_module,
    &mut sources,
    file_name.to_string(),
    code.clone(),
    0,
)
.unwrap();