use alloc::borrow::ToOwned;
use crate::syntax::{SyntaxGraphArgs, SyntaxGraphError, SyntaxNode};
use crate::NodeId;
#[expect(
clippy::unnecessary_wraps,
reason = "the signature must match the reader dispatch table"
)]
pub fn reader(
args: &mut SyntaxGraphArgs<'_>,
n_id: NodeId,
) -> Result<Option<NodeId>, SyntaxGraphError> {
args.syntax_graph.add_node(
n_id,
SyntaxNode::This {
value: "this".to_owned(),
},
);
Ok(Some(n_id))
}