The bug where the minus operator changes behavior based on text length is very strange.
Especially with respect to comments as those characters aren't even being parsed.
This bug can't be repo'd in-editor for some reason, but definitely exists in the shipped game.
I'll continue to look into it.
The rainbow issue probably has something to do with how the remainder is computed to wrap the hue range between 0 and 360.
My bad, the default associativity of operators with the same precedence is right-to-left not left-to-right as it should be.
( 20 / 2 * 2 ) is compiled as
( 20 / (2 * 2) ) not
( (20 / 2) * 2 ).
Turns out this was insanely easy to fix: