Exemple #1
0
 public void Visit(GenericTypeNode gtn)
 {
     if (gtn.ModificationLex != null)
     {
         ApplyForegroundValue(gtn.ModificationLex, KeywordBrush);
     }
     ApplyForegroundValue(gtn.TypeLex, KeywordBrush);
     ApplyForegroundValue(gtn.TTypeLex,
                          syntax.AllKeys.Is(gtn.TTypeLex.Value) ?
                          KeywordBrush : NewKeywordsNameBrush);
 }
Exemple #2
0
        TypeNode TypeParse(Queue <LexerNode> lexers)
        {
            TypeNode typen = new DatatypeNode();

            var lex = lexers.Dequeue();

            if (syntax.Modifications.Is(lex.Value))
            {
                typen.ModificationLex = lex;
                lex = lexers.Dequeue();
            }

            if (syntax.Array.Contains(lex.Value))
            {
                typen = new ArrayType {
                    ModificationLex = typen.ModificationLex
                };
            }
            else if (syntax.Primitive.Contains(lex.Value))
            {
                typen = new PrimitiveType {
                    ModificationLex = typen.ModificationLex
                };
            }
            else if (syntax.Generics.Is(lex.Value))
            {
                //seaching generic type T
                using (lexers.Boundary("<", ">")) {
                    var mod = typen.ModificationLex;
                    typen = new GenericTypeNode()
                    {
                        ModificationLex = mod,
                        TTypeLex        = lexers.Dequeue(),
                    };
                }
            }
            typen.TypeLex = lex;
            return(typen);
        }
Exemple #3
0
 public void Visit(GenericTypeNode typeNode)
 {
 }