summaryrefslogtreecommitdiff
path: root/rust/src/disassembly.rs
diff options
context:
space:
mode:
authorBrandon Miller <brandon@vector35.com>2025-08-06 16:10:02 -0400
committerBrandon Miller <brandon@vector35.com>2025-09-29 07:07:41 -0400
commit0bc967cf0f873a27dca1e7f3a723a0c53db9a68f (patch)
treed12314f5959e205d605fb6751ef49a79b8db0696 /rust/src/disassembly.rs
parent604a22a0050c000ed4d142589c9ce0e34ee7b570 (diff)
Add a new line disassembly text token
Diffstat (limited to 'rust/src/disassembly.rs')
-rw-r--r--rust/src/disassembly.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/src/disassembly.rs b/rust/src/disassembly.rs
index c1021197..ed9b0854 100644
--- a/rust/src/disassembly.rs
+++ b/rust/src/disassembly.rs
@@ -545,6 +545,10 @@ pub enum InstructionTextTokenKind {
// TODO: Explain what this is
hash: Option<u64>,
},
+ NewLine {
+ // Offset into instruction that this new line is associated with
+ value: u64,
+ },
}
impl InstructionTextTokenKind {
@@ -721,6 +725,7 @@ impl InstructionTextTokenKind {
},
}
}
+ BNInstructionTextTokenType::NewLineToken => Self::NewLine { value: value.value },
}
}
@@ -756,6 +761,7 @@ impl InstructionTextTokenKind {
InstructionTextTokenKind::ExternalSymbol { value, .. } => Some(*value),
InstructionTextTokenKind::StackVariable { variable_id, .. } => Some(*variable_id),
InstructionTextTokenKind::CollapseStateIndicator { hash, .. } => *hash,
+ InstructionTextTokenKind::NewLine { value, .. } => Some(*value),
_ => None,
}
}
@@ -925,6 +931,7 @@ impl From<InstructionTextTokenKind> for BNInstructionTextTokenType {
InstructionTextTokenKind::CollapseStateIndicator { .. } => {
BNInstructionTextTokenType::CollapseStateIndicatorToken
}
+ InstructionTextTokenKind::NewLine { .. } => BNInstructionTextTokenType::NewLineToken,
}
}
}