Get the instruction corresponding to the current position, if any.
(&self)
| 231 | |
| 232 | /// Get the instruction corresponding to the current position, if any. |
| 233 | fn current_inst(&self) -> Option<ir::Inst> { |
| 234 | use self::CursorPosition::*; |
| 235 | match self.position() { |
| 236 | At(inst) => Some(inst), |
| 237 | _ => None, |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | /// Go to the position after a specific instruction, which must be inserted |
| 242 | /// in the layout. New instructions will be inserted after `inst`. |
no test coverage detected