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

Method has_keyword_child

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

Source from the content-addressed store, hash-verified

1067 }
1068
1069 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
1070 for i in 0..node.child_count() {
1071 if let Some(c) = node.child(i) {
1072 if c.kind() == kw {
1073 return true;
1074 }
1075 }
1076 }
1077 false
1078 }
1079
1080 fn is_async(&self, node: Node) -> bool {
1081 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