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

Method push_ref

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

Source from the content-addressed store, hash-verified

292 }
293
294 fn push_ref(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
295 let name_ref = self.arena.put(name);
296 self.tables.push_ref(&RefRow {
297 from_idx: from_row,
298 kind: kind_code,
299 line: self.line_of(node),
300 column: self.col_of(node),
301 reference_name: name_ref,
302 candidates: NONE_STR,
303 from_id_str: NONE_STR,
304 });
305 if kind_code == edge_kind_index("imports").unwrap() {
306 // Feed the fn-ref flush gate the same way flushFnRefCandidates
307 // derives importedNames from `imports` refs.
308 if util::simple_name().is_match(name) {
309 self.imported_names.insert(name.to_string());
310 } else if let Some(c) = util::qualified_import().captures(name) {
311 self.imported_names.insert(c[1].to_string());
312 }
313 }
314 }
315
316 fn push_call_ref(&mut self, name: &str, node: Node) {
317 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.80
unwrapMethod · 0.60
line_ofMethod · 0.45
col_ofMethod · 0.45

Tested by

no test coverage detected