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

Method is_static

codegraph-kernel/src/swift.rs:483–492  ·  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

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

Callers 3

extract_functionMethod · 0.45
extract_methodMethod · 0.45

Calls 1

textMethod · 0.45

Tested by

no test coverage detected