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

Method is_static

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

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