Enum apollo_parser::TokenKind
source · #[repr(u16)]
pub enum TokenKind {
Show 22 variants
Whitespace,
Comment,
Bang,
Dollar,
Amp,
Spread,
Comma,
Colon,
Eq,
At,
LParen,
RParen,
LBracket,
RBracket,
LCurly,
RCurly,
Pipe,
Eof,
Name,
StringValue,
Int,
Float,
}
Expand description
Tokens generated by the lexer.
TokenKinds are Lexical Tokens outlined in the GraphQL specification.
Punctuator
! $ & … , : = @ ( ) [ ] { } |
Name IntValue FloatValue StringValue
TokenKinds can be accessed by a convenience macro, T!
. For example to
access the Bang TokenKind, you may match with TokenKind::Bang
, or use the
macro T![!]
.