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

Method is_async_of

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

507 /// isAsync (dart.ts:223-233) — the `async` anon child of the SIBLING
508 /// function_body; `async*`/`sync*` are different token types → false.
509 fn is_async_of(&self, node: Node<'t>) -> bool {
510 if let Some(next) = node.next_named_sibling() {
511 if next.kind() == "function_body" {
512 for i in 0..next.child_count() {
513 if let Some(c) = next.child(i) {
514 if c.kind() == "async" {
515 return true;
516 }
517 }
518 }
519 }
520 }
521 false
522 }
523
524 /// isStatic (dart.ts:234-243).
525 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