mirror of
https://github.com/Noratrieb/brainfuck.git
synced 2026-01-15 22:05:02 +01:00
doc comments and further testing
This commit is contained in:
parent
5b9dd9ca67
commit
248d07e317
5 changed files with 727 additions and 164 deletions
|
|
@ -1,7 +1,10 @@
|
|||
//!
|
||||
//! The very basic interpreter without any optimizations
|
||||
|
||||
use crate::interpreter::{MEM_SIZE, minify};
|
||||
use std::io::{stdin, Read};
|
||||
|
||||
pub fn run(program: &str) -> String{
|
||||
pub fn _run(program: &str) -> String{
|
||||
let program = minify(program);
|
||||
let out = interpret(program.chars().collect());
|
||||
out
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
/*!
|
||||
# optimization time
|
||||
|
||||
first parse the bf so that it can be executed faster
|
||||
most importantly: loop jumps should be immediate
|
||||
*/
|
||||
|
||||
//!
|
||||
//! # optimization time
|
||||
//!
|
||||
//! first parse the bf so that it can be executed faster
|
||||
//! most importantly: loop jumps should be immediate
|
||||
//!
|
||||
use std::io::{Read, stdin};
|
||||
|
||||
use crate::interpreter::{MEM_SIZE, Memory, minify, parse, Statement};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/*!
|
||||
# optimization time
|
||||
some better optimizations like set null, repeating and doing more stuff with simplifying stuff
|
||||
*/
|
||||
//! # optimization time
|
||||
//! some better optimizations like set null, repeating and doing more stuff with simplifying stuff
|
||||
//!
|
||||
|
||||
use std::io::{Read, stdin};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue