cp_ast_core/structure/reference.rs
1use super::node_id::NodeId;
2use super::types::Ident;
3
4/// Reference to a variable or indexed element.
5#[derive(Debug, Clone, PartialEq)]
6pub enum Reference {
7 /// Direct reference to a variable node.
8 VariableRef(NodeId),
9 /// Indexed reference, such as `A[i]` or `C[i][j]`.
10 IndexedRef { target: NodeId, indices: Vec<Ident> },
11 /// Unresolved reference (name only, used during construction).
12 Unresolved(Ident),
13}