Skip to main content

Module async_patterns

Module async_patterns 

Source
Expand description

Node-kind and callee-text classification for async-concurrency patterns.

§Node-kind detection

  • await_expression.await on a Future (Rust) or await expr (TS/JS)

§Callee-text detection (TypeScript / JavaScript only)

Promise-chain call shapes registered at CALL_DISPATCH slot P1:

  • .then(…), .catch(…), .finally(…)

Both paths together make async_patterns a hybrid category: await_expression nodes arrive via category_for_node_kind, and Promise-chain call_expression nodes arrive via matches_callee in super::classify_hint’s CALL_DISPATCH.

Constants§

NODE_KINDS
Tree-sitter node kinds for async-concurrency patterns.

Functions§

matches_callee
Return true when text looks like an async-pattern call callee for language.