mirror of
https://github.com/Noratrieb/brainfuck.git
synced 2026-01-16 06:15:02 +01:00
broken AF but profiling could perhaps work like mayb eidk
This commit is contained in:
parent
cec7204c6d
commit
799b1591e0
9 changed files with 168 additions and 703 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#![feature(allocator_api, let_else)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use brainfuck::UseProfile;
|
||||
use std::{env, fs, io, process};
|
||||
|
||||
fn main() {
|
||||
|
|
@ -19,7 +20,7 @@ fn main() {
|
|||
let stdin = io::stdin();
|
||||
let stdin = stdin.lock();
|
||||
|
||||
brainfuck::run(file.bytes(), stdout, stdin).unwrap_or_else(|_| {
|
||||
brainfuck::run(&file, stdout, stdin, UseProfile::Yes).unwrap_or_else(|_| {
|
||||
eprintln!("error: Failed to parse brainfuck code");
|
||||
process::exit(1);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue