HLSL: fix preprocessor concatenation behaviour.

Fix #772.
This commit is contained in:
xavier 2017-08-24 08:28:57 +02:00
parent 82e95a3aa5
commit eb71cdd5bb
6 changed files with 580 additions and 0 deletions

View file

@ -1068,6 +1068,10 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
pasting = true;
}
// HLSL does expand macros before concatenation
if (pasting && pp->parseContext.isReadingHLSL())
pasting = false;
// TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding
if (token == PpAtomIdentifier) {
int i;