Add getter for current char

master
trivernis 4 years ago
parent 433d41297c
commit b307005ce7

@ -1,6 +1,6 @@
[package]
name = "charred"
version = "0.1.6"
version = "0.1.7"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
license-file = "LICENSE"

@ -58,6 +58,12 @@ impl CharTapeMachine {
self.index
}
/// returns the current char
#[inline]
pub fn get_current(&self) -> char {
self.current_char
}
/// Creates an error at the current position
#[inline]
pub fn err(&self) -> TapeError {

Loading…
Cancel
Save