#![allow(dead_code)]
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub enum Instruction {
Push, Pop, Inc, Dec, Jnz, Jz, Read, Write, Store, Load, Add, }
use Instruction::*;
impl Instruction {
pub fn from_glyph(c: &str) -> Option<Self> {
match c {
"O" => Some(Push), "0" => Some(Pop), "วพ" => Some(Inc), "แซ" => Some(Dec), "๐" => Some(Jnz), "๊" => Some(Jz), "โช" => Some(Read), "โ" => Some(Write), "โญ" => Some(Add), "โ" => Some(Load), "โฏ" => Some(Store), _ => None,
}
}
}