HLSL: cbuffer and tbuffer grammar and production.

This commit is contained in:
John Kessenich
2016-07-25 16:05:33 -06:00
parent b8d2a006d1
commit 3d157c510f
9 changed files with 268 additions and 46 deletions

View File

@@ -258,6 +258,8 @@ void HlslScanContext::fillInKeywordMap()
(*KeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray;
(*KeywordMap)["struct"] = EHTokStruct;
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
(*KeywordMap)["tbuffer"] = EHTokTBuffer;
(*KeywordMap)["typedef"] = EHTokTypedef;
(*KeywordMap)["true"] = EHTokBoolConstant;
@@ -574,6 +576,9 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier()
// variable, user type, ...
case EHTokStruct:
case EHTokTypedef:
case EHTokCBuffer:
case EHTokTBuffer:
return keyword;
case EHTokBoolConstant:
if (strcmp("true", tokenText) == 0)