oak-core 0.0.11

Core parser combinator library providing fundamental parsing primitives.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Checks if the given byte is a valid start of an ASCII identifier ([a-zA-Z_]).
#[inline]
#[allow(dead_code)]
pub fn is_ascii_ident_start(b: u8) -> bool {
    b.is_ascii_alphabetic() || b == b'_'
}

/// Checks if the given byte is a valid continuation of an ASCII identifier ([a-zA-Z0-9_]).
#[inline]
#[allow(dead_code)]
pub fn is_ascii_ident_continue(b: u8) -> bool {
    b.is_ascii_alphanumeric() || b == b'_'
}