Whitespace prevents a macro from being recognized.
This applies to de0b016484a68f8f752da82755522bfe07b58261
When trying to compile vgstation13-coders/vgstation13, I encountered the following error:
Error at code\modules\mob\living\say.dm:474:17: Type /mob/living does not have a proc named "isborer"
The lines at that location are:
473 if(isborer(M) || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
474 if(isborer (M)) //for borers that are IN CONTROL
475 B = M //why it no typecast
476 if(B.controlling)
477 M = B.host
isborer is defined as:
#define isborer(A) istype(A, /mob/living/simple_animal/borer)
isborerin line 473 works fine but it causes an error in line 474, seemingly because of the whitespace.
Would trimming/ignoring all whitespace after the first non-whitespace character in a line be a valid way to fix this?
I hate that this compiles in BYOND.
Would trimming/ignoring all whitespace after the first non-whitespace character in a line be a valid way to fix this?
No. Whitespace has meaning even past the indentation, such as in a.b.c expressions. Having whitespace between the periods there should error.
This error doesn't occur anymore as of recently, I think it might have been fixed.
Edit: nevermind, it's still present.
I can still reproduce this error with this test case:
#define TEST(A) world.log << A
/world/New()
..()
TEST (1)
should this even be fixed for parity reasons? I think it's worth breaking here
Honestly IMO this is an acceptable breaking change, yeah. BYOND shouldn't allow this to begin with and it's apparently quite a rare occurrence because it hasn't come up before.
I'm leaning towards fixing this since the C preprocessor has this same behavior.