blob: 67c2e43f130c04890ddd20627b5eed33a76d2c3c (
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 = "first; if (first) {firstthen; if (firstthenif) {firstthenifthen} else {firstthenelse}} else {firstelse}println('a'); second; thirdlongprocess";
let ast = parse(&parser::parse(test));
println!("{:#?}", ast);
FlowChart::create(&ast, Path::new("output.png"));
}
|