public override object Visit(ConditionalExpression conditionalExpression, object data)
 {
     return null;
 }
 public override object Visit(ConditionalExpression conditionalExpression, object data)
 {
     errors.Error(-1, -1, String.Format("TODO: Conditionals :)"));
     return String.Empty;
 }
 public override object Visit(ConditionalExpression conditionalExpression, object data)
 {
     Console.WriteLine(conditionalExpression.ToString());
     return conditionalExpression.AcceptChildren(this, data);
 }
 public virtual object Visit(ConditionalExpression conditionalExpression, object data)
 {
     conditionalExpression.TestCondition.AcceptVisitor(this, data);
     conditionalExpression.TrueExpression.AcceptVisitor(this, data);
     return conditionalExpression.FalseExpression.AcceptVisitor(this, data);
 }
Exemplo n.º 5
0
	void Expr(
#line  1767 "cs.ATG" 
out Expression expr) {

#line  1768 "cs.ATG" 
		expr = null; Expression expr1 = null, expr2 = null; 
		UnaryExpr(
#line  1770 "cs.ATG" 
out expr);
		if (StartOf(5)) {
			ConditionalOrExpr(
#line  1773 "cs.ATG" 
ref expr);
			if (la.kind == 11) {
				lexer.NextToken();
				Expr(
#line  1773 "cs.ATG" 
out expr1);
				Expect(9);
				Expr(
#line  1773 "cs.ATG" 
out expr2);

#line  1773 "cs.ATG" 
				expr = new ConditionalExpression(expr, expr1, expr2);  
			}
		} else if (StartOf(6)) {

#line  1775 "cs.ATG" 
			AssignmentOperatorType op; Expression val; 
			AssignmentOperator(
#line  1775 "cs.ATG" 
out op);
			Expr(
#line  1775 "cs.ATG" 
out val);

#line  1775 "cs.ATG" 
			expr = new AssignmentExpression(expr, op, val); 
		} else SynErr(128);
	}
 public override object Visit(ConditionalExpression conditionalExpression, object data)
 {
     conditionalExpression.TestCondition.AcceptVisitor(this, data);
     outputFormatter.Space();
     outputFormatter.PrintToken(Tokens.Question);
     outputFormatter.Space();
     conditionalExpression.TrueExpression.AcceptVisitor(this, data);
     outputFormatter.Space();
     outputFormatter.PrintToken(Tokens.Colon);
     outputFormatter.Space();
     conditionalExpression.FalseExpression.AcceptVisitor(this, data);
     return null;
 }