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

Method visibility_of

codegraph-kernel/src/scala.rs:411–425  ·  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

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