1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::Span;

#[derive(Clone, PartialEq, Eq)]
pub struct Variable<'i> {
    pub name: &'i str,
    pub span: Span,
}

impl<'i> Variable<'i> {
    pub(crate) fn new(name: &'i str, span: Span) -> Self {
        Variable { name, span }
    }

    #[cfg(feature = "dbg")]
    pub(super) fn pretty_print(&self, buf: &mut crate::PrettyPrinter) {
        buf.write(self.name);
    }
}