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

Method push_ref

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

Source from the content-addressed store, hash-verified

484 }
485
486 fn push_ref(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
487 let name_ref = self.arena.put(name);
488 self.tables.push_ref(&RefRow {
489 from_idx: from_row,
490 kind: kind_code,
491 line: self.line_of(node),
492 column: self.col_of(node),
493 reference_name: name_ref,
494 candidates: NONE_STR,
495 from_id_str: NONE_STR,
496 });
497 if kind_code == edge_kind_index("imports").unwrap() {
498 // Feed the fn-ref flush gate the same way flushFnRefCandidates
499 // derives importedNames from `imports` refs.
500 if util::simple_name().is_match(name) {
501 self.imported_names.insert(name.to_string());
502 } else if let Some(c) = util::qualified_import().captures(name) {
503 self.imported_names.insert(c[1].to_string());
504 }
505 }
506 }
507
508 fn push_call_ref(&mut self, name: &str, node: Node) {
509 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