sdivi_patterns/queries/error_handling.rs
1//! Node kinds classified as error-handling patterns.
2//!
3//! These node kinds correspond to the `error_handling` category in the
4//! [`PatternCatalog`](crate::catalog::PatternCatalog).
5
6/// Tree-sitter node kinds for error-handling patterns.
7///
8/// - `try_statement`: Python/TypeScript/JavaScript/Java `try` block umbrella
9/// - `try_expression`: the `?` operator applied to a `Result` or `Option` (Rust)
10/// - `match_expression`: `match` arms used for result/error dispatch (Rust)
11/// - `except_clause`: individual Python `except` arms (`except ValueError:`, `except (A, B) as e:`)
12/// - `catch_clause`: individual Java `catch` arms (`catch (IOException e) { ... }`)
13/// - `throw_statement`: Java throw-site (`throw new RuntimeException(msg)`)
14pub const NODE_KINDS: &[&str] = &[
15 "try_statement",
16 "try_expression",
17 "match_expression",
18 "except_clause",
19 "catch_clause",
20 "throw_statement",
21];