Function brane_ast::traversals::workflow_resolve::do_traversal
source · pub fn do_traversal(
state: &mut CompileState,
root: UnresolvedWorkflow,
) -> Result<Workflow, Vec<AstError>>
Expand description
Compiles the given UnresolvedWorkflow to a ResolvedWorkflow.
Note that the unresolved workflow already has to be compiled, obviously.
§Arguments
state
: The CompileState that contains function bodies of previously defined functions (definitions are already implicitly transferred from the symbol table).root
: The root node of the tree on which this compiler pass will be done.
§Returns
A new Workflow that contains the compiled program, ready for execution.
§Errors
This pass doesn’t error, but might return one for convention purposes.
§Panics
This function may panic if any of the previous passes did not do its job, and the given UnresolvedWorkflow is ill-formed.