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

Method push_ref

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

Source from the content-addressed store, hash-verified

366 }
367
368 fn push_ref(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
369 let name_ref = self.arena.put(name);
370 self.tables.push_ref(&RefRow {
371 from_idx: from_row,
372 kind: kind_code,
373 line: self.line_of(node),
374 column: self.col_of(node),
375 reference_name: name_ref,
376 candidates: NONE_STR,
377 from_id_str: NONE_STR,
378 });
379 if kind_code == edge_kind_index("imports").unwrap() {
380 // Feed the fn-ref flush gate the same way flushFnRefCandidates
381 // derives importedNames from `imports` refs.
382 if util::simple_name().is_match(name) {
383 self.imported_names.insert(name.to_string());
384 } else if let Some(c) = util::qualified_import().captures(name) {
385 self.imported_names.insert(c[1].to_string());
386 }
387 }
388 }
389
390 fn push_call_ref(&mut self, name: &str, node: Node) {
391 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