RPGHacker / asar

(Now) official repository of the SNES assembler Asar, originally created by Alcaro
Other
201 stars 42 forks source link

assert (1 || 1) #329

Open Alcaro opened 1 month ago

Alcaro commented 1 month ago
[19:41:48]  <Sir Walrus> !rb as2
db (1 || 1)
[19:41:49]  <randombot999#8226> 01
[19:43:07]  <Sir Walrus> !rb as2
assert (1||1)
[19:43:07]  <randombot999#8226> (no output)
[19:41:44]  <Sir Walrus> !rb as2
assert (1 || 1)
[19:41:44]  <randombot999#8226> Errors occurred while assembling.
<input>:2: error: (Emismatched_parentheses): Mismatched parentheses.
    in block: [assert (1 || 1)]

maybe that should work

probably best implemented by simply deleting the && and || handling e: apparently not. Probably still easy though.

randomdude999 commented 1 month ago

assembleblock does a qpsplit(word[-1], ",") in order to check whether the optional argument was given. should be demoted to qsplit i think?? or actually, should join all arguments together and then qpsplit that. i think the if-expression-evaulator already does that