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

Method is_static

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

547 /// isStatic: modifiers text contains 'static' OR 'class' (class members
548 /// count — deliberate; substring semantics preserved).
549 fn is_static(&self, node: Node) -> bool {
550 (0..node.child_count())
551 .filter_map(|i| node.child(i))
552 .any(|c| {
553 c.kind() == "modifiers" && {
554 let t = self.text(c);
555 t.contains("static") || t.contains("class")
556 }
557 })
558 }
559
560 /// isAsync: dead hook — `async` never sits inside `modifiers` (it's an
561 /// 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