Conversation
|
This is a cool idea. I am unable to try the result. I get the following errors when trying on my own code: and I just did a quick try, I will see if I can look at it a bit more later and see why it does that, but maybe you will have an idea. |
|
The crash should have been fixed (you probably assigned the fsm to a struct var, and my test data only assigned to local or global vars). The code would probably generate a wrong flowchart if 2 fsms are stored in the same struct, I'll try to fix it. |
|
As far as output is concerned, we could :
When scanning a markdown file, we could look for the flowchart name and add/replace the mermaid block below. The flowchart name is currently either |
|
We could also add |
|
Ok, this is working now. Pretty cool. I like the idea of using The way I would plan to use this tool is part of a The only bit in my previous PR that could be of interest to you is how the in place replacement for the graph was done, but that's not really a complex things. So if you are ok with that, I will close that PR. |
This is a wip command to generate a mermaid flowchart from a FSM.
The final command might be different, this command is for evaluation purposes.
TODO
//fsm:comment//fsm:comment