:)
This commit is contained in:
+23
-3
@@ -1,4 +1,7 @@
|
||||
use std::{fs, process};
|
||||
use std::str;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
use std::{fs, io::Read, process};
|
||||
mod compiler;
|
||||
mod transpiler;
|
||||
mod utils;
|
||||
@@ -13,7 +16,7 @@ fn main() {
|
||||
.about("The wyst compiler")
|
||||
.arg(
|
||||
Arg::with_name("file")
|
||||
.required_unless_one(&["stdio", "hex"])
|
||||
.required_unless_one(&["stdio", "hex", "logo"])
|
||||
.help("Sets the input file to use"),
|
||||
)
|
||||
.arg(
|
||||
@@ -42,8 +45,25 @@ fn main() {
|
||||
.takes_value(true)
|
||||
.help("Turn an identifier into hex"),
|
||||
)
|
||||
.arg(Arg::with_name("logo").long("logo").hide(true))
|
||||
.get_matches();
|
||||
if matches.is_present("stdio") {
|
||||
if matches.is_present("logo") {
|
||||
println!("{}", utils::LOGO);
|
||||
let mut byte = [4; 4];
|
||||
std::io::stdin().read_exact(&mut byte).unwrap();
|
||||
let egg = str::from_utf8(&byte).unwrap().to_string();
|
||||
let mut counter: u8 = 30;
|
||||
if egg == "logo" {
|
||||
loop {
|
||||
if counter == 35 {
|
||||
counter = 30;
|
||||
}
|
||||
println!("\x1B[2J\x1B[{}m{}", counter, utils::LOGO);
|
||||
sleep(Duration::from_millis(400));
|
||||
counter += 1;
|
||||
}
|
||||
}
|
||||
} else if matches.is_present("stdio") {
|
||||
println!("stdio mode!");
|
||||
} else if matches.is_present("hex") {
|
||||
let ident = matches.value_of("hex").unwrap().to_string();
|
||||
|
||||
@@ -182,3 +182,54 @@ impl ModManager {
|
||||
problems
|
||||
}
|
||||
}
|
||||
|
||||
pub const LOGO: &str = r#"
|
||||
|
||||
|
||||
@@ @@@ @
|
||||
@@@@ @@@@@ @@@@
|
||||
@@@@ @@@@@@@@@@@@@@@@@@@ @@@@
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@@@@@@@@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