diff options
| -rw-r--r-- | lib/xixanta/src/assembler.rs | 5 | ||||
| -rw-r--r-- | tests/expected/bad_fallthrough.txt | 6 |
2 files changed, 7 insertions, 4 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, diff --git a/tests/expected/bad_fallthrough.txt b/tests/expected/bad_fallthrough.txt index f105880..2ee8b52 100644 --- a/tests/expected/bad_fallthrough.txt +++ b/tests/expected/bad_fallthrough.txt @@ -1,4 +1,4 @@ -error: statement does not fall through (bad_fallthrough.s: line 11) -error: statement does not fall through (bad_fallthrough.s: line 14) -error: statement does not fall through (bad_fallthrough.s: line 15) +error: statement expects to progress on 'bar' ($8004), but the next address is $8002 (bad_fallthrough.s: line 11) +error: statement expects to progress on 'bar' ($8004), but the next address is $8002 (bad_fallthrough.s: line 14) +error: statement expects to progress on 'other' ($8006), but the next address is $8002 (bad_fallthrough.s: line 15) error: statement does not fall through (bad_fallthrough.s: line 27) |
