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

Method val_var_name

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

getValVarName (scala.ts:5-11).

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

Source from the content-addressed store, hash-verified

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