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

Method is_async_of

codegraph-kernel/src/dart.rs:609–622  ·  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

607 /// isAsync (dart.ts:223-233) — the `async` anon child of the SIBLING
608 /// function_body; `async*`/`sync*` are different token types → false.
609 fn is_async_of(&self, node: Node<'t>) -> bool {
610 if let Some(next) = node.next_named_sibling() {
611 if next.kind() == "function_body" {
612 for i in 0..next.child_count() {
613 if let Some(c) = next.child(i) {
614 if c.kind() == "async" {
615 return true;
616 }
617 }
618 }
619 }
620 }
621 false
622 }
623
624 /// isStatic (dart.ts:234-243).
625 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