1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use crateByteSpan;
use crateGraphQLTokenKind;
use crateGraphQLTriviaToken;
use SmallVec;
/// Type alias for trivia storage. Uses SmallVec to avoid heap allocation
/// for the common case of 0-2 trivia items per token.
///
/// The `'src` lifetime matches the source text lifetime from the token source.
pub type GraphQLTriviaTokenVec<'src> = ;
/// A GraphQL token with location (span) information and an ordered list of any
/// preceding trivia (comments, commas).
///
/// Trivia is attached to the *following* token, so parsers can simply
/// call `peek()` and `consume()` without worrying about skipping trivia.
///
/// # Lifetime Parameter
///
/// The `'src` lifetime represents the source text that this token was lexed
/// from. For `StrGraphQLTokenSource`, this enables zero-copy lexing where
/// token values borrow directly from the input string. For
/// `RustMacroGraphQLTokenSource`, tokens use owned strings and the lifetime
/// can be `'static`.