pub struct FlowGraphBuilder<'a> { /* private fields */ }Expand description
Builder for constructing a FlowGraph from Node AST.
The FlowGraphBuilder traverses the AST post-binding and constructs
the control flow graph without mutating the AST nodes.
Implementations§
Source§impl<'a> FlowGraphBuilder<'a>
impl<'a> FlowGraphBuilder<'a>
Sourcepub fn build_source_file(&mut self, statements: &NodeList) -> &FlowGraph
pub fn build_source_file(&mut self, statements: &NodeList) -> &FlowGraph
Build the flow graph for a source file.
Sourcepub fn build_flow_graph(&mut self, statements: &NodeList) -> &FlowGraph
pub fn build_flow_graph(&mut self, statements: &NodeList) -> &FlowGraph
Build the flow graph for a list of statements.
This is a general entry point that can be used for:
- Source files
- Function bodies
- Block statements
- Any list of statements
This is an alias for build_source_file() but with a more general name.
Sourcepub fn build_function_body(&mut self, body: &BlockData) -> &FlowGraph
pub fn build_function_body(&mut self, body: &BlockData) -> &FlowGraph
Sourcepub fn build_block(&mut self, block: &BlockData)
pub fn build_block(&mut self, block: &BlockData)
Build flow graph for a block.
Entry point for building flow graphs for block statements. Processes all statements in the block sequentially.
§Arguments
block- The block statement to build flow graph for
Sourcepub fn into_graph(self) -> FlowGraph
pub fn into_graph(self) -> FlowGraph
Consume the builder and return the flow graph.
Auto Trait Implementations§
impl<'a> Freeze for FlowGraphBuilder<'a>
impl<'a> RefUnwindSafe for FlowGraphBuilder<'a>
impl<'a> Send for FlowGraphBuilder<'a>
impl<'a> Sync for FlowGraphBuilder<'a>
impl<'a> Unpin for FlowGraphBuilder<'a>
impl<'a> UnsafeUnpin for FlowGraphBuilder<'a>
impl<'a> UnwindSafe for FlowGraphBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more