graphql: github.com/graphql-go/graphql/language/lexer Index | Files

package lexer

import "github.com/graphql-go/graphql/language/lexer"

Index

Package Files

lexer.go

Constants

const (
    FRAGMENT     = "fragment"
    QUERY        = "query"
    MUTATION     = "mutation"
    SUBSCRIPTION = "subscription"
    SCHEMA       = "schema"
    SCALAR       = "scalar"
    TYPE         = "type"
    INTERFACE    = "interface"
    UNION        = "union"
    ENUM         = "enum"
    INPUT        = "input"
    EXTEND       = "extend"
    DIRECTIVE    = "directive"
)

NAME -> keyword relationship

func GetTokenDesc Uses

func GetTokenDesc(token Token) string

type Lexer Uses

type Lexer func(resetPosition int) (Token, error)

func Lex Uses

func Lex(s *source.Source) Lexer

type Token Uses

type Token struct {
    Kind  TokenKind
    Start int
    End   int
    Value string
}

Token is a representation of a lexed Token. Value only appears for non-punctuation tokens: NAME, INT, FLOAT, and STRING.

type TokenKind Uses

type TokenKind int
const (
    EOF TokenKind = iota + 1
    BANG
    DOLLAR
    PAREN_L
    PAREN_R
    SPREAD
    COLON
    EQUALS
    AT
    BRACKET_L
    BRACKET_R
    BRACE_L
    PIPE
    BRACE_R
    NAME
    INT
    FLOAT
    STRING
    BLOCK_STRING
    AMP
)

func (TokenKind) String Uses

func (kind TokenKind) String() string

Package lexer imports 7 packages (graph) and is imported by 15 packages. Updated 2019-03-13. Refresh now. Tools for package owners.