codegen fixes

This commit is contained in:
Mark Thom
2016-10-29 13:18:12 -06:00
parent 36ca0087c9
commit 63075c9739
3 changed files with 61 additions and 63 deletions

View File

@@ -6,7 +6,7 @@ use l0::machine::{MachineState};
use std::io::{self, Write};
fn print_instructions(program : Program) {
fn print_instructions(program : &Program) {
for instruction in program {
println!("{:}", instruction);
}
@@ -42,7 +42,7 @@ fn l0_repl<'a>() {
Ok(TopLevel::Query(query)) => {
if let Some(program) = ms.program.clone().take() {
let query = compile_query(&query);
for instruction in query {
ms.execute(instruction);
}