Skip to main content

Module token

Module token 

Source
Expand description

This module provides the core token types used by GraphQL lexers and the parser.

Structs§

GraphQLToken
A GraphQL token with location (span) information and an ordered list of any preceding trivia (comments, commas).
GraphQLTokenError
The payload of a GraphQLTokenKind::Error variant.
StrGraphQLTokenSource
A GraphQLTokenSource that lexes from a &str input.
StrGraphQLTokenSourceConfig
Configuration for StrGraphQLTokenSource controlling which trivia types are captured during lexing.

Enums§

GraphQLTokenKind
The kind of a GraphQL token.
GraphQLTriviaToken
A “trivia token” is a token that doesn’t affect parsing but is still preserved (e.g. for tooling use).

Traits§

GraphQLTokenSource
Trait for GraphQLToken lexers (iterators that generate GraphQLToken).

Type Aliases§

GraphQLTriviaTokenVec
Type alias for trivia storage. Uses SmallVec to avoid heap allocation for the common case of 0-2 trivia items per token.