Skip to content

Commit

Permalink
Reformat output for legibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jnormile committed Oct 27, 2023
1 parent aba374f commit ac52e5c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions plexity/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,17 @@ fn traverse_tree(source_code: String, mut parser: Parser) {
starting_maximum_depth,
plexity_score,
);
println!("");
println!("Number of nodes found in tree: {}", node_count);
println!("Maximum depth of syntax tree: {}", concluding_maximum_depth);
println!("Combined weights of all nodes: {}", plexity_score);
println!("\n\n============ PLEXITY SCORECARD ============\n");
println!(" - Number of nodes found in tree: {}", node_count);
println!(
" - Maximum depth of syntax tree: {}",
concluding_maximum_depth
);
println!(" - Combined weights of all nodes: {}", plexity_score);
let plexity_score_float = plexity_score as f32;
let node_count_float = node_count as f32;
println!(
"Average depth across syntax tree: {}",
" - Average depth across syntax tree: {}",
plexity_score_float / node_count_float
)
}
Expand Down

0 comments on commit ac52e5c

Please sign in to comment.