diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-25 14:37:06 +0200 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-25 14:37:06 +0200 |
| commit | 0fed41e6afbf32d274660cc3ec435686901d12c4 (patch) | |
| tree | a126f10db0e439ff8c55df8b78652e47d3f63486 /rust/src/main.rs | |
| parent | 778881eda5b0955fb4c845fb29097f048491f007 (diff) | |
| download | lambda-nantes-0fed41e6afbf32d274660cc3ec435686901d12c4.tar.gz | |
Introduce basic REPL
Diffstat (limited to 'rust/src/main.rs')
| -rw-r--r-- | rust/src/main.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rust/src/main.rs b/rust/src/main.rs index ffd92f2..136e868 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -1,11 +1,16 @@ -use std::env::args; +use std::{ + env::args, + io::{stdin, stdout}, +}; -use lambda::eval_file; +use lambda::{eval_file, repl}; fn main() { if args().count() > 1 { for file in args().skip(1) { println!("{}", eval_file(&file)); } + } else { + repl(&mut stdin(), &mut stdout()); } } |
