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

ParseStatement() public method

public ParseStatement ( ) : StatementSyntax
return ShaderTools.Hlsl.Syntax.StatementSyntax
        public StatementSyntax ParseStatement()
        {
            var current = _tokenIndex;

            // First, try to parse as a non-declaration statement. If the statement is a single
            // expression then we only allow legal expression statements. (That is, "new C();",
            // "C();", "x = y;" and so on.)
            var result = ParseStatementNoDeclaration();
            if (result != null && current != _tokenIndex)
                return result;

            // If that failed, parse as a declaration.
            return ParseDeclarationStatement();
        }
HlslParser