7 type Conditional struct {
14 // Accept passes the given visitor to the child nodes in this order:
15 // CondExpr, TrueExpr, FalseExpr. It then finally passes itself to the visitor.
16 func (n *Conditional) Accept(v Visitor) Node {
17 n.CondExpr = n.CondExpr.Accept(v)
18 n.TrueExpr = n.TrueExpr.Accept(v)
19 n.FalseExpr = n.FalseExpr.Accept(v)
24 func (n *Conditional) Pos() Pos {
28 func (n *Conditional) Type(Scope) (Type, error) {
29 // This is not actually a useful value; the type checker ignores
30 // this function when analyzing conditionals, just as with Arithmetic.
34 func (n *Conditional) GoString() string {
35 return fmt.Sprintf("*%#v", *n)