aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/assembler.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-03 19:02:33 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-03 19:02:33 +0100
commit15cb0fb33aca361848c9f64b3ac54166768527bd (patch)
treeca8f2b1e336ce96e9e6806bce0dce14e419c29c1 /lib/xixanta/src/assembler.rs
parent42eea452eabf2c603e5f50731ba89f08e3dd81bd (diff)
downloadtools.nes-15cb0fb33aca361848c9f64b3ac54166768527bd.tar.gz
tools.nes-15cb0fb33aca361848c9f64b3ac54166768527bd.zip
Make the fallthrough error more explicit
Add the target and effective addresses into the message, so it's more clear how different they are. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/assembler.rs')
-rw-r--r--lib/xixanta/src/assembler.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/xixanta/src/assembler.rs b/lib/xixanta/src/assembler.rs
index 136d416..326d97a 100644
--- a/lib/xixanta/src/assembler.rs
+++ b/lib/xixanta/src/assembler.rs
@@ -1057,7 +1057,10 @@ impl<'a> Assembler<'a> {
if effective.address != target_address {
return Err(Error {
line: pn.node.value.line,
- message: String::from("statement does not fall through"),
+ message: format!(
+ "statement expects to progress on '{}' (${:04X}), but the next address is ${:04X}",
+ pn.node.value.value, target_address, effective.address,
+ ),
source: self.source_for(&pn.node),
expanded_from: pn.macro_context.clone(),
global: false,