// AcceptComparison implements Visitor
355148
func (t *typeChecker) AcceptComparison(v tree.Comparison) {
	if !t.expectBoolean {
		t.result = fmt.Errorf("expected numeric expression but found: %s", tree.ExpressionString(v))
		return
	}

	// This language only accepts comparisons between numeric values, so we implement that here
	res := either(
		typeCheckExpectingNumeric(v.Left),
		typeCheckExpectingNumeric(v.Right))
	if res != nil {
		t.result = res
	}
}
732645
func (s *CloudWatchAlarmConfiguration) SetComparisonOperator(v string) *CloudWatchAlarmConfiguration {
	s.ComparisonOperator = &v
	return s
}
1132578
func (t *precompilationTypeChecker) AcceptComparison(v tree.Comparison) {
	if v.Op == tree.LT {
		t.result = fmt.Errorf("no less than comparisons allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
	} else if v.Op == tree.LTE {
		t.result = fmt.Errorf("no less than or equals comparisons allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
	} else {
		res := either(
			checkPrecompilationRules(v.Left),
			checkPrecompilationRules(v.Right))
		if res != nil {
			t.result = res
		}
	}
}
772051
func Accept(ctypes ...string) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		a := r.Header.Get("Accept")
		for _, t := range ctypes {
			if accepts(a, t) > 0 {
				return
			}
		}
		w.WriteHeader(http.StatusNotAcceptable)
	}
}
896956
func (aa Acceptors) Accept(from interface{}) bool {
	for _, a := range aa {
		if !a.Accept(from) {
			return false
		}
	}
	return true
}
628220
func (ar *argumentRestrictions) AcceptComparison(v tree.Comparison) {
	_, hasArgL := v.Left.(tree.Argument)
	_, hasArgR := v.Right.(tree.Argument)

	if !hasArgL {
		ar.register(checkRestrictedArgumentUsage(v.Left))
	}
	if !hasArgR {
		ar.register(checkRestrictedArgumentUsage(v.Right))
	}
}
718298
func (r *receiver) acceptable(segSeq seqnum.Value, segLen seqnum.Size) bool {
	rcvWnd := r.rcvNxt.Size(r.rcvAcc)
	if rcvWnd == 0 {
		return segLen == 0 && segSeq == r.rcvNxt
	}

	return segSeq.InWindow(r.rcvNxt, rcvWnd) ||
		seqnum.Overlap(r.rcvNxt, rcvWnd, segSeq, segLen)
}
181592
func (s *EmptyTransformer) AcceptNegation(v Negation) {
	s.Result = Negation{s.Transform(v.Operand)}
}
872572
func (sv *StringVisitor) AcceptComparison(v Comparison) {
	sv.result = fmt.Sprintf("%s(%s ", sv.result, ComparisonSymbols[v.Op])
	v.Left.Accept(sv)
	sv.result += " "
	v.Right.Accept(sv)
	sv.result += ")"
}
188755
func (p Listener) Accept() (net.Conn, error) {
	rawc, err := p.Listener.Accept()
	if err != nil {
		return nil, err
	}
	return newConn(rawc), nil
}
1104860
func (l *Listener) Accept() (net.Conn, error) {
	c, err := l.l.Accept()
	if err != nil {
		return nil, l.opError(opAccept, err)
	}

	return c, nil
}
1114483
func (s *MetricDimension) SetComparisonOperator(v string) *MetricDimension {
	s.ComparisonOperator = &v
	return s
}
1353482
func (s *inclusionRemoverSimplifier) AcceptInclusion(a tree.Inclusion) {
	l := s.Transform(a.Left)
	op := tree.EQL
	combiner := combineAsOrs

	if !a.Positive {
		op = tree.NEQL
		combiner = combineAsAnds
	}

	result := make([]tree.Expression, len(a.Rights))
	for ix, v := range a.Rights {
		result[ix] = tree.Comparison{Op: op, Left: l, Right: s.Transform(v)}
	}

	s.Result = combiner(result)
}
1207231
func (l *TCPListener) Accept() (c net.Conn, err error) {
	conn, err := l.AcceptTCP()
	if err != nil {
		return
	}

	// TODO(brutella) Check if we should use tcp keepalive
	// conn.SetKeepAlive(true)
	// conn.SetKeepAlivePeriod(3 * time.Minute)
	hapConn := NewConnection(conn, l.context)

	return hapConn, err
}
107059
func (listener *httpListener) Accept() (conn net.Conn, err error) {
	result, ok := <-listener.acceptCh
	if ok {
		return result.conn, result.err
	}

	return nil, syscall.EINVAL
}
357643
func (s *MetricAlarm) SetComparisonOperator(v string) *MetricAlarm {
	s.ComparisonOperator = &v
	return s
}
1232470
func (s *booleanCompilerVisitor) AcceptNegation(v tree.Negation) {
	s.err = compileBoolean(s.ctx, v.Operand, false, s.jf, s.jt)
}