Function brane_ast::traversals::metadata::do_traversal
source · pub fn do_traversal(
root: Program,
warnings: &mut Vec<AstWarning>,
) -> Result<Program, Vec<AstError>>
Expand description
Processes #[tag(...)]
/#[metadata(...)]
-annotations into annotations on various things in the AST.
The goal of this traversal is to populate metadata
-fields in various AST elements.
§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 annotation statements translated to annotations on structs.
§Errors
This pass may throw multiple AstError::MetadataError
s if the user made mistakes with their variable references.