fluidattacks-blends-domain 0.30.0

Blends functional core: pure AST graph to syntax graph (no_std)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{
    syntax::{
        builders::method_invocation::{build_method_invocation_node, DirectChildren},
        SyntaxGraphArgs, SyntaxGraphError,
    },
    utilities::text_nodes::node_to_str,
    NodeId,
};

pub fn reader(
    args: &mut SyntaxGraphArgs<'_>,
    n_id: NodeId,
) -> Result<Option<NodeId>, SyntaxGraphError> {
    let graph = args.ast_graph;
    let expr = node_to_str(graph, n_id);

    build_method_invocation_node(args, n_id, expr, DirectChildren::default(), None).map(Some)
}