MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_rust_ident

Function is_rust_ident

codegraph-kernel/src/rustlang.rs:1665–1669  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

1663const RECEIVER_CHAIN_MAX_LINKS: usize = 16;
1664
1665fn is_rust_ident(s: &str) -> bool {
1666 let mut chars = s.chars();
1667 matches!(chars.next(), Some(c) if c.is_ascii_alphabetic() || c == '_')
1668 && chars.all(|c| c.is_ascii_alphanumeric() || c == '_')
1669}
1670
1671/// A path value's text as normalizeSpecial accepts it: `/^[A-Za-z_][\w:#]*$/`.
1672fn is_path_value_text(s: &str) -> bool {

Callers 4

receiver_chainFunction · 0.85
is_field_textFunction · 0.85
macro_receiver_chainFunction · 0.85
macro_method_call_nameFunction · 0.85

Calls 1

allMethod · 0.65

Tested by

no test coverage detected