doc comments and further testing

This commit is contained in:
nora 2021-04-24 15:20:18 +02:00
parent 5b9dd9ca67
commit 248d07e317
5 changed files with 727 additions and 164 deletions

View file

@ -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

View file

@ -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};

View file

@ -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};