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

Method is_static

codegraph-kernel/src/swift.rs:484–493  ·  view source on GitHub ↗

isStatic: modifiers text contains 'static' OR 'class' (class members count — deliberate; substring semantics preserved).

(&self, node: Node)

Source from the content-addressed store, hash-verified

482 /// isStatic: modifiers text contains 'static' OR 'class' (class members
483 /// count — deliberate; substring semantics preserved).
484 fn is_static(&self, node: Node) -> bool {
485 (0..node.child_count())
486 .filter_map(|i| node.child(i))
487 .any(|c| {
488 c.kind() == "modifiers" && {
489 let t = self.text(c);
490 t.contains("static") || t.contains("class")
491 }
492 })
493 }
494
495 /// isAsync: dead hook — `async` never sits inside `modifiers` (it's an
496 /// anon child after the params) → effectively always false, but PRESENT.

Callers 3

extract_functionMethod · 0.45
extract_methodMethod · 0.45

Calls 1

textMethod · 0.65

Tested by

no test coverage detected