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
//! Character classification functions for RON parsing.
//!
//! This module provides functions for classifying characters during RON
//! tokenization and parsing. All functions are `no_std` compatible.
use ;
/// Returns `true` if the character is valid as the first character of an identifier.
///
/// An identifier can start with an underscore or any Unicode `XID_Start` character.
/// Returns `true` if the character can continue an identifier.
///
/// Valid continuation characters are any Unicode `XID_Continue` character.
/// Returns `true` if the character is valid in a raw identifier.
///
/// Raw identifiers (prefixed with `r#`) allow additional characters beyond
/// standard identifiers, including `.`, `+`, and `-`, as well as any
/// Unicode `XID_Continue` character.
/// Returns `true` if the character is considered whitespace in RON.
///
/// This includes:
/// - Space (` `)
/// - Horizontal tab (`\t`)
/// - Line feed (`\n`)
/// - Carriage return (`\r`)
/// - Vertical tab (`\x0B`)
/// - Form feed (`\x0C`)
/// - Next line (`\u{85}`)
/// - Left-to-right mark (`\u{200E}`)
/// - Right-to-left mark (`\u{200F}`)
/// - Line separator (`\u{2028}`)
/// - Paragraph separator (`\u{2029}`)
pub const