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

Method visibility_of

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

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

Callers 4

hookMethod · 0.45
extract_classMethod · 0.45
extract_enumMethod · 0.45

Calls 1

textMethod · 0.45

Tested by

no test coverage detected