// AcceptArgument implements Visitor
976231
func (s *booleanCompilerVisitor) AcceptArgument(v tree.Argument) {
	s.err = errors.New("an argument variable was found in a boolean expression - this is likely a programmer error")
}
415948
func ValidateGatewayArguments(serverAddr, endpointAddr string) error {
	if err := CheckLocalServerAddr(serverAddr); err != nil {
		return err
	}

	if endpointAddr != "" {
		// Reject the endpoint if it points to the gateway handler itself.
		sameTarget, err := sameLocalAddrs(endpointAddr, serverAddr)
		if err != nil {
			return err
		}
		if sameTarget {
			return fmt.Errorf("endpoint points to the local gateway")
		}
	}
	return nil
}
1153648
func (sv *EvaluatorVisitor) AcceptNegation(v Negation) {
	v.Operand.Accept(sv)
	sv.pushBoolean(!sv.popBoolean())
}
1124043
func (ar *argumentRestrictions) AcceptOr(v tree.Or) {
	ar.register(either(
		checkRestrictedArgumentUsage(v.Left),
		checkRestrictedArgumentUsage(v.Right)))
}
942072
func (n *CreateTableStmt) Accept(v Visitor) (Node, bool) {
	newNode, skipChildren := v.Enter(n)
	if skipChildren {
		return v.Leave(newNode)
	}
	n = newNode.(*CreateTableStmt)
	node, ok := n.Table.Accept(v)
	if !ok {
		return n, false
	}
	n.Table = node.(*TableName)
	for i, val := range n.Cols {
		node, ok = val.Accept(v)
		if !ok {
			return n, false
		}
		n.Cols[i] = node.(*ColumnDef)
	}
	for i, val := range n.Constraints {
		node, ok = val.Accept(v)
		if !ok {
			return n, false
		}
		n.Constraints[i] = node.(*Constraint)
	}
	return v.Leave(n)
}
335978
func refuseArgs(command string, args []string) {
	for _, arg := range args {
		if arg == command || strings.HasPrefix(arg, "-") {
			continue
		} else {
			utils.FatalError(trace.BadParameter("unexpected argument: %s", arg))
		}

	}
}
530850
func (t *typeChecker) AcceptBinaryNegation(v tree.BinaryNegation) {
	if t.expectBoolean {
		t.result = fmt.Errorf("expected boolean expression but found: %s", tree.ExpressionString(v))
		return
	}

	res := typeCheckExpectingNumeric(v.Operand)
	if res != nil {
		t.result = res
	}
}
431605
func (t *typeChecker) AcceptNegation(v tree.Negation) {
	if !t.expectBoolean {
		t.result = fmt.Errorf("expected numeric expression but found: %s", tree.ExpressionString(v))
		return
	}

	res := typeCheckExpectingBoolean(v.Operand)
	if res != nil {
		t.result = res
	}
}
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))
	}
}
86331
func (n *Constraint) Accept(v Visitor) (Node, bool) {
	newNode, skipChildren := v.Enter(n)
	if skipChildren {
		return v.Leave(newNode)
	}
	n = newNode.(*Constraint)
	for i, val := range n.Keys {
		node, ok := val.Accept(v)
		if !ok {
			return n, false
		}
		n.Keys[i] = node.(*IndexColName)
	}
	if n.Refer != nil {
		node, ok := n.Refer.Accept(v)
		if !ok {
			return n, false
		}
		n.Refer = node.(*ReferenceDef)
	}
	if n.Option != nil {
		node, ok := n.Option.Accept(v)
		if !ok {
			return n, false
		}
		n.Option = node.(*IndexOption)
	}
	return v.Leave(n)
}
1160306
func (f *FST) Accept(addr int, b byte) int {
	next, _ := f.AcceptWithVal(addr, b)
	return next
}
1136065
func (f *EndpointFilter) Accept(peer fab.Peer) bool {

	peerConfig, err := comm.SearchPeerConfigFromURL(f.ctx.EndpointConfig(), peer.URL())
	if err != nil {
		return true
	}

	chPeer := f.getChannelPeer(peerConfig)
	if chPeer == nil {
		return true
	}

	switch t := f.endpointType; t {
	case ChaincodeQuery:
		return chPeer.ChaincodeQuery
	case EndorsingPeer:
		return chPeer.EndorsingPeer
	case LedgerQuery:
		return chPeer.LedgerQuery
	case EventSource:
		return chPeer.EventSource
	}

	return true
}
1184812
func (s *DomainsService) AcceptPush(accountID string, pushID int64, pushAttributes DomainPushAttributes) (*domainPushResponse, error) {
	path := versioned(domainPushPath(accountID, pushID))
	pushResponse := &domainPushResponse{}

	resp, err := s.client.post(path, pushAttributes, nil)
	if err != nil {
		return nil, err
	}

	pushResponse.HttpResponse = resp
	return pushResponse, nil
}
720652
func (n *ReferenceDef) Accept(v Visitor) (Node, bool) {
	newNode, skipChildren := v.Enter(n)
	if skipChildren {
		return v.Leave(newNode)
	}
	n = newNode.(*ReferenceDef)
	node, ok := n.Table.Accept(v)
	if !ok {
		return n, false
	}
	n.Table = node.(*TableName)
	for i, val := range n.IndexColNames {
		node, ok = val.Accept(v)
		if !ok {
			return n, false
		}
		n.IndexColNames[i] = node.(*IndexColName)
	}
	onDelete, ok := n.OnDelete.Accept(v)
	if !ok {
		return n, false
	}
	n.OnDelete = onDelete.(*OnDeleteOpt)
	onUpdate, ok := n.OnUpdate.Accept(v)
	if !ok {
		return n, false
	}
	n.OnUpdate = onUpdate.(*OnUpdateOpt)
	return v.Leave(n)
}
679503
func (t *precompilationTypeChecker) AcceptArithmetic(v tree.Arithmetic) {
	res := either(
		checkPrecompilationRules(v.Left),
		checkPrecompilationRules(v.Right))
	if res != nil {
		t.result = res
	}
}
698689
func (in *IncomingSender) Accept() Endpoint {
	return in.accept(func() Endpoint { return newSender(in.linkSettings) })
}
1001628
func (t *typeChecker) AcceptCall(v tree.Call) {
	t.result = fmt.Errorf("found unresolved call: %s", v.Name)
}