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
47
48
49
50
51
52
53
54
55
//! Strategies for generating insignificant whitespace, commas,
//! and comments.
//!
//! In GraphQL, commas are treated as insignificant whitespace, and
//! comments (`# ... \n`) are ignored by the parser. These strategies
//! inject valid trivia between tokens to exercise the parser's
//! whitespace handling.
//!
//! See [Insignificant Commas](https://spec.graphql.org/September2025/#sec-Insignificant-Commas)
//! and [Comments](https://spec.graphql.org/September2025/#sec-Comments)
//! in the spec.
//!
//! Written by Claude Code, reviewed by a human.
use *;
use BoxedStrategy;
/// Generates optional insignificant separator: whitespace, comma,
/// or comment. In GraphQL, commas are insignificant separators.
/// Generates a comment: `# text \n`.
///
/// Comment text is restricted to safe ASCII to avoid encoding issues.
/// Joins `(item, separator)` pairs into a single string.
///
/// The separator from each pair is placed before its corresponding
/// item, except for the first item (whose separator is unused).
/// Designed to work with `prop::collection::vec` of
/// `(item_strategy, arb_separator())` pairs.