示例#1
0
 public static Doc Print(ClassOrStructConstraintSyntax node)
 {
     return(Doc.Concat(
                Token.Print(node.ClassOrStructKeyword),
                Token.Print(node.QuestionToken)
                ));
 }
 private Doc PrintClassOrStructConstraintSyntax(
     ClassOrStructConstraintSyntax node)
 {
     return(Concat(
                this.PrintSyntaxToken(node.ClassOrStructKeyword),
                this.PrintSyntaxToken(node.QuestionToken)
                ));
 }
示例#3
0
        public override void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
        {
            if (!PreVisit(node))
            {
                return;
            }

            base.VisitClassOrStructConstraint(node);

            PostVisit(node);
        }
示例#4
0
        public void Visit(ClassOrStructConstraintSyntax syntaxNode)
        {
            var namespaceNode = syntaxNode.Parent as NamespaceDeclarationSyntax;

            if (namespaceNode == null)
            {
                namespaceNode = syntaxNode.Parent.Parent as NamespaceDeclarationSyntax;
            }

            //var key = namespaceNode.Name.ToString() + "." + node.Identifier.Text;
            //Register(EnumNodeKind.Class, key, node.Identifier.Text);
            //Relate(namespaceNode.Name.ToString(), key, EnumRelated.DefinedIn);
            //Visit(FilePath, namespaceNode);
            //Visit(key, node.Members);
        }
示例#5
0
 public static ClassOrStructConstraintSyntax WithQuestionToken(this ClassOrStructConstraintSyntax syntax, SyntaxToken questionToken)
 {
     return(WithQuestionTokenAccessor(syntax, questionToken));
 }
示例#6
0
 public static SyntaxToken QuestionToken(this ClassOrStructConstraintSyntax syntax)
 {
     return(QuestionTokenAccessor(syntax));
 }
示例#7
0
 public override void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     throw new NotImplementedException();
 }
 public virtual void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     DefaultVisit(node);
 }
示例#9
0
 public override void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax nodeSyntax)
 {
     CodeVisitor.Visit(nodeSyntax);
     base.VisitClassOrStructConstraint(nodeSyntax);
 }
        //public override void VisitCatchFilterClause(CatchFilterClauseSyntax node)
        //{
        //    base.VisitCatchFilterClause(node);
        //}

        //public override void VisitCheckedExpression(CheckedExpressionSyntax node)
        //{
        //    base.VisitCheckedExpression(node);
        //}

        //public override void VisitCheckedStatement(CheckedStatementSyntax node)
        //{
        //    base.VisitCheckedStatement(node);
        //}

        //public override void VisitClassDeclaration(ClassDeclarationSyntax node)
        //{
        //    base.VisitClassDeclaration(node);
        //}

        public override void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
        {
            Debug.Fail(node.ToString());
            base.VisitClassOrStructConstraint(node);
        }
        /*public void Accept(IReflectionVisitor visitor)
         * {
         *  visitor.VisitGenericParameterDeclarationWithCodeAnalysis(this);
         * }
         *
         * public void AcceptChildren(IReflectionVisitor visitor)
         * {
         *  AcceptChildren(new ForwardingGenericVisitor(visitor));
         * }*/

        private static GenericParameterTypeConstraint?ToTypeConstraint(ClassOrStructConstraintSyntax syntax)
        {
            return(syntax.ClassOrStructKeyword.Kind() == SyntaxKind.ClassKeyword ?
                   GenericParameterTypeConstraint.Class :
                   GenericParameterTypeConstraint.Struct);
        }
 public TameClassOrStructConstraintSyntax(ClassOrStructConstraintSyntax node)
 {
     Node = node;
     AddChildren();
 }
 public override SyntaxNode VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     node = (ClassOrStructConstraintSyntax)base.VisitClassOrStructConstraint(node);
     Classes.Add(node);
     return(node);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="node"></param>
 public override sealed void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     this.OnNodeVisited(node, this.type.IsInstanceOfType(node));
     base.VisitClassOrStructConstraint(node);
 }
示例#15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="node"></param>
 public override sealed void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     this.OnNodeVisited(node);
     if (!this.traverseRootOnly) base.VisitClassOrStructConstraint(node);
 }
示例#16
0
 public override void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     base.VisitClassOrStructConstraint(node);
 }
示例#17
0
        public void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
        {
            if (node == null)
                throw new ArgumentNullException("node");

            node.Validate();

            switch (node.Kind)
            {
                case ClassOrStruct.Class: _writer.WriteKeyword(PrinterKeyword.Class); break;
                case ClassOrStruct.Struct: _writer.WriteKeyword(PrinterKeyword.Struct); break;
            }
        }
示例#18
0
        public static ClassOrStructConstraintSyntax ClassOrStructConstraint(ClassOrStruct kind = default(ClassOrStruct))
        {
            var result = new ClassOrStructConstraintSyntax();

            result.Kind = kind;

            return result;
        }
示例#19
0
 public ClassOrStructConstraintTranslation(ClassOrStructConstraintSyntax syntax, SyntaxTranslation parent) : base(syntax, parent)
 {
 }
        public ClassOrStructConstraintTranslation(ClassOrStructConstraintSyntax syntax, SyntaxTranslation parent) : base(syntax, parent)
        {

        }
示例#21
0
 public override Evaluation VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node)
 {
     return(base.VisitClassOrStructConstraint(node));
 }
 //
 // Summary:
 //     Called when the visitor visits a ClassOrStructConstraintSyntax node.
 public virtual void VisitClassOrStructConstraint(ClassOrStructConstraintSyntax node);