Exemple #1
0
 public ElseSyntax(IfSyntax pIf, BlockSyntax pBlock)
 {
     If   = pIf;
     Body = pBlock;
     if (If != null)
     {
         If.Parent = this;
     }
     if (Body != null)
     {
         Body.Parent = this;
     }
 }
Exemple #2
0
 public virtual void Visit(IfSyntax pNode)
 {
     pNode.Condition.Accept(this);
     pNode.Body.Accept(this);
     pNode.Else?.Accept(this);
 }
Exemple #3
0
 public virtual SyntaxNode Visit(IfSyntax pNode)
 {
     return(SyntaxFactory.If(pNode.Condition.Accept <ExpressionSyntax>(this),
                             pNode.Body.Accept <BlockSyntax>(this),
                             pNode.Else?.Accept <ElseSyntax>(this)).WithAttributes(pNode));
 }
Exemple #4
0
 public static ElseSyntax Else(IfSyntax pIf, BlockSyntax pBody)
 {
     return(new ElseSyntax(pIf, pBody));
 }