charon_lib::ast::ullbc_ast

Type Alias ExprBody

source
pub type ExprBody = GExprBody<BodyContents>;

Aliased Type§

struct ExprBody {
    pub span: Span,
    pub locals: Locals,
    pub comments: Vec<(usize, Vec<String>)>,
    pub body: Vector<BlockId, BlockData>,
}

Fields§

§span: Span§locals: Locals

The local variables.

§comments: Vec<(usize, Vec<String>)>

For each line inside the body, we record any whole-line // comments found before it. They are added to statements in the late recover_body_comments pass.

§body: Vector<BlockId, BlockData>

Implementations§

source§

impl ExprBody

source

pub fn transform_sequences<F>(&mut self, f: &mut F)
where F: FnMut(&mut Locals, &mut [Statement]) -> Vec<(usize, Vec<Statement>)>,

source

pub fn visit_statements<F: FnMut(&mut Statement)>(&mut self, f: &mut F)

Apply a function to all the statements, in a bottom-up manner.