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

Method has_keyword_child

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

Source from the content-addressed store, hash-verified

1085 }
1086
1087 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
1088 for c in node.children(&mut node.walk()) {
1089 if c.kind() == kw {
1090 return true;
1091 }
1092 }
1093 false
1094 }
1095
1096 fn is_async(&self, node: Node) -> bool {
1097 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