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

Method has_keyword_child

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

Source from the content-addressed store, hash-verified

1199 }
1200
1201 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
1202 for c in node.children(&mut node.walk()) {
1203 if c.kind() == kw {
1204 return true;
1205 }
1206 }
1207 false
1208 }
1209
1210 fn is_async(&self, node: Node) -> bool {
1211 self.has_keyword_child(node, "async")

Callers 3

is_asyncMethod · 0.80
is_staticMethod · 0.80
is_const_declMethod · 0.80

Calls 2

childrenMethod · 0.80
walkMethod · 0.45

Tested by

no test coverage detected