Exemplo n.º 1
0
        /*-----------------------------------------------------------------------------------------------
        *
        *	Recursive Descent Parser Stuff :
        *
        *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        Node Expression(string leadingKeyword)
        {
            cs.Expect(leadingKeyword);

            if (cs.AcceptSpace())
            {
                return(Combination());
            }
            else
            {
                return(new Node(""));
            }
        }
Exemplo n.º 2
0
        /*-----------------------------------------------------------------------------------------------
        *
        *	Recursive Descent Parser Stuff :
        *
        *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        Node Expression(string leadingKeyword)
        {
            if (!string.IsNullOrEmpty(leadingKeyword))
            {
                cs.Expect(leadingKeyword);
            }

            if (cs.AcceptSpace())
            {
                return(Combination());
            }
            else
            {
                return(new Node(""));
            }
        }
Exemplo n.º 3
0
        /*-----------------------------------------------------------------------------------------------
        *
        *	Recursive Descent Parser Stuff :
        *
        *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        Node Expression(out Target target)
        {
            target = Target.None;
            if (cs.Accept("$pixel"))
            {
                target = Target.PixelShader;
            }
            if (cs.Accept("$vertex"))
            {
                target = Target.VertexShader;
            }
            if (cs.Accept("$geometry"))
            {
                target = Target.GeometryShader;
            }
            if (cs.Accept("$domain"))
            {
                target = Target.DomainShader;
            }
            if (cs.Accept("$hull"))
            {
                target = Target.HullShader;
            }
            if (cs.Accept("$compute"))
            {
                target = Target.ComputeShader;
            }

            if (target != Target.None)
            {
                if (cs.AcceptSpace())
                {
                    return(Combination());
                }
                else
                {
                    return(new Node(""));
                }
            }
            else
            {
                throw new BuildException("Bad shader type");
            }
        }