Esempio n. 1
0
 void _Visit(JsConditionalExpression node)
 {
     Visit(node.Condition);
     Operator("?");
     Visit(node.TrueExpression);
     Operator(":");
     Visit(node.FalseExpression);
 }
        private JsNode Trinary(OperatorResolveResult res)
        {
            if (res.OperatorType == ExpressionType.Conditional)
            {
                var node5 = new JsConditionalExpression { Condition = VisitExpression(res.Operands[0]), TrueExpression = VisitExpression(res.Operands[1]), FalseExpression = VisitExpression(res.Operands[2]) };
                return node5;

            }
            else
                throw new NotImplementedException();
        }
 protected virtual void _visit( JsConditionalExpression node )
 {
     throw new NotImplementedException( "JsConditionalExpression" );
 }
 protected override void _visit( JsConditionalExpression node )
 {
     if (node != null)
     {
         visit( node.Condition );
         visit( node.TrueExpression );
         visit( node.FalseExpression );
     }
 }