yodk icon indicating copy to clipboard operation
yodk copied to clipboard

VSCode shows error when its not

Open Archaegeo opened this issue 2 years ago • 3 comments

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)

Archaegeo avatar Sep 08 '21 02:09 Archaegeo

Follow up, this level of compression runs in game ifothenw=:w1 ifsthen:w1=tendelsew=:w2 ifsthen:w2=tendendgotoe

Archaegeo avatar Sep 08 '21 02:09 Archaegeo

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.

dbaumgarten avatar Sep 08 '21 08:09 dbaumgarten

This is live code running that works, shrug, just providing the feedback. https://github.com/Archaegeo/Starbase/blob/main/ISAN-Waypoint%20System/30WPIncrement.yolol

Archaegeo avatar Sep 08 '21 20:09 Archaegeo