diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-28 20:16:08 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-28 20:16:08 +0100 |
| commit | 92075e6bc23d63d62e2d0caf83acbf81ad0ccd99 (patch) | |
| tree | 1c123b8919c155688fda1100c01cf84a0049c010 /src/lib.rs | |
| parent | cf42ef9b25361255ad23ae084164303657473608 (diff) | |
| download | sylt-92075e6bc23d63d62e2d0caf83acbf81ad0ccd99.tar.gz | |
Pass blobs all the way
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,4 @@ use std::path::Path; -use std::rc::Rc; pub mod compiler; pub mod tokenizer; @@ -23,7 +22,7 @@ pub fn run(tokens: TokenStream, path: &Path, print: bool) -> Result<(), Vec<Erro Ok(blocks) => { let mut vm = vm::VM::new().print_blocks(print).print_ops(print); vm.typecheck(&blocks)?; - if let Err(e) = vm.run(Rc::clone(&blocks[0])) { + if let Err(e) = vm.run(&blocks) { Err(vec![e]) } else { Ok(()) |
