aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-29 21:01:29 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-29 21:01:29 +0100
commit674695d7e28f03218aa5a3facd933b87d508ea7d (patch)
tree582118c95770f2834b802f58bb3c834d7fd0f2e9 /src/compiler.rs
parent1d4916ed80ceac20a7dac4e500a200e0e03574e7 (diff)
downloadsylt-674695d7e28f03218aa5a3facd933b87d508ea7d.tar.gz
??
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index d31ee0d..866e0a3 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -50,10 +50,11 @@ nextable_enum!(Prec {
});
-#[derive(Debug, Clone)]
+#[derive(Clone)]
pub struct Prog {
pub blocks: Vec<Rc<RefCell<Block>>>,
pub blobs: Vec<Rc<Blob>>,
+ pub functions: Vec<RustFunction>,
}
#[derive(Debug, Clone)]
@@ -1077,6 +1078,7 @@ impl Compiler {
Ok(Prog {
blocks: self.blocks.clone(),
blobs: self.blobs.iter().map(|x| Rc::new(x.clone())).collect(),
+ functions: functions.iter().map(|(_, f)| *f).collect(),
})
} else {
Err(self.errors.clone())