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

Method push_ref

codegraph-kernel/src/ruby.rs:229–247  ·  view source on GitHub ↗
(&mut self, from_row: u32, name: &str, kind_code: u8, line: u32, column: u32)

Source from the content-addressed store, hash-verified

227 }
228
229 fn push_ref(&mut self, from_row: u32, name: &str, kind_code: u8, line: u32, column: u32) {
230 let name_ref = self.arena.put(name);
231 self.tables.push_ref(&RefRow {
232 from_idx: from_row,
233 kind: kind_code,
234 line,
235 column,
236 reference_name: name_ref,
237 candidates: NONE_STR,
238 from_id_str: NONE_STR,
239 });
240 if kind_code == edge_kind_index("imports").unwrap() {
241 if util::simple_name().is_match(name) {
242 self.imported_names.insert(name.to_string());
243 } else if let Some(c) = util::qualified_import().captures(name) {
244 self.imported_names.insert(c[1].to_string());
245 }
246 }
247 }
248
249 fn push_ref_at(&mut self, from_row: u32, name: &str, kind_code: u8, node: Node) {
250 self.push_ref(from_row, name, kind_code, self.line_of(node), self.col_of(node));

Callers 3

push_ref_atMethod · 0.45
extract_callMethod · 0.45

Calls 3

edge_kind_indexFunction · 0.85
putMethod · 0.80
unwrapMethod · 0.60

Tested by

no test coverage detected