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

Method push_ref_at

codegraph-kernel/src/rustlang.rs:224–245  ·  view source on GitHub ↗
(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node)

Source from the content-addressed store, hash-verified

222 }
223
224 fn push_ref_at(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
225 let name_ref = self.arena.put(name);
226 self.tables.push_ref(&RefRow {
227 from_idx: from_row,
228 kind: kind_code,
229 line: self.line_of(node),
230 column: self.col_of(node),
231 reference_name: name_ref,
232 candidates: NONE_STR,
233 from_id_str: NONE_STR,
234 });
235 if kind_code == edge_kind_index("imports").unwrap() {
236 if util::simple_name().is_match(name) {
237 self.imported_names.insert(name.to_string());
238 } else if let Some(c) = util::qualified_import().captures(name) {
239 // `::`-separated rust paths match NEITHER regex (separators are
240 // `.`/`\`), so multi-segment use-imports contribute nothing to
241 // the fn-ref gate — the rust gate is effectively same-file-only.
242 self.imported_names.insert(c[1].to_string());
243 }
244 }
245 }
246
247 fn create_node(&mut self, kind: &'static str, name: &str, node: Node<'t>, extra: Extra) -> Option<u32> {
248 if name.is_empty() {

Callers 7

extract_importMethod · 0.45
emit_use_binding_refsMethod · 0.45
extract_callMethod · 0.45
extract_instantiationMethod · 0.45
extract_inheritanceMethod · 0.45

Calls 6

edge_kind_indexFunction · 0.85
putMethod · 0.80
unwrapMethod · 0.60
push_refMethod · 0.45
line_ofMethod · 0.45
col_ofMethod · 0.45

Tested by

no test coverage detected