Exemplo n.º 1
0
 protected virtual void VisitCond(ConditionalExpression cond)
 {
     cond.Left.Accept(this);
     cond.Right.Accept(this);
     if (cond.Left.NodeType != typeManager.BoolType ||
         cond.Right.NodeType != typeManager.BoolType) {
         report.Error(cond.Location,
                      "operand of `{0}' must be BOOL",
                      cond.Name);
         return;
     }
     cond.NodeType = typeManager.BoolType;
 }