mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 12:00:38 +00:00
Don't emit whitespace when stringifying TOKEN_WHITE.
Other aspects of the preprocessor already skip whitespace leading up to a token. The only situation in which a TOKEN_WHITE can exist as part of the token stream during stringification, is when the whitespace is trailing after a token. This is situation is really only possible in the context of a macro argument. This behaviour is inconsistent. Consider the following FOO( space_before) FOO(space_after ) The former will reduce to "space_before" since the preprocessor will skip whitespace leading up to the token `space_before', while the latter will reduce to "space_after ". The C preprocessor doesn't preserve whitespace, so we won't either. This doesn't break any existing code.
This commit is contained in:
parent
ab841b94f7
commit
103e549615
1 changed files with 2 additions and 2 deletions
4
ftepp.c
4
ftepp.c
|
@ -703,9 +703,9 @@ static void ftepp_stringify_token(ftepp_t *ftepp, pptoken *token)
|
|||
++ch;
|
||||
}
|
||||
break;
|
||||
case TOKEN_WHITE:
|
||||
/*case TOKEN_WHITE:
|
||||
ftepp_out(ftepp, " ", false);
|
||||
break;
|
||||
break;*/
|
||||
case TOKEN_EOL:
|
||||
ftepp_out(ftepp, "\\n", false);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue