mirror of
https://github.com/nushell/nushell
synced 2025-01-06 18:29:02 +00:00
20 lines
412 B
Rust
20 lines
412 B
Rust
use crate::{Span, Type, Value};
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct Variable {
|
|
pub declaration_span: Span,
|
|
pub ty: Type,
|
|
pub mutable: bool,
|
|
pub const_val: Option<Value>,
|
|
}
|
|
|
|
impl Variable {
|
|
pub fn new(declaration_span: Span, ty: Type, mutable: bool) -> Variable {
|
|
Self {
|
|
declaration_span,
|
|
ty,
|
|
mutable,
|
|
const_val: None,
|
|
}
|
|
}
|
|
}
|