-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #169: fix issues related to propagation of errors
- Loading branch information
Showing
6 changed files
with
51 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#subruledef subtest | ||
{ | ||
{x: s32} => | ||
{ | ||
assert(x > 0) | ||
assert(x < 10) | ||
x | ||
} | ||
} | ||
#ruledef test | ||
{ | ||
test {s: s32} => s | ||
testasm {a: subtest} => asm{test {a}} | ||
} | ||
|
||
testasm 121 ; error: failed / note:_:13: within / note:_:3: within / error:_:6: assertion |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#subruledef cpu6502_reladdr | ||
{ | ||
{addr: u16} => | ||
{ | ||
reladdr = addr - $ - 2 | ||
assert(reladdr <= 0x7f) | ||
assert(reladdr >= !0x7f) | ||
reladdr`8 | ||
} | ||
} | ||
|
||
#ruledef cpu6502 | ||
{ | ||
bcc {addr: cpu6502_reladdr} => 0x90 @ addr | ||
} | ||
|
||
#ruledef cpu6502_macro | ||
{ | ||
bccmacro {addr: cpu6502_reladdr} => asm{bcc {addr}} | ||
} | ||
|
||
bcc 120 | ||
bccmacro 16384 ; error: failed / note:_:19: within / note:_:3: within / error:_:6: assertion | ||
bcc 120 |