allow warnings

This commit is contained in:
nora 2021-04-24 15:28:00 +02:00
parent 3b5fb2b528
commit 0d29e477ce
3 changed files with 5 additions and 7 deletions

View file

@ -1,5 +1,6 @@
//!
//! The very basic interpreter without any optimizations
#![allow(dead_code)]
use crate::interpreter::{MEM_SIZE, minify};
use std::io::{stdin, Read};

View file

@ -3,12 +3,13 @@
//!
//! first parse the bf so that it can be executed faster
//! most importantly: loop jumps should be immediate
//!
#![allow(dead_code)]
use std::io::{Read, stdin};
use crate::interpreter::{MEM_SIZE, Memory, minify, parse, Statement};
pub fn run(pgm: &str) -> String {
pub fn _run(pgm: &str) -> String {
let pgm = minify(pgm);
let pgm = parse(pgm.chars().collect());
let out = interpret(&pgm);

View file

@ -4,16 +4,12 @@
use std::io::{Read, stdin};
use crate::interpreter::{minify, parse, Statement};
use crate::interpreter::{minify, parse, Statement, Memory, MEM_SIZE};
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::fmt;
use std::ops::Deref;
const MEM_SIZE: usize = 0xFFFF;
type Memory = [u8; MEM_SIZE];
#[derive(PartialOrd, PartialEq, Ord, Eq, Clone, Debug)]
enum ExStatement {
Inc,