Function brane_ast::traversals::compile::do_traversal
source · pub fn do_traversal(
state: &CompileState,
root: Program,
warnings: &mut Vec<AstWarning>,
) -> Result<UnresolvedWorkflow, Vec<AstError>>
Expand description
Compiles the given brane-dsl
AST into a brane-ast
AST.
Note that the symbol tables must already have been constructed, as well as type analysis and location analysis.
§Arguments
root
: The root node of the tree on which this compiler pass will be done.warnings
: A list that will collect any warnings during compilation. If it’s empty, then it may be assumed for warnings occurred.
§Returns
A new Workflow that contains the compiled program. However, its inter-edge links will still have to be resolved.
§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 Program is still ill-formed.