pub fn find(db: &dyn crate::Db, filename: Filename, position: LineColumn) -> Option<Breakpoint> {
    let offset = dada_ir::lines::offset(db, filename, position);

    let item = find_item(db, filename, offset)?;
    let code = item.code(db)?;
    let syntax_tree = code.syntax_tree(db);
    let cusp_expr = find_syntax_expr(db, syntax_tree, offset);
    Some(Breakpoint {
        item,
        code,
        expr: cusp_expr,
    })
}
/// Given a cursor position, finds the breakpoint associated with that cursor
/// (if any). This is the expression that the cursor is on.
Given a cursor position, finds the breakpoint associated with that cursor
(if any). This is the expression that the cursor is on.
Given a cursor position finds the breakpoint associated with that cursor ( if any ) . This is the expression that the cursor is on .
pub fn find(db: &dyn crate::Db, filename: Filename, position: LineColumn) -> Option<Breakpoint> {
    let offset = dada_ir::lines::offset(db, filename, position);
    let item = find_item(db, filename, offset)?;
    let code = item.code(db)?;
    let syntax_tree = code.syntax_tree(db);
    let cusp_expr = find_syntax_expr(db, syntax_tree, offset);
    Some(Breakpoint {
        item,
        code,
        expr: cusp_expr,
    })
}
pub fn find ( db : & dyn crate :: Db , filename : Filename , position : LineColumn ) -> Option < Breakpoint > { let offset = dada_ir :: lines :: offset ( db , filename , position ) ; let item = find_item ( db , filename , offset ) ? ; let code = item . code ( db ) ? ; let syntax_tree = code . syntax_tree ( db ) ; let cusp_expr = find_syntax_expr ( db , syntax_tree , offset ) ; Some ( Breakpoint { item , code , expr : cusp_expr , } ) }
Given a cursor position, finds the breakpoint associated with that cursor
(if any).
Given a cursor position finds the breakpoint associated with that cursor ( if any ) .
db
&dyn crate::Db
filename
Filename
position
LineColumn
db
&dyn crate::Db
filename
Filename
position
LineColumn