Graphviz: seperate out function graphs
This commit is contained in:
parent
044e3fb127
commit
8f707512e0
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
/target
|
||||
graphviz/*.svg
|
||||
*.svg
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
digraph functions {
|
||||
rankdir=TB;
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
rank=TB;
|
||||
|
||||
subgraph cluster_fn_args_1 {
|
||||
label="fn_args(GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A1 [label="gen_type(GazType)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
B1 [label="pack into var"];
|
||||
C1 [label="return" style=filled fillcolor=lightskyblue1];
|
||||
A1 -> B1 -> A1;
|
||||
B1 -> C1;
|
||||
}
|
||||
|
||||
subgraph cluster_fn_gen_type_2 {
|
||||
label="fn_gen_type(GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A2 [label="expr for type"];
|
||||
B2 [label="literal"];
|
||||
C2 [label="variable"];
|
||||
D2 [label="subroutine"];
|
||||
F2 [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
A2 -> A2 [dir=back];
|
||||
A2 -> B2 -> A2;
|
||||
A2 -> C2 -> A2;
|
||||
A2 -> D2 -> A2;
|
||||
A2 -> F2;
|
||||
}
|
||||
|
||||
subgraph cluster_fn_gen_global_type_3 {
|
||||
label="fn_gen_global_type(GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A3 [label="expr for type"];
|
||||
B3 [label="literal"];
|
||||
C3 [label="global"];
|
||||
D3 [label="function"];
|
||||
F3 [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
A3 -> A3 [dir=back];
|
||||
A3 -> B3 -> A3;
|
||||
A3 -> C3 -> A3;
|
||||
A3 -> D3 -> A3;
|
||||
A3 -> F3;
|
||||
}
|
||||
}
|
19
graphviz/functions/args.dot
Normal file
19
graphviz/functions/args.dot
Normal file
|
@ -0,0 +1,19 @@
|
|||
digraph fn_args {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
|
||||
label="fn_args(Vec<GazType>)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A [label="for each type"];
|
||||
B [label="gen_type(GazType)" shape=diamond style=filled fillcolor=lightcoral];
|
||||
C [label="pack into var"];
|
||||
D [label="return" style=filled fillcolor=lightskyblue];
|
||||
A -> B -> C -> A;
|
||||
A -> D;
|
||||
}
|
22
graphviz/functions/gen_function.dot
Normal file
22
graphviz/functions/gen_function.dot
Normal file
|
@ -0,0 +1,22 @@
|
|||
digraph fn_gen_function {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_function(Vec<GazType>, return: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A [label="push args into scope"];
|
||||
B [label="new scope"];
|
||||
C [label="gen_statement()" shape=diamond style=filled
|
||||
fillcolor=lightcoral];
|
||||
D [label="gen_return(GazType)" shape=diamond style=filled
|
||||
fillcolor=lightcoral];
|
||||
F [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
A -> B -> C -> D -> F;
|
||||
C -> C [dir=back];
|
||||
}
|
23
graphviz/functions/gen_global_type.dot
Normal file
23
graphviz/functions/gen_global_type.dot
Normal file
|
@ -0,0 +1,23 @@
|
|||
digraph fn_gen_global_type {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_global_type(GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A [label="expr for type"];
|
||||
B [label="literal"];
|
||||
C [label="global"];
|
||||
D [label="function"];
|
||||
F [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
A -> A [dir=back];
|
||||
A -> B -> A;
|
||||
A -> C -> A;
|
||||
A -> D -> A;
|
||||
A -> F;
|
||||
}
|
24
graphviz/functions/gen_type.dot
Normal file
24
graphviz/functions/gen_type.dot
Normal file
|
@ -0,0 +1,24 @@
|
|||
digraph fn_gen_type {
|
||||
rankdir=TB;
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_type(GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=TB;
|
||||
newrank=true;
|
||||
|
||||
A [label="expr for type"];
|
||||
B [label="literal"];
|
||||
C [label="variable"];
|
||||
D [label="subroutine"];
|
||||
F [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
A -> A [dir=back];
|
||||
A -> B -> A;
|
||||
A -> C -> A;
|
||||
A -> D -> A;
|
||||
A -> F;
|
||||
}
|
|
@ -19,6 +19,10 @@ HELP
|
|||
exit 1
|
||||
fi
|
||||
|
||||
for name in "${fnames[@]}"; do
|
||||
dot -Tsvg -o "${path}/${name}.svg" "${path}/${name}.dot"
|
||||
for name in ${path}/*.dot; do
|
||||
dot -Tsvg -o "${name%.*}.svg" "$name"
|
||||
done
|
||||
|
||||
for name in ${path}/**/*.dot; do
|
||||
dot -Tsvg -o "${name%.*}.svg" "$name"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue