// AcceptArithmetic implements Visitor
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 += ")"
}
838065
func (s *EmptyTransformer) AcceptCall(v Call) {
	result := make([]Any, len(v.Args))
	for ix, v2 := range v.Args {
		result[ix] = s.Transform(v2)
	}
	s.Result = Call{Name: v.Name, Args: result}
}
240609
func AcceptAny(l Lexer, valid string) bool {
	if strings.IndexRune(valid, l.Next()) >= 0 {
		return true
	}
	l.Backup()
	return false
}
1044585
func (s *numericCompilerVisitor) AcceptComparison(v tree.Comparison) {
	s.err = errors.New("a comparison was found in a numeric expression - this is likely a programmer error")
}
123787
func (t *typeChecker) AcceptNumericLiteral(v tree.NumericLiteral) {
	if t.expectBoolean {
		t.result = fmt.Errorf("expected boolean expression but found: %s", tree.ExpressionString(v))
	}
}
181592
func (s *EmptyTransformer) AcceptNegation(v Negation) {
	s.Result = Negation{s.Transform(v.Operand)}
}
951406
func (s *booleanCompilerVisitor) AcceptComparison(v tree.Comparison) {
	// At this point in the cycle, only EQL, NEQL, GT and GTE are valid comparisons
	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 err := s.ctx.popStackToX(); err != nil {
		s.err = err
		return
	}

	compOp, ok := compOps[v.Op]
	if !ok {
		s.err = fmt.Errorf("this comparison type is not allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
		return
	}

	jt, jf := s.jt, s.jf
	if v.Op == tree.NEQL {
		jt, jf = jf, jt
	}

	s.ctx.opWithJumps(compOp, 0, jt, jf)
}
612165
func (l *gceRateLimiter) Accept(ctx context.Context, key *cloud.RateLimitKey) error {
	if key.Operation == "Get" && key.Service == "Operations" {
		// Wait a minimum amount of time regardless of rate limiter.
		rl := &cloud.MinimumRateLimiter{
			// Convert flowcontrol.RateLimiter into cloud.RateLimiter
			RateLimiter: &cloud.AcceptRateLimiter{
				Acceptor: l.gce.operationPollRateLimiter,
			},
			Minimum: operationPollInterval,
		}
		return rl.Accept(ctx, key)
	}
	return nil
}
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
		}
	}
}
1163995
func IntArithmetic(v1, v2 interface{}, t string) (result int64) {
	switch t {
	case "+":
		result = ToInt(v1) + ToInt(v2)
		break
	case "-":
		result = ToInt(v1) - ToInt(v2)
		break
	}
	return
}
244555
func (n *negotiator) Accepts(ctype string) float64 {
	return accepts(n.r.Header.Get("Accept"), ctype)
}
1232470
func (s *booleanCompilerVisitor) AcceptNegation(v tree.Negation) {
	s.err = compileBoolean(s.ctx, v.Operand, false, s.jf, s.jt)
}
426772
func (s *comparisonSimplifier) AcceptComparison(a tree.Comparison) {
	l := s.Transform(a.Left)
	r := s.Transform(a.Right)

	pl, ok1 := potentialExtractValue(l)
	pr, ok2 := potentialExtractValue(r)

	if ok1 && ok2 {
		switch a.Op {
		case tree.EQL:
			s.Result = tree.BooleanLiteral{pl == pr}
			return
		case tree.NEQL:
			s.Result = tree.BooleanLiteral{pl != pr}
			return
		case tree.GT:
			s.Result = tree.BooleanLiteral{pl > pr}
			return
		case tree.GTE:
			s.Result = tree.BooleanLiteral{pl >= pr}
			return
		case tree.LT:
			s.Result = tree.BooleanLiteral{pl < pr}
			return
		case tree.LTE:
			s.Result = tree.BooleanLiteral{pl <= pr}
			return
		case tree.BITSET:
			s.Result = tree.BooleanLiteral{pl&pr != 0}
			return
		}
	}
	s.Result = tree.Comparison{Op: a.Op, Left: l, Right: r}
}
432218
func (t *precompilationTypeChecker) AcceptVariable(v tree.Variable) {
	t.result = fmt.Errorf("no variables allowed - this is probably a programmer error: %s", v.Name)
}
862325
func (s *arithmeticSimplifier) AcceptBinaryNegation(v tree.BinaryNegation) {
	val := s.Transform(v.Operand)
	if val2, ok := potentialExtractValue(val); ok {
		s.Result = tree.NumericLiteral{^val2}
	}
}
878105
func (ctx *Context) AcceptEncoding(preferred ...string) string {
	return negotiator.New(ctx.Req.Header).Encoding(preferred...)
}
571270
func (sv *StringVisitor) AcceptInclusion(v Inclusion) {
	name := "in"
	if !v.Positive {
		name = "notIn"
	}
	sv.result += "(" + name + " "
	v.Left.Accept(sv)
	sep := " "
	for _, a := range v.Rights {
		sv.result += sep
		a.Accept(sv)
	}
	sv.result += ")"
}