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

Method push_ref

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

Source from the content-addressed store, hash-verified

350 }
351
352 fn push_ref(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
353 let name_ref = self.arena.put(name);
354 self.tables.push_ref(&RefRow {
355 from_idx: from_row,
356 kind: kind_code,
357 line: self.line_of(node),
358 column: self.col_of(node),
359 reference_name: name_ref,
360 candidates: NONE_STR,
361 from_id_str: NONE_STR,
362 });
363 if kind_code == edge_kind_index("imports").unwrap() {
364 // Feed the fn-ref flush gate the same way flushFnRefCandidates
365 // derives importedNames from `imports` refs.
366 if util::simple_name().is_match(name) {
367 self.imported_names.insert(name.to_string());
368 } else if let Some(c) = util::qualified_import().captures(name) {
369 self.imported_names.insert(c[1].to_string());
370 }
371 }
372 }
373
374 fn push_call_ref(&mut self, name: &str, node: Node) {
375 self.push_ref(self.top_row(), name, edge_kind_index("calls").unwrap(), node);

Callers 11

push_ref_atMethod · 0.45
push_call_refMethod · 0.45
extract_importMethod · 0.45
emit_re_export_refsMethod · 0.45
extract_instantiationMethod · 0.45
consider_decoratorMethod · 0.45
extract_inheritanceMethod · 0.45

Calls 5

edge_kind_indexFunction · 0.85
putMethod · 0.65
unwrapMethod · 0.60
line_ofMethod · 0.45
col_ofMethod · 0.45

Tested by

no test coverage detected