fluidattacks-blends-domain 0.3.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
//! Counterpart of `blends/syntax/builders/comment.py`.

use alloc::string::String;

use crate::syntax::{SyntaxGraphArgs, SyntaxNode};
use crate::NodeId;

pub fn build_comment_node(args: &mut SyntaxGraphArgs<'_>, n_id: NodeId, comment: String) -> NodeId {
    args.syntax_graph
        .add_node(n_id, SyntaxNode::Comment { comment });
    n_id
}