fluidattacks-blends-domain 0.44.1

Blends functional core: pure AST graph to syntax graph (no_std)
Documentation
use crate::{
    syntax::{
        _node_builders::languages::rust::{
            reference_expression::build_reference_expression, transform::build_syntax_node,
        },
        builders::unary_expression::build_unary_expression_node,
        readers::rust::generic_reader::generic_reader,
        SyntaxGraphArgs, SyntaxGraphError,
    },
    NodeId,
};
use alloc::borrow::ToOwned;

pub fn reader(
    args: &mut SyntaxGraphArgs<'_>,
    n_id: NodeId,
) -> Result<Option<NodeId>, SyntaxGraphError> {
    generic_reader(
        args,
        n_id,
        |g, n| build_reference_expression(g, n, |n| build_syntax_node(g, n)),
        |a, reference| {
            build_unary_expression_node(a, n_id, "&".to_owned(), reference.value.1).map(Some)
        },
    )
}