summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-08-22 15:11:38 -0700
committeriximeow <me@iximeow.net>2021-08-22 15:12:53 -0700
commit7b994612e4cf90c9c8669cdab4def7d0777a0f48 (patch)
tree4215fae1f70c7976eb7b154afbebc6b34a81ce10 /src/lib.rs
parent35e325a7246d61d184b0336a89370d638bea0a81 (diff)
support field annotations in decoding using yaxpeax-arch=0.2.7HEAD0.1.1no-gods-no-
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ea83289..c700094 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,7 +8,7 @@ extern crate serde;
extern crate yaxpeax_arch;
use yaxpeax_arch::{Arch, AddressDiff, Decoder, LengthedInstruction, Reader, StandardDecodeError, U16le};
-use yaxpeax_arch::{AnnotatingDecoder, DescriptionSink, NullSink};
+use yaxpeax_arch::annotation::{AnnotatingDecoder, DescriptionSink, NullSink};
mod display;
pub use display::NoContext;
@@ -197,6 +197,15 @@ pub struct MSP430FieldDescription {
id: u32,
}
+impl yaxpeax_arch::annotation::FieldDescription for MSP430FieldDescription {
+ fn id(&self) -> u32 {
+ self.id
+ }
+ fn is_separator(&self) -> bool {
+ false
+ }
+}
+
#[derive(Clone, PartialEq, Eq)]
pub enum MSP430Field {
Opcode(Opcode),