forked from AbleOS/ableos_userland
Forgor a file
This commit is contained in:
parent
28a31102ef
commit
c8097bc7f9
|
@ -9,18 +9,25 @@ use crate::tokenizer::Token;
|
||||||
fn main() {
|
fn main() {
|
||||||
// Read the contents of the file into a string
|
// Read the contents of the file into a string
|
||||||
let contents =
|
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 {
|
for toke in lex {
|
||||||
println!("{:?}", toke);
|
println!("{:?}", toke);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum WasmType {
|
pub enum WasmType {
|
||||||
I32,
|
I32,
|
||||||
I64,
|
I64,
|
||||||
F32,
|
F32,
|
||||||
F64,
|
F64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[non_exhaustive]
|
||||||
|
#[derive(Debug, PartialEq)]
|
||||||
|
pub enum WasmOperation {
|
||||||
|
Add,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue