Open Archaegeo opened 3 years ago
Follow up, this level of compression runs in game ifothenw=:w1 ifsthen:w1=tendelsew=:w2 ifsthen:w2=tendendgotoe
The first example seems to be a duplicate of #84 . Statements on one line should usually be seperated by spaces, except when not. This could theoretically be "fixed", but it would be such a dirty hack, that I am not sure if I really want to fix it.
Are you really sure about the second one? I tested the whole space-requirement thing pretty thoroughly and came to the conclusion that "and" and "or" need to be surrounded by non-identifier characters (spaces, parenthesis etc.).
Your third snippet looks really horrible. I had to read it like 5 times to understand what is going on... The issue here are things like "othen". The tokenizer has no chance to decide if this is a variable, or actually "o then". To do this it would need context-sensitive parsing, like the game does it. But something I really don't want to do. Thats just evil and pure madness.
This is live code running that works, shrug, just providing the feedback. https://github.com/Archaegeo/Starbase/blob/main/ISAN-Waypoint%20System/30WPIncrement.yolol
VSCode interface shows this as erroneous code but it works fine in game
endendgotoe
(thats end end goto e)Also shows
andn
in(n>0andn<=a)
as error but it works fine.(BTW, thanks for the awesome tool)