// AcceptComparison implements Visitor
558630
func (s *fullArgumentSplitterSimplifier) AcceptComparison(a tree.Comparison) {
	l := s.Transform(a.Left)
	r := s.Transform(a.Right)

	pral, okal := potentialExtractFullArgument(l)
	prnlLow, prnlHi, oknl := potentialExtractValueParts(l)

	prar, okar := potentialExtractFullArgument(r)
	prnrLow, prnrHi, oknr := potentialExtractValueParts(r)

	if okal && oknr {
		switch a.Op {
		case tree.EQL:
			s.Result = tree.And{
				Left:  tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.NumericLiteral{prnrLow}},
				Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{prnrHi}},
			}
		case tree.BITSET:
			s.Result = tree.And{
				Left: tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.NumericLiteral{prnrLow}}, Right: tree.NumericLiteral{prnrLow}},

				Right: tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{prnrHi}}, Right: tree.NumericLiteral{prnrHi}},
			}
		case tree.NEQL:
			s.Result = tree.Or{
				Left:  tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.NumericLiteral{prnrLow}},
				Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{prnrHi}},
			}
		case tree.GT, tree.GTE:
			s.Result = tree.Or{
				Left: tree.Comparison{Op: tree.GT, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{prnrHi}},
				Right: tree.And{
					Left:  tree.Comparison{Op: tree.EQL, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{prnrHi}},
					Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.NumericLiteral{prnrLow}},
				},
			}
		default:
			panic("shouldn't happen")
		}
	} else if okar && oknl {
		switch a.Op {
		case tree.EQL:
			s.Result = tree.And{
				Left:  tree.Comparison{Op: a.Op, Left: tree.NumericLiteral{prnlLow}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: a.Op, Left: tree.NumericLiteral{prnlHi}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}
		case tree.BITSET:
			s.Result = tree.And{
				Left:  tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.NumericLiteral{prnlLow}, Right: tree.Argument{Type: tree.Low, Index: prar}}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.NumericLiteral{prnlHi}, Right: tree.Argument{Type: tree.Hi, Index: prar}}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}
		case tree.NEQL:
			s.Result = tree.Or{
				Left:  tree.Comparison{Op: a.Op, Left: tree.NumericLiteral{prnlLow}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: a.Op, Left: tree.NumericLiteral{prnlHi}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}
		case tree.GT, tree.GTE:
			s.Result = tree.Or{
				Left: tree.Comparison{Op: tree.GT, Left: tree.NumericLiteral{prnlHi}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
				Right: tree.And{
					Left:  tree.Comparison{Op: tree.EQL, Left: tree.NumericLiteral{prnlHi}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
					Right: tree.Comparison{Op: a.Op, Left: tree.NumericLiteral{prnlLow}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				},
			}
		default:
			panic("shouldn't happen")
		}
	} else if okal && okar {
		switch a.Op {
		case tree.EQL:
			s.Result = tree.And{
				Left:  tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}
		case tree.BITSET:
			s.Result = tree.And{
				Left:  tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.Argument{Type: tree.Low, Index: prar}}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: tree.EQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.Argument{Type: tree.Hi, Index: prar}}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}

		case tree.NEQL:
			s.Result = tree.Or{
				Left:  tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
			}
		case tree.GT, tree.GTE:
			s.Result = tree.Or{
				Left: tree.Comparison{Op: tree.GT, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
				Right: tree.And{
					Left:  tree.Comparison{Op: tree.EQL, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.Argument{Type: tree.Hi, Index: prar}},
					Right: tree.Comparison{Op: a.Op, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: tree.Argument{Type: tree.Low, Index: prar}},
				},
			}
		default:
			panic("shouldn't happen")
		}
	} else if okal && a.Op == tree.BITSET {
		s.Result = tree.And{
			Left:  tree.Comparison{Op: tree.EQL, Left: tree.Argument{Type: tree.Hi, Index: pral}, Right: tree.NumericLiteral{0}},
			Right: tree.Comparison{Op: tree.NEQL, Left: tree.Arithmetic{Op: tree.BINAND, Left: tree.Argument{Type: tree.Low, Index: pral}, Right: a.Right}, Right: tree.NumericLiteral{0}},
		}
	} else {
		s.Result = tree.Comparison{Op: a.Op, Left: l, Right: r}
	}
}
1114483
func (s *MetricDimension) SetComparisonOperator(v string) *MetricDimension {
	s.ComparisonOperator = &v
	return s
}
540087
func (sv *StringVisitor) AcceptArithmetic(v Arithmetic) {
	sv.result = fmt.Sprintf("%s(%s ", sv.result, ArithmeticSymbols[v.Op])
	v.Left.Accept(sv)
	sv.result += " "
	v.Right.Accept(sv)
	sv.result += ")"
}
679503
func (t *precompilationTypeChecker) AcceptArithmetic(v tree.Arithmetic) {
	res := either(
		checkPrecompilationRules(v.Left),
		checkPrecompilationRules(v.Right))
	if res != nil {
		t.result = res
	}
}
68421
func (a *acceptUnique) Accept(from interface{}) bool {
	obj, meta, err := objectMetaData(from)
	if err != nil {
		return false
	}
	gvk, _, err := a.typer.ObjectKinds(obj)
	if err != nil {
		return false
	}
	key := fmt.Sprintf("%s/%s/%s", gvk[0].Kind, meta.GetNamespace(), meta.GetName())
	_, exists := a.objects[key]
	if exists {
		return false
	}
	a.objects[key] = struct{}{}
	return true
}
887224
func (t *typeChecker) AcceptBooleanLiteral(v tree.BooleanLiteral) {
	if !t.expectBoolean {
		t.result = fmt.Errorf("expected numeric expression but found: %s", tree.ExpressionString(v))
	}
}
517400
func (s *contivListener) Accept() (net.Conn, error) {
	s.incrementRef()
	defer s.decrementRef()
	return s.Listener.Accept()
}
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))
	}
}
358542
func (l *listener) Accept() (c net.Conn, err error) {
	c, err = l.Listener.Accept()
	if err != nil {
		return
	}
	c = Server(c, l.config)
	return
}
193209
func (t *precompilationTypeChecker) AcceptInclusion(v tree.Inclusion) {
	if v.Positive {
		t.result = fmt.Errorf("no inclusion expressions allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
	} else {
		t.result = fmt.Errorf("no negative inclusion expressions allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
	}
}
388544
func (l *lexer) acceptFunc(match func(rune) bool) {
	for match(l.peek()) {
		l.next()
	}
}
30095
func (s *numericCompilerVisitor) AcceptArithmetic(v tree.Arithmetic) {
	do, val := specialCaseNumeric(v.Right)

	if !do {
		if err := compileNumeric(s.ctx, v.Right); err != nil {
			s.err = err
			return
		}

		if err := s.ctx.pushAToStack(); err != nil {
			s.err = err
			return
		}
	}

	if err := compileNumeric(s.ctx, v.Left); err != nil {
		s.err = err
		return
	}

	if !do {
		if err := s.ctx.popStackToX(); err != nil {
			s.err = err
			return
		}
	}

	arithOp, ok := arithOps[v.Op]
	if !ok {
		s.err = errors.New("an invalid arithmetic operator was found - this is likely a programmer error")
		return
	}

	if do {
		arithOp = specialCasedOp(arithOp)
	}

	s.ctx.op(arithOp, val)
}
600501
func (l *Listener) Accept() (c net.Conn, err error) {
	c, err = l.Listener.Accept()
	if err != nil {
		return
	}
	server := Server(c, l.config)
	err = server.Handshake()
	if err == AlertNoAlert {
		err = nil
	}
	c = server
	return
}
113562
func (ar *argumentRestrictions) AcceptArithmetic(v tree.Arithmetic) {
	ar.register(either(
		checkRestrictedArgumentUsage(v.Left),
		checkRestrictedArgumentUsage(v.Right)))
}
129655
func (s *numericCompilerVisitor) AcceptNumericLiteral(v tree.NumericLiteral) {
	s.ctx.op(OP_LOAD_VAL, uint32(v.Value))
}
210816
func (s *StringFilter) SetComparison(v string) *StringFilter {
	s.Comparison = &v
	return s
}
117241
func (v *SignatureAlgorithm) Accept(value interface{}) error {
	var tmp SignatureAlgorithm
	switch x := value.(type) {
	case string:
		tmp = SignatureAlgorithm(x)
	case SignatureAlgorithm:
		tmp = x
	default:
		return errors.Errorf(`invalid type for jwa.SignatureAlgorithm: %T`, value)
	}
	switch tmp {
	case ES256, ES384, ES512, HS256, HS384, HS512, NoSignature, PS256, PS384, PS512, RS256, RS384, RS512:
	default:
		return errors.Errorf(`invalid jwa.SignatureAlgorithm value`)
	}

	*v = tmp
	return nil
}