better error checking
This commit is contained in:
+6
-2
@@ -7,6 +7,10 @@ mod variable;
|
||||
|
||||
fn main() {
|
||||
let mut vars = Variables::new();
|
||||
let out = transpiler::Transpiler::default().transpile(r#"int x"#.to_string(), 0, &mut vars);
|
||||
println!("{out}");
|
||||
let mut trsp = transpiler::Transpiler::default();
|
||||
let out = trsp.transpile("int 12 x".to_string(), 0, &mut vars);
|
||||
for p in trsp.problems {
|
||||
println!("{:?}: {}", p.problem_type, p.problem_msg)
|
||||
}
|
||||
println!("{out}\n\n\n{:?}", vars);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user