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

Method push_ref

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

Source from the content-addressed store, hash-verified

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