HLSL: Add EHTokStringConstant, so that string attributes may be parsed
This commit is contained in:
parent
b9e39120b4
commit
efe9724795
6 changed files with 123 additions and 1 deletions
|
|
@ -747,7 +747,12 @@ const char* TPpContext::tokenize(TPpToken* ppToken)
|
|||
tokenString = ppToken->name;
|
||||
break;
|
||||
case PpAtomConstString:
|
||||
parseContext.ppError(ppToken->loc, "string literals not supported", "\"\"", "");
|
||||
if (parseContext.intermediate.getSource() == EShSourceHlsl) {
|
||||
// HLSL allows string literals.
|
||||
tokenString = ppToken->name;
|
||||
} else {
|
||||
parseContext.ppError(ppToken->loc, "string literals not supported", "\"\"", "");
|
||||
}
|
||||
break;
|
||||
case '\'':
|
||||
parseContext.ppError(ppToken->loc, "character literals not supported", "\'", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue