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

Method push_ref_at

codegraph-kernel/src/scala.rs:271–291  ·  view source on GitHub ↗
(&mut self, from_row: u32, name: &str, kind: &str, node: Node)

Source from the content-addressed store, hash-verified

269 }
270
271 fn push_ref_at(&mut self, from_row: u32, name: &str, kind: &str, node: Node) {
272 let name_ref = self.arena.put(name);
273 self.tables.push_ref(&RefRow {
274 from_idx: from_row,
275 kind: edge_kind_index(kind).unwrap(),
276 line: self.line_of(node),
277 column: self.col_of(node),
278 reference_name: name_ref,
279 candidates: NONE_STR,
280 from_id_str: NONE_STR,
281 });
282 // flushFnRefCandidates' importedNames (tree-sitter.ts:661-675). Scala
283 // import refs are named the FIRST path segment — always SIMPLE_NAME.
284 if kind == "imports" {
285 if util::simple_name().is_match(name) {
286 self.imported_names.insert(name.to_string());
287 } else if let Some(c) = util::qualified_import().captures(name) {
288 self.imported_names.insert(c[1].to_string());
289 }
290 }
291 }
292
293 // --- createNode (tree-sitter.ts:1308) ---------------------------------
294

Callers 8

emit_scala_type_refsMethod · 0.45
extract_importMethod · 0.45
extract_callMethod · 0.45
extract_instantiationMethod · 0.45
consider_decoratorMethod · 0.45
extract_inheritanceMethod · 0.45

Calls 6

edge_kind_indexFunction · 0.85
putMethod · 0.80
unwrapMethod · 0.60
push_refMethod · 0.45
line_ofMethod · 0.45
col_ofMethod · 0.45

Tested by

no test coverage detected