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

Function macro_is_segment

codegraph-kernel/src/rustlang.rs:2080–2085  ·  view source on GitHub ↗

isSegment.

(t: Option<&Node>, src: &str)

Source from the content-addressed store, hash-verified

2078
2079/// isSegment.
2080fn macro_is_segment(t: Option<&Node>, src: &str) -> bool {
2081 match t {
2082 None => false,
2083 Some(n) => macro_is_name(t, src) || matches!(n.kind(), "self" | "super" | "crate" | "primitive_type"),
2084 }
2085}
2086
2087/// parseChain: the expression that starts at `i`; returns the index past it.
2088fn macro_parse_chain<'t>(tokens: &[Node<'t>], mut i: usize, in_pattern: bool, src: &'t str, out: &mut Vec<MacroRef<'t>>) -> usize {

Callers 1

macro_parse_chainFunction · 0.85

Calls 1

macro_is_nameFunction · 0.85

Tested by

no test coverage detected