who knows

This commit is contained in:
2024-11-26 22:42:39 -05:00
parent 87f755b763
commit 31c197e991
10 changed files with 17 additions and 3 deletions
+10
View File
@@ -1,3 +1,13 @@
trait Add {
fn add(self, other: Self) -> Self
}
impl Add for b32 {
asm fn add(self, other) {
add {out}, {self}, {other}
}
}
fn main() {
asm {
li a0, 3
+2
View File
@@ -0,0 +1,2 @@
pub enum Instruction {
}
+1
View File
@@ -9,6 +9,7 @@ mod elf;
mod program;
pub mod riscv64;
mod target;
mod instruction;
pub use program::*;
View File
+3 -2
View File
@@ -1,8 +1,9 @@
mod namespace;
mod structure;
mod lvl1;
mod lvl2;
mod file;
pub use namespace::*;
pub use structure::*;
pub use lvl1::*;
pub use file::*;
+1 -1
View File
@@ -33,7 +33,7 @@ impl Debug for Statement {
match self {
Statement::Let(n, e) => {
f.write_str("let ")?;
n.fmt(f);
n.fmt(f)?;
f.write_str(" = ")?;
e.fmt(f)?;
f.write_char(';')?;