blob: d8609f50f367b90faf52fc88bcc5571627d7a0a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//! This module implements the runtime representation of functions.
use std::rc::Rc;
use crate::chunk::Chunk;
#[derive(Clone, Debug)]
pub struct Lambda {
// name: Option<NixString>,
pub(crate) chunk: Rc<Chunk>,
}
impl Lambda {
pub fn new_anonymous() -> Self {
Lambda {
// name: None,
chunk: Default::default(),
}
}
pub fn chunk(&mut self) -> &mut Rc<Chunk> {
&mut self.chunk
}
}
|