fluidattacks-blends-domain 0.2.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
use crate::syntax::{SyntaxGraphArgs, SyntaxGraphError, SyntaxNode};
use crate::NodeId;

pub fn build_argument_list_node(
    args: &mut SyntaxGraphArgs<'_>,
    n_id: NodeId,
    c_ids: &[NodeId],
) -> Result<NodeId, SyntaxGraphError> {
    args.syntax_graph.add_node(n_id, SyntaxNode::ArgumentList);

    for c_id in c_ids {
        let built = args.generic(*c_id)?;
        args.syntax_graph.add_ast_edge(n_id, built);
    }

    Ok(n_id)
}