Esempio n. 1
0
        public override Ust VisitIfStatement(IfStatementSyntax node)
        {
            var       condition      = (Expression)base.Visit(node.Condition);
            Statement trueStatement  = (Statement)base.Visit(node.Statement);
            Statement falseStatement = node.Else == null
                ? null
                : (Statement)base.Visit(node.Else.Statement);

            var result = new IfElseStatement(
                condition,
                trueStatement,
                node.GetTextSpan())
            {
                FalseStatement = falseStatement
            };

            return(result);
        }