-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix symbol prefixing bug triggered by certain usage of %option no_sym…
…bol_prefixing
- Loading branch information
Showing
5 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,23 @@ | ||
%import textio | ||
%option no_sysinit | ||
%zeropage basicsafe | ||
; scoping bug: | ||
|
||
main { | ||
const ubyte VALUE = 123 | ||
|
||
sub start() { | ||
uword @shared @nozp location = $4000 | ||
|
||
@($3fff) = 55 | ||
@($4000) = 56 | ||
@($4001) = 57 | ||
|
||
txt.print_ub(@($3fff)) | ||
txt.spc() | ||
txt.print_ub(@($4000)) | ||
txt.spc() | ||
txt.print_ub(@($4001)) | ||
txt.nl() | ||
|
||
for location in $4000 to $4002 { | ||
@(location-1) = VALUE | ||
txt.print_ub(@($3fff)) | ||
txt.spc() | ||
txt.print_ub(@($4000)) | ||
txt.spc() | ||
txt.print_ub(@($4001)) | ||
txt.nl() | ||
} | ||
thing.routine() | ||
} | ||
} | ||
|
||
|
||
/** TODO scoping bug | ||
; scoping bug: | ||
main { | ||
thing { | ||
%option no_symbol_prefixing | ||
|
||
sub start() { | ||
sub routine() { | ||
other.something() | ||
other.counter++ | ||
} | ||
} | ||
|
||
other { | ||
sub something() { | ||
} | ||
|
||
uword @shared counter | ||
} | ||
**/ |