aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-04-24 22:49:38 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-04-24 22:50:28 +0200
commit948228f0e250d191a97359e97faa6ee4934e9e7a (patch)
tree85f74f59663bd5d94dd56ce9659fb327069b308e
parent1410c98545d00c8508a715a566cf8e3e4e424773 (diff)
downloadtools.nes-948228f0e250d191a97359e97faa6ee4934e9e7a.tar.gz
tools.nes-948228f0e250d191a97359e97faa6ee4934e9e7a.zip
Allow scoped names in __fallthrough__
Fixes 4f1a9c660108 ("Add the .fallthrough control statement") Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
-rw-r--r--lib/xixanta/src/assembler.rs2
-rw-r--r--tests/expected/fallthrough.nesbin21 -> 22 bytes
-rw-r--r--tests/fallthrough.s10
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/xixanta/src/assembler.rs b/lib/xixanta/src/assembler.rs
index 614bee4..c9800d9 100644
--- a/lib/xixanta/src/assembler.rs
+++ b/lib/xixanta/src/assembler.rs
@@ -1114,7 +1114,7 @@ impl<'a> Assembler<'a> {
}
// If there is an argument, it has to be a valid address identifier.
- if let Err(message) = pn.node.value.is_valid_identifier(false) {
+ if let Err(message) = pn.node.value.is_valid_identifier(true) {
return Err(Error {
line: pn.node.value.line,
message,
diff --git a/tests/expected/fallthrough.nes b/tests/expected/fallthrough.nes
index 976f8fc..e155d18 100644
--- a/tests/expected/fallthrough.nes
+++ b/tests/expected/fallthrough.nes
Binary files differ
diff --git a/tests/fallthrough.s b/tests/fallthrough.s
index 2243415..878b5e4 100644
--- a/tests/fallthrough.s
+++ b/tests/fallthrough.s
@@ -22,4 +22,14 @@ __fallthrough__ bar
rts
.endproc
+.scope Scope
+ .proc foo
+ __fallthrough__ Scope::bar
+ .endproc
+
+ .proc bar
+ rts
+ .endproc
+.endscope
+
;;; asan:stack full