Files
scryer-prolog/src/machine/args.rs
William Kral 5f1f07e5a1 Add --no-add-history flag
Flag prevents the input stream from saving terms to ~/.scryer_history
when set. Use the flag when running tests to increase test isolation.
2022-03-10 21:48:41 -08:00

17 lines
319 B
Rust

use std::collections::BTreeSet;
use std::env;
#[derive(Debug)]
pub struct MachineArgs {
pub add_history: bool,
}
impl MachineArgs {
pub fn new() -> Self {
let args: BTreeSet<String> = env::args().collect();
Self {
add_history: !args.contains("--no-add-history"),
}
}
}