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

Function macro_is_own_path

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

isOwnMacroPath: `wrap`, `crate::wrap`, `self::wrap`.

(segments: &[&str])

Source from the content-addressed store, hash-verified

1999
2000/// isOwnMacroPath: `wrap`, `crate::wrap`, `self::wrap`.
2001fn macro_is_own_path(segments: &[&str]) -> bool {
2002 segments.len() == 1 || (segments.len() == 2 && (segments[0] == "crate" || segments[0] == "self"))
2003}
2004
2005/// scanMacro: `vec!`'s arguments are a list of values, `matches!`'s a value and a pattern.
2006fn macro_scan_macro<'t>(tree: Node<'t>, name: &str, src: &'t str, declared: &HashSet<String>, out: &mut Vec<MacroRef<'t>>) {

Callers 2

rust_macro_arg_refsFunction · 0.85
macro_parse_chainFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected