Generate flow from code

Node-RED creates code from a flow. Is there a way to generate flow from code? This would help me convert a teensy 3.1 routine to tennsy 4.0

Not as I understand it... Node-Red used JavaScript, and JavaScript is an interpreted, not compiled, language. So it basically runs through the code, that makes up each node, as it is needed.

More explanation on what you are saying might be needed here as the Teensy generally runs C++ not JavaScript.

Node red doesn't create code at all, node red is code.

I don't see how node red is related to the teensey boards at all.

Not sure if I understood your question, but in my understanding you want to generate a flow automatically. This for sure can be done, since a flow is basically a json file so, all you have to do is to generate this json file from a different software.
(btw, we do this for all our industrial applications)