// current clause state function, used for repeated clauses
428335
func (l *Lexer) clauseState() StateFn {
	if l.curClause != nil {
		if len(l.curClause.Clauses) > 0 {
			return l.curClause.Clauses[0].Lexer
		}
		return l.curClause.Lexer
	}
	return emptyLexFn
}
864036
func (c *Cache) State() sd.Event {
	c.mtx.RLock()
	defer c.mtx.RUnlock()
	return c.state
}
89737
func (l *Lexer) current() string {
	if l.pos <= l.start {
		return ""
	}
	str := l.input[l.start:l.pos]
	l.start = l.pos
	return str
}
218017
func (r *EwmaRate) Current(now time.Time) float64 {
	if r.lastTimestamp.IsZero() || r.lastTimestamp == now || now.Before(r.lastTimestamp) {
		return r.Ewma.Current
	}

	timeDelta := now.Sub(r.lastTimestamp)

	// Count as if nothing was received since last update and
	// don't save anything.
	return r.count(0, timeDelta)
}
585399
func (i *ProjectIter) Current() (*Project, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
840793
func (c *ConnReq) updateState(state ConnState) {
	c.stateMtx.Lock()
	c.state = state
	c.stateMtx.Unlock()
}
832188
func (i *TeamIter) Current() (*Team, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
432223
func (s *AtomicSequence) Current() (uint64, error) {
	if !s.initialized {
		return 0, errors.New("sequence has not been initialized")
	}

	if !s.IsStarted() {
		return 0, errors.New("sequence has not been started")
	}

	return atomic.LoadUint64(&s.current), nil
}
855222
func (h *QuasiNewtonHelper) UpdateState(nextPos *core.Vector, nextGrad *core.Vector) (isOptimal bool) {
	if int64(len(h.sList)) >= h.numHist {
		h.sList = h.sList[1:]
		h.yList = h.yList[1:]
		h.roList = h.roList[1:]
	}
	newS := nextPos.ElemWiseMultiplyAdd(h.curPos, -1)
	newY := nextGrad.ElemWiseMultiplyAdd(h.curGrad, -1)
	ro := newS.Dot(newY)
	h.sList = append(h.sList, newS)
	h.yList = append(h.yList, newY)
	h.roList = append(h.roList, ro)
	h.curPos = nextPos
	h.curGrad = nextGrad
	return ro == 0
}
41139
func (iter *iterator) CurrentEx() (
	entryEx EntryEx, key, val []byte, err error) {
	if len(iter.cursors) <= 0 {
		return EntryEx{}, nil, nil, ErrIteratorDone
	}

	cursor := iter.cursors[0]

	return EntryEx{Operation: cursor.op}, cursor.k, cursor.v, nil
}
678617
func (r *lbManualResolver) UpdateState(s resolver.State) {
	r.ccr.UpdateState(s)
}
425472
func (d *Debugger) State(nowait bool) (*api.DebuggerState, error) {
	if d.isRunning() && nowait {
		return &api.DebuggerState{Running: true}, nil
	}

	d.processMutex.Lock()
	defer d.processMutex.Unlock()
	return d.state(nil)
}
1238664
func stateTru(s *scanner, c byte) int {
	if c == 'e' {
		s.step = stateEndValue
		s.endLiteral = true
		return scanContinue
	}
	return s.error(c, "in literal true (expecting 'e')")
}
12953
func (s *storeImpl) UpdateCurrentState(ctx datastore.Context, serviceID string, currentState string) error {
	plog.WithFields(log.Fields{
		"serviceID":    serviceID,
		"currentState": currentState,
	}).Debug("Storing currentState")
	s.updateCurrentState(serviceID, currentState, time.Now())
	return nil
}
9595
func (d *Document) CurrentLineBeforeCursor() string {
	s := strings.Split(d.TextBeforeCursor(), "\n")
	return s[len(s)-1]
}
498762
func (l *Lobby) CurrentState() State {
	var state int
	db.DB.DB().QueryRow("SELECT state FROM lobbies WHERE id = $1", l.ID).Scan(&state)
	return State(state)
}
823480
func stateComment(l *lexer) stateFn {
	i := strings.Index(l.input[l.pos:], l.rightDelim)
	if i < 0 {
		return l.errorf("unclosed tag")
	}
	l.seek(i)
	l.emit(tokenText)
	return stateRightDelim
}