Get the block corresponding to the current position.
(&self)
| 221 | |
| 222 | /// Get the block corresponding to the current position. |
| 223 | fn current_block(&self) -> Option<ir::Block> { |
| 224 | use self::CursorPosition::*; |
| 225 | match self.position() { |
| 226 | Nowhere => None, |
| 227 | At(inst) => self.layout().inst_block(inst), |
| 228 | Before(block) | After(block) => Some(block), |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | /// Get the instruction corresponding to the current position, if any. |
| 233 | fn current_inst(&self) -> Option<ir::Inst> { |
no test coverage detected