-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* makes most pub things in src/ pub(crate) as not to expose things accidentally * only those things needed by src/bin/scryer-prolog.rs and tests/scryer.rs should be pub * split src/main.rs into src/lib.rs and src/bin/scryer-prolog.rs * add tests folder and run most of the files in src/tests with cargo test added bytes method to Stream in src/machine/streams.rs to check if stdout is as expected
- Loading branch information
Showing
35 changed files
with
981 additions
and
964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fn main() { | ||
use nix::sys::signal; | ||
use scryer_prolog::read::readline; | ||
use scryer_prolog::*; | ||
|
||
let handler = signal::SigHandler::Handler(handle_sigint); | ||
unsafe { signal::signal(signal::Signal::SIGINT, handler) }.unwrap(); | ||
|
||
let mut wam = machine::Machine::new(readline::input_stream(), machine::Stream::stdout()); | ||
wam.run_top_level(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.