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

Method val_var_name

codegraph-kernel/src/scala.rs:396–408  ·  view source on GitHub ↗

getValVarName (scala.ts:5-11).

(&self, node: Node<'t>)

Source from the content-addressed store, hash-verified

394
395 /// getValVarName (scala.ts:5-11).
396 fn val_var_name(&self, node: Node<'t>) -> Option<&'t str> {
397 let pattern = node.child_by_field_name("pattern")?;
398 if pattern.kind() == "identifier" {
399 return Some(self.text(pattern));
400 }
401 let mut cursor = pattern.walk();
402 for c in pattern.named_children(&mut cursor) {
403 if c.kind() == "identifier" {
404 return Some(self.text(c));
405 }
406 }
407 None
408 }
409
410 /// extractVisibility (scala.ts:69-80) → wire byte (1 public default).
411 fn visibility_of(&self, node: Node<'t>) -> u8 {

Callers 1

hookMethod · 0.80

Calls 2

walkMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected