Skip to content

Commit

Permalink
Fix cargo build
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Oct 13, 2017
1 parent ae4cf10 commit 997a8b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ fn main() {

let matches = {
let args: Vec<_> = std::env::args()
.skip(1)
.collect();
opts.parse(args.tail())
opts.parse(args)
.unwrap_or_else(|err| panic!("{}", err))
};

Expand Down
6 changes: 5 additions & 1 deletion src/repl.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::io::BufRead;

use compiler::*;
use typecheck::*;
use vm::*;
Expand Down Expand Up @@ -81,7 +83,9 @@ pub fn start() {
Ok(prelude) => { vm.add_assembly(prelude); }
Err(err) => println!("Failed to compile the prelude\nReason: {}", err)
}
for line in ::std::io::stdin().lock().lines() {

let stdin = ::std::io::stdin();
for line in stdin.lock().lines() {
let expr_str = match line {
Ok(l) => l,
Err(e) => panic!("Reading line failed with '{:?}'", e)
Expand Down
4 changes: 2 additions & 2 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum DictionaryEntry {
App(usize, InstanceDictionary)
}

enum Node_<'a> {
pub enum Node_<'a> {
Application(Node<'a>, Node<'a>),
Int(isize),
Float(f64),
Expand Down Expand Up @@ -56,7 +56,7 @@ impl <'a> Clone for Node_<'a> {
}

#[derive(Clone)]
struct Node<'a> {
pub struct Node<'a> {
node: Rc<RefCell<Node_<'a>>>
}

Expand Down

0 comments on commit 997a8b6

Please sign in to comment.