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

Method visibility_of

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

extractVisibility (scala.ts:69-80) → wire byte (1 public default).

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

Source from the content-addressed store, hash-verified

407
408 /// extractVisibility (scala.ts:69-80) → wire byte (1 public default).
409 fn visibility_of(&self, node: Node<'t>) -> u8 {
410 let mut cursor = node.walk();
411 for c in node.named_children(&mut cursor) {
412 if c.kind() == "modifiers" || c.kind() == "access_modifier" {
413 let t = self.text(c);
414 if t.contains("private") {
415 return 2;
416 }
417 if t.contains("protected") {
418 return 3;
419 }
420 }
421 }
422 1
423 }
424
425 /// isStatic (scala.ts:123-129) — text scan, effectively always false.
426 fn is_static_of(&self, node: Node<'t>) -> bool {

Callers 4

hookMethod · 0.45
extract_classMethod · 0.45
extract_enumMethod · 0.45

Calls 2

walkMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected