blob: f926b008b86d2d5c9301ad6ea061cad37654b934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use std::path::Path;
use java2flowchart::ast::parse;
use java2flowchart::image::FlowChart;
use java2flowchart::parser;
fn main() {
let test = "if (first) {firstthen; if (firstthenif) {firstthenifthen} else {firstthenelse}} else {firstelse}println('a')";
let ast = parse(&parser::parse(test));
println!("{:#?}", ast);
FlowChart::create(&ast, Path::new("output.png"));
}
|