예제 #1
0
 public ElseSyntax(IfSyntax pIf, BlockSyntax pBlock)
 {
     If   = pIf;
     Body = pBlock;
     if (If != null)
     {
         If.Parent = this;
     }
     if (Body != null)
     {
         Body.Parent = this;
     }
 }
예제 #2
0
 public virtual void Visit(IfSyntax pNode)
 {
     pNode.Condition.Accept(this);
     pNode.Body.Accept(this);
     pNode.Else?.Accept(this);
 }
예제 #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));
 }
예제 #4
0
 public static ElseSyntax Else(IfSyntax pIf, BlockSyntax pBody)
 {
     return(new ElseSyntax(pIf, pBody));
 }