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

Method is_static

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

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