fluidattacks-blends-domain 0.44.4

Blends functional core: pure AST graph to syntax graph (no_std)
Documentation
use crate::{
    syntax::{
        _node_builders::languages::rust::{
            transform::build_syntax_node, try_expression::build_try_expression,
        },
        builders::try_statement::build_try_statement_node,
        readers::rust::generic_reader::generic_reader,
        SyntaxGraphArgs, SyntaxGraphError,
    },
    NodeId,
};

pub fn reader(
    args: &mut SyntaxGraphArgs<'_>,
    n_id: NodeId,
) -> Result<Option<NodeId>, SyntaxGraphError> {
    generic_reader(
        args,
        n_id,
        |g, n| build_try_expression(g, n, |n| build_syntax_node(g, n)),
        |a, try_expression| {
            build_try_statement_node(a, n_id, try_expression.expression.1, &[], None, None)
                .map(Some)
        },
    )
}