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

Method has_keyword_child

codegraph-kernel/src/tsjs/mod.rs:806–815  ·  view source on GitHub ↗
(&self, node: Node, kw: &str)

Source from the content-addressed store, hash-verified

804 }
805
806 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
807 for i in 0..node.child_count() {
808 if let Some(c) = node.child(i) {
809 if c.kind() == kw {
810 return true;
811 }
812 }
813 }
814 false
815 }
816
817 fn is_async(&self, node: Node) -> bool {
818 self.has_keyword_child(node, "async")

Callers 3

is_asyncMethod · 0.80
is_staticMethod · 0.80
is_const_declMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected