Expand description
This module provides the core token types used by GraphQL lexers and the parser.
Structs§
- GraphQL
Token - A GraphQL token with location (span) information and an ordered list of any preceding trivia (comments, commas).
- GraphQL
Token Error - The payload of a
GraphQLTokenKind::Errorvariant. - StrGraphQL
Token Source - A
GraphQLTokenSourcethat lexes from a&strinput. - StrGraphQL
Token Source Config - Configuration for
StrGraphQLTokenSourcecontrolling which trivia types are captured during lexing.
Enums§
- GraphQL
Token Kind - The kind of a GraphQL token.
- GraphQL
Trivia Token - A “trivia token” is a token that doesn’t affect parsing but is still preserved (e.g. for tooling use).
Traits§
- GraphQL
Token Source - Trait for
GraphQLTokenlexers (iterators that generateGraphQLToken).
Type Aliases§
- GraphQL
Trivia Token Vec - Type alias for trivia storage. Uses SmallVec to avoid heap allocation for the common case of 0-2 trivia items per token.