Graphviz: add return/statement functions
This commit is contained in:
parent
8f707512e0
commit
ac848b070d
3 changed files with 56 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
*.svg
|
||||
Cargo.lock
|
||||
|
|
22
graphviz/functions/gen_return.dot
Normal file
22
graphviz/functions/gen_return.dot
Normal file
|
@ -0,0 +1,22 @@
|
|||
digraph fn_gen_return {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_return(return: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=LR;
|
||||
newrank=true;
|
||||
|
||||
a [label="choice" rank=max];
|
||||
b [label="gen_if_statement_with_return()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
c [label="gen_loop_with_return()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
d [label="return"];
|
||||
e [label="gen_type()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
f [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
a -> b -> f;
|
||||
a -> c -> f;
|
||||
a -> d -> e -> f;
|
||||
}
|
33
graphviz/functions/gen_statement.dot
Normal file
33
graphviz/functions/gen_statement.dot
Normal file
|
@ -0,0 +1,33 @@
|
|||
digraph fn_gen_statement {
|
||||
labelloc="t";
|
||||
graph [fontname = "cc wild words"];
|
||||
node [fontname = "cc wild words"];
|
||||
edge [fontname = "cc wild words"];
|
||||
|
||||
label="fn_gen_statement(Vec<GazType>, return: GazType)";
|
||||
fontname=lovebeat;
|
||||
rankdir=LR;
|
||||
newrank=true;
|
||||
|
||||
a [label="can declare" rank=max];
|
||||
b [label="cannot declare" rank=min];
|
||||
c [label="gen_decl()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
d [label="gen_if_statement()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
e [label="gen_std_output()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
f [label="gen_loop()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
g [label="gen_assignment()" shape=diamond style=filled fillcolor=lightcoral];
|
||||
h [label="return" style=filled fillcolor=lightskyblue1];
|
||||
|
||||
a -> c -> a;
|
||||
a -> d;
|
||||
a -> e;
|
||||
a -> f;
|
||||
a -> g;
|
||||
a -> h;
|
||||
|
||||
b -> d -> b;
|
||||
b -> e -> b;
|
||||
b -> f -> b;
|
||||
b -> g -> b;
|
||||
b -> h;
|
||||
}
|
Loading…
Reference in a new issue