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

Method is_async_of

codegraph-kernel/src/dart.rs:686–699  ·  view source on GitHub ↗

isAsync (dart.ts:223-233) — the `async` anon child of the SIBLING function_body; `async*`/`sync*` are different token types → false.

(&self, node: Node<'t>)

Source from the content-addressed store, hash-verified

684 /// isAsync (dart.ts:223-233) — the `async` anon child of the SIBLING
685 /// function_body; `async*`/`sync*` are different token types → false.
686 fn is_async_of(&self, node: Node<'t>) -> bool {
687 if let Some(next) = node.next_named_sibling() {
688 if next.kind() == "function_body" {
689 for i in 0..next.child_count() {
690 if let Some(c) = next.child(i) {
691 if c.kind() == "async" {
692 return true;
693 }
694 }
695 }
696 }
697 }
698 false
699 }
700
701 /// isStatic (dart.ts:234-243).
702 fn is_static_of(&self, node: Node<'t>) -> bool {

Callers 2

extract_functionMethod · 0.80
extract_methodMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected