MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / is_string_prefix

Function is_string_prefix

compiler/src/modules/lexer/tables.rs:139–144  ·  view source on GitHub ↗
(s: &[u8])

Source from the content-addressed store, hash-verified

137/* Regular string prefix: r, R, u, U. The b/B variants live in `is_bytes_prefix` to emit a distinct `Bytes` token. */
138#[inline]
139pub fn is_string_prefix(s: &[u8]) -> bool {
140 match s.len() {
141 1 => matches!(s[0], b'r' | b'R' | b'u' | b'U'),
142 _ => false,
143 }
144}
145
146/* Bytes literal prefix: b, B, br, Br, bR, BR, rb, Rb, rB, RB. Emitted as `Bytes` so the parser produces `Value::Bytes`. */
147#[inline]

Callers 1

next_tokenMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected