Refactor parse_and_execute (#3358)
* Refactor `parse_and_execute`
Adds a new function named `parse_and_prepare`, which prepares the environment and parses the command.
Contrary to `parse_and_execute`, `parse_and_prepare` returns a struct that permis the user to execute the command, as opposed to execute it itself.
`parse_and_execute` has been modified to use `parse_and_prepare` internally.
* Embed dispatch functions directly into run()
After the previous commit, we now have a lot of functions whose only one is to call other functions. And these other functions are called only from one location.
Let's merge these two for clarity.
* Deprecate parse_and_execute and replace it in node and node-template
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <[email protected]>
parent
087c3cf6
Please register or sign in to comment