func (expr *CaseExpr) Walk(v Visitor) Expr {
	ret := expr

	if expr.Expr != nil {
		e, changed := WalkExpr(v, expr.Expr)
		if changed {
			ret = expr.copyNode()
			ret.Expr = e
		}
	}
	for i, w := range expr.Whens {
		cond, changedC := WalkExpr(v, w.Cond)
		val, changedV := WalkExpr(v, w.Val)
		if changedC || changedV {
			if ret == expr {
				ret = expr.copyNode()
			}
			ret.Whens[i].Cond = cond
			ret.Whens[i].Val = val
		}
	}
	if expr.Else != nil {
		e, changed := WalkExpr(v, expr.Else)
		if changed {
			if ret == expr {
				ret = expr.copyNode()
			}
			ret.Else = e
		}
	}
	return ret
}
// Walk implements the Expr interface.
Walk implements the Expr interface.
// Walk implements the Expr interface .
func (expr *CaseExpr) Walk(v Visitor) Expr {
	ret := expr
	if expr.Expr != nil {
		e, changed := WalkExpr(v, expr.Expr)
		if changed {
			ret = expr.copyNode()
			ret.Expr = e
		}
	}
	for i, w := range expr.Whens {
		cond, changedC := WalkExpr(v, w.Cond)
		val, changedV := WalkExpr(v, w.Val)
		if changedC || changedV {
			if ret == expr {
				ret = expr.copyNode()
			}
			ret.Whens[i].Cond = cond
			ret.Whens[i].Val = val
		}
	}
	if expr.Else != nil {
		e, changed := WalkExpr(v, expr.Else)
		if changed {
			if ret == expr {
				ret = expr.copyNode()
			}
			ret.Else = e
		}
	}
	return ret
}
func ( expr * CaseExpr ) Walk ( v Visitor ) Expr { ret := expr if expr . Expr != nil { e , changed := WalkExpr ( v , expr . Expr ) if changed { ret = expr . copyNode ( ) ret . Expr = e } } for i , w := range expr . Whens { cond , changedC := WalkExpr ( v , w . Cond ) val , changedV := WalkExpr ( v , w . Val ) if changedC || changedV { if ret == expr { ret = expr . copyNode ( ) } ret . Whens [ i ] . Cond = cond ret . Whens [ i ] . Val = val } } if expr . Else != nil { e , changed := WalkExpr ( v , expr . Else ) if changed { if ret == expr { ret = expr . copyNode ( ) } ret . Else = e } } return ret }
Walk implements the Expr interface.
Walk implements the Expr interface .