// Null verifies that the next token is null and consumes it.
976820
func (r *Lexer) Null() {
	if r.token.kind == tokenUndef && r.Ok() {
		r.FetchToken()
	}
	if !r.Ok() || r.token.kind != tokenNull {
		r.errInvalidToken("null")
	}
	r.consume()
}
816767
func (p *parser) peek() token {
	if len(p.buf) > 0 {
		return p.buf[0]
	}
	t := p.lexer.token()
	p.buf = append(p.buf, t)
	return t
}
116975
func (v *Value) Null() error {
	var valid bool

	// Check the type of this data
	switch v.data.(type) {
	case nil:
		valid = v.exists // Valid only if j also exists, since other values could possibly also be nil
		break
	}

	if valid {
		return nil
	}

	return ErrNotNull

}
748234
func (parser *Parser) nextToken() *scanner.Token {
	if len(parser.tokens) == 0 {
		// fetch next token
		nextToken := parser.scan.Next()

		// log.Printf("[token] %s => %v", nextToken.Type.String(), nextToken.Value)

		// queue it
		parser.tokens = append(parser.tokens, nextToken)
	}

	return parser.tokens[0]
}
852076
func (c *Client) Token() string {
	c.modifyLock.RLock()
	defer c.modifyLock.RUnlock()

	return c.token
}
389903
func (enc *Encoder) SQLNullBoolNullEmpty(v *sql.NullBool) {
	if v != nil && v.Valid {
		enc.BoolNullEmpty(v.Bool)
	}
}
743644
func nextNonWhitespaceToken(decoder *xml.Decoder) (xml.Token, error) {
	for {
		tok, err := decoder.Token()
		if err != nil {
			return nil, err
		} else if chars, ok := tok.(xml.CharData); ok {
			strippedBytes := bytes.TrimSpace(chars)
			if len(strippedBytes) != 0 {
				return tok, nil
			}
		} else {
			return tok, nil
		}
	}
}
343036
func (cfg *ApplicationConfigEnv) LoadToken() (*oauth2.Token, error) {
	tok, err := NewTokenPassword(
		cfg.ApplicationCredentials(),
		cfg.PasswordCredentials())
	if err == nil {
		cfg.AccessToken = tok.AccessToken
	}
	return tok, err
}
1311100
func (r *Lexer) Skip() {
	if r.token.kind == tokenUndef && r.Ok() {
		r.FetchToken()
	}
	r.consume()
}
454015
func Token(token string) Option {
	return func(o *Options) error {
		if o.TokenHandler != nil {
			return ErrTokenAlreadySet
		}
		o.Token = token
		return nil
	}
}
363790
func (t *TokenSource) Token() (*oauth2.Token, error) {
	token := &oauth2.Token{
		AccessToken: t.AccessToken,
	}
	return token, nil
}
472128
func (rb *route) PushOrderByNull() {
	rb.Select.(*sqlparser.Select).OrderBy = sqlparser.OrderBy{&sqlparser.Order{Expr: &sqlparser.NullVal{}}}
}
351854
func (l *Lexer) consumeBracket() TokenType {
	switch l.r.Peek(0) {
	case '(':
		l.r.Move(1)
		return LeftParenthesisToken
	case ')':
		l.r.Move(1)
		return RightParenthesisToken
	case '[':
		l.r.Move(1)
		return LeftBracketToken
	case ']':
		l.r.Move(1)
		return RightBracketToken
	case '{':
		l.r.Move(1)
		return LeftBraceToken
	case '}':
		l.r.Move(1)
		return RightBraceToken
	}
	return ErrorToken
}
524644
func (c *Compiler) next() token {
	token := c.tokens[c.pos]
	c.pos++
	return token
}
1285739
func (pctx *parseCtx) peek() *Token {
	if pctx.peekCount < 0 {
		select {
		case <-pctx.Context.Done():
			return &eofToken
		case t, ok := <-pctx.lexsrc:
			if !ok {
				return &eofToken
			}
			pctx.peekCount++
			pctx.peekTokens[pctx.peekCount] = t
		}
	}
	return pctx.peekTokens[pctx.peekCount]
}
911702
func (enc *Encoder) StringNullEmpty(v string) {
	r := enc.getPreviousRune()
	if v == "" {
		if r != '[' {
			enc.writeByte(',')
			enc.writeBytes(nullBytes)
		} else {
			enc.writeBytes(nullBytes)
		}
		return
	}
	if r != '[' {
		enc.writeTwoBytes(',', '"')
	} else {
		enc.writeByte('"')
	}
	enc.writeStringEscape(v)
	enc.writeByte('"')
}
941319
func (l *Lexer) consumeMatch() TokenType {
	if l.r.Peek(1) == '=' {
		switch l.r.Peek(0) {
		case '~':
			l.r.Move(2)
			return IncludeMatchToken
		case '|':
			l.r.Move(2)
			return DashMatchToken
		case '^':
			l.r.Move(2)
			return PrefixMatchToken
		case '$':
			l.r.Move(2)
			return SuffixMatchToken
		case '*':
			l.r.Move(2)
			return SubstringMatchToken
		}
	}
	return ErrorToken
}