Function brane_ast::traversals::location::do_traversal
source · pub fn do_traversal(root: Program) -> Result<Program, Vec<AstError>>
Expand description
Resolves typing in the given brane-dsl
AST.
Note that the symbol tables must already have been constructed.
This effectively resolves all unresolved types in the symbol tables and verifies everything is compatible. Additionally, it may also insert implicit type casts where able.
§Arguments
root
: The root node of the tree on which this compiler pass will be done.
§Returns
The same nodes as went in, but now with no unresolved types.
§Errors
This pass may throw multiple AstError::ResolveError
s if the user made mistakes with their variable references.