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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! Section B — Error Parity tests.
//!
//! These tests feed identical invalid input strings to both
//! `RustMacroGraphQLTokenSource` and `StrGraphQLTokenSource`,
//! asserting that they produce errors at the same positions with
//! matching error messages and notes.
//!
//! See: https://spec.graphql.org/September2025/#sec-Lexical-Tokens
use crateassert_parity;
/// Tests that a standalone minus sign (`-` not followed by a
/// number) produces identical error tokens from both sources.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that a percent sign produces identical error tokens from
/// both sources. `%` is not valid GraphQL syntax.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that a tilde produces identical error tokens from both
/// sources. `~` is not valid GraphQL syntax.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that a single dot surrounded by names produces identical
/// error tokens from both sources.
///
/// Both sources produce `"Unexpected \`.\`"` with no error notes
/// for a single isolated dot.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that two adjacent dots (`..`) produce identical error
/// tokens from both sources.
///
/// Both sources produce
/// `"Unexpected \`..\` (use \`...\` for spread operator)"` with
/// a help note suggesting to add one more dot.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that two spaced dots (`. .`) on the same line produce
/// identical error tokens from both sources.
///
/// Both sources produce
/// `"Unexpected \`. .\` (use \`...\` for spread operator)"` with
/// a help note about removing spacing.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that `.. .` (two adjacent dots then a spaced dot)
/// produces identical error tokens from both sources.
///
/// Both sources produce `"Unexpected \`.. .\`"` with a help note
/// about the third dot possibly intended to complete `...`.
///
/// Written by Claude Code, reviewed by a human.
/// Tests that `. . .` (all spaced dots) produces identical error
/// tokens from both sources.
///
/// Both sources produce `"Unexpected \`. . .\`"` with a help note
/// suggesting to remove spacing to form `...`.
///
/// Written by Claude Code, reviewed by a human.