HLSL: Add 'class' keyword as (so far) synonym for 'struct'.

This commit is contained in:
John Kessenich
2017-03-03 17:01:01 -07:00
parent c18cae2145
commit 27ffb29908
5 changed files with 11 additions and 6 deletions

View File

@@ -327,6 +327,7 @@ void HlslScanContext::fillInKeywordMap()
(*KeywordMap)["RWStructuredBuffer"] = EHTokRWStructuredBuffer;
(*KeywordMap)["StructuredBuffer"] = EHTokStructuredBuffer;
(*KeywordMap)["class"] = EHTokClass;
(*KeywordMap)["struct"] = EHTokStruct;
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
(*KeywordMap)["tbuffer"] = EHTokTBuffer;
@@ -354,7 +355,6 @@ void HlslScanContext::fillInKeywordMap()
ReservedSet->insert("auto");
ReservedSet->insert("catch");
ReservedSet->insert("char");
ReservedSet->insert("class");
ReservedSet->insert("const_cast");
ReservedSet->insert("enum");
ReservedSet->insert("explicit");
@@ -740,6 +740,7 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier()
return keyword;
// variable, user type, ...
case EHTokClass:
case EHTokStruct:
case EHTokTypedef:
case EHTokCBuffer: