private bool CanStartGlobalDeclaration(SyntaxKind kind)
{
switch (kind)
{
case SyntaxKind.CBufferKeyword:
case SyntaxKind.ClassKeyword:
case SyntaxKind.InterfaceKeyword:
case SyntaxKind.NamespaceKeyword:
case SyntaxKind.StructKeyword:
case SyntaxKind.TBufferKeyword:
case SyntaxKind.TechniqueKeyword:
case SyntaxKind.Technique10Keyword:
case SyntaxKind.Technique11Keyword:
return true;
default:
if (IsPossibleDeclarationStatement())
return true;
if (IsPossibleFunctionDeclaration())
return true;
return false;
}
}