ShaderTools.Hlsl.Parser.HlslParser.CanStartGlobalDeclaration C# (CSharp) Method

CanStartGlobalDeclaration() private method

private CanStartGlobalDeclaration ( SyntaxKind kind ) : bool
kind SyntaxKind
return bool
        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;
            }
        }
HlslParser