(&self, _obj: &Object, resolved: ResolvedInstructionRef)
| 409 | } |
| 410 | |
| 411 | fn instruction_hover(&self, _obj: &Object, resolved: ResolvedInstructionRef) -> Vec<HoverItem> { |
| 412 | let Ok(ins) = self.parse_ins_ref(resolved) else { |
| 413 | return Vec::new(); |
| 414 | }; |
| 415 | let orig = ins.basic().to_string(); |
| 416 | let simplified = ins.simplified().to_string(); |
| 417 | let show_orig = orig != simplified; |
| 418 | let rlwinm_decoded = rlwinmdec::decode(&orig); |
| 419 | let mut out = Vec::with_capacity(2); |
| 420 | if show_orig { |
| 421 | out.push(HoverItem::Text { |
| 422 | label: "Original".into(), |
| 423 | value: orig, |
| 424 | color: HoverItemColor::Normal, |
| 425 | }); |
| 426 | } |
| 427 | if let Some(decoded) = rlwinm_decoded { |
| 428 | for line in decoded.lines() { |
| 429 | out.push(HoverItem::Text { |
| 430 | label: Default::default(), |
| 431 | value: line.to_string(), |
| 432 | color: HoverItemColor::Special, |
| 433 | }); |
| 434 | } |
| 435 | } |
| 436 | out |
| 437 | } |
| 438 | |
| 439 | fn instruction_context( |
| 440 | &self, |
no test coverage detected