Beispiel #1
0
        AbstractNode VarDeclarationWithSemanticNamesParse(Queue <LexerNode> lexers, DefinitionObjectNode parent)
        {
            var variable = VarDeclarationParse(lexers);

            if (lexers.Any())
            {
                var op = lexers.Peek();
                switch (op.Value)
                {
                case ShaderSyntaxInfo.Colon:     // ==== examples ====
                                                 //float4 c	: COLOR0;
                                                 // ==== ++++++++ ==== //
                    var svd = new VariableDefinitionWitSemanticName {
                        Parent = parent
                    };
                    svd.VarDeclaration = variable;
                    using (lexers.Boundary(ShaderSyntaxInfo.Colon, ShaderSyntaxInfo.Semicolon)) {
                        svd.SemanticNameLex = lexers.Dequeue();
                    }
                    svd.Parent = parent;
                    return(svd);
                }
            }
            variable.Parent = parent;
            return(variable);
        }
Beispiel #2
0
 public void Visit(VariableDefinitionWitSemanticName svd)
 {
     svd.VarDeclaration.Handle(this);
     ApplyForegroundValue(svd.SemanticNameLex, SemanticNameBrush);
 }
Beispiel #3
0
 public void Visit(VariableDefinitionWitSemanticName definitionObjectNode)
 {
 }