nu_protocol/engine/variable.rs
1use crate::{Span, Type, Value};
2
3#[derive(Clone, Debug)]
4pub struct Variable {
5 pub declaration_span: Span,
6 pub ty: Type,
7 pub mutable: bool,
8 pub const_val: Option<Value>,
9}
10
11impl Variable {
12 pub fn new(declaration_span: Span, ty: Type, mutable: bool) -> Variable {
13 Self {
14 declaration_span,
15 ty,
16 mutable,
17 const_val: None,
18 }
19 }
20}