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