コード例 #1
0
ファイル: ExprVisitor.cs プロジェクト: dopeldead/yodii-script
        public virtual Expr Visit(IfExpr e)
        {
            Expr cV = VisitExpr(e.Condition);
            Expr tV = VisitExpr(e.WhenTrue);
            Expr fV = e.WhenFalse != null?VisitExpr(e.WhenFalse) : null;

            return(cV == e.Condition && tV == e.WhenTrue && fV == e.WhenFalse ? e : new IfExpr(e.Location, e.IsTernaryOperator, cV, tV, fV));
        }
コード例 #2
0
 public PExpr Visit(IfExpr e)
 {
     return(Run(new IfExprFrame(this, e)));
 }