graphql-0.11.1.0: Haskell GraphQL implementation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.GraphQL.AST.Lexer

Description

This module defines a bunch of small parsers used to parse individual lexemes.

Synopsis

Documentation

type Parser = Parsec Void Text Source #

Standard parser. Accepts the type of the parsed token.

amp :: Parser Text Source #

Parser for "&".

at :: Parser () Source #

Parser for "@".

bang :: Parser Text Source #

Parser for "!".

blockString :: Parser Text Source #

Parser for block strings.

braces :: forall a. Parser a -> Parser a Source #

Parser for an expression between "{" and "}".

brackets :: forall a. Parser a -> Parser a Source #

Parser for an expression between "[" and "]".

colon :: Parser () Source #

Parser for ":".

dollar :: Parser Text Source #

Parser for "$".

comment :: Parser () Source #

Parser for comments.

equals :: Parser Text Source #

Parser for "=".

extend :: forall a. Text -> String -> NonEmpty (Parser a) -> Parser a Source #

Parses "extend" followed by a symbol. It is used by schema extensions.

integer :: Integral a => Parser a Source #

Parser for integers.

float :: Parser Double Source #

Parser for floating-point numbers.

lexeme :: forall a. Parser a -> Parser a Source #

Lexeme definition which ignores whitespaces and commas.

name :: Parser Text Source #

Parser for names ([_A-Za-z][_0-9A-Za-z]*).

parens :: forall a. Parser a -> Parser a Source #

Parser for an expression between "(" and ")".

pipe :: Parser Text Source #

Parser for "|".

spaceConsumer :: Parser () Source #

Parser that skips comments and meaningless characters, whitespaces and commas.

spread :: Parser Text Source #

Parser for the spread operator (...).

string :: Parser Text Source #

Parser for strings.

symbol :: Text -> Parser Text Source #

Symbol definition which ignores whitespaces and commas.

unicodeBOM :: Parser () Source #

Parser for the "Byte Order Mark".