tmedwards / sugarcube-2

SugarCube is a free (gratis and libre) story format for Twine/Twee.
https://www.motoslave.net/sugarcube/2/
BSD 2-Clause "Simplified" License
177 stars 41 forks source link

Reconsider `is not` → `isnot` mapping #254

Closed tmedwards closed 1 year ago

tmedwards commented 1 year ago

The TwineScript desugarer currently maps an is not token sequence into the isnot token.

This mapping has been in the desugarer since time immemorial and was done in an attempt to help end users. Code comment:

If the token is is, check to see if it's followed by not, if so, convert them into the isnot operator.

NOTE: This is a safety feature, since $a is not $b probably sounds reasonable to most users.

The mapping means that actual attempts in TwineScript to do is not are doomed to failure. Though, I'm unsure how plausible it is that anyone would attempt something like that.

Still, the mapping needs to either be documented or removed. I'm partial to the latter, because screw weird special cases.

tmedwards commented 1 year ago

Resolved by commit ea4142e.