Function brane_ast::traversals::offset::do_traversal
source · pub fn do_traversal(
root: Program,
state: &CompileState,
) -> Result<Program, Vec<AstError>>
Expand description
Fixes offsets in the AST to be relative to the entire source instead of just this snippet.
§Arguments
root
: The root node of the tree on which this compiler pass will be done.state
: TheCompileState
containing the offset to offset with.
§Returns
The same nodes as went in, but now with annotation statements translated to annotations on structs.
§Errors
This pass cannot error.