From c8097bc7f9abaeb318ae0724d7b29e07a9313f87 Mon Sep 17 00:00:00 2001 From: Able Date: Tue, 6 Dec 2022 12:42:07 -0600 Subject: [PATCH] Forgor a file --- programs/wat2wasm/src/main.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/programs/wat2wasm/src/main.rs b/programs/wat2wasm/src/main.rs index 14e9ba5..1e138b7 100644 --- a/programs/wat2wasm/src/main.rs +++ b/programs/wat2wasm/src/main.rs @@ -9,18 +9,25 @@ use crate::tokenizer::Token; fn main() { // Read the contents of the file into a string let contents = - fs::read_to_string("programs/wat2wasm/assets/add.wat").expect("Failed to read file"); + fs::read_to_string("programs/wat2wasm/assets/complex.wat").expect("Failed to read file"); - let mut lex = Token::lexer(&contents); + let lex = Token::lexer(&contents); for toke in lex { println!("{:?}", toke); } } #[non_exhaustive] +#[derive(Debug, PartialEq)] pub enum WasmType { I32, I64, F32, F64, } + +#[non_exhaustive] +#[derive(Debug, PartialEq)] +pub enum WasmOperation { + Add, +}