forked from AbleOS/ableos
brahmaputra 2
This commit is contained in:
parent
b6898adb3b
commit
b41d7abe2e
|
@ -1274,12 +1274,6 @@ struct StringReloc {
|
||||||
shifted: bool,
|
shifted: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StringReloc {
|
|
||||||
fn range(&self) -> std::ops::Range<usize> {
|
|
||||||
self.range.start as _..self.range.end as _
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Codegen {
|
pub struct Codegen {
|
||||||
pub files: Vec<parser::Ast>,
|
pub files: Vec<parser::Ast>,
|
||||||
|
|
|
@ -879,11 +879,12 @@ impl<'a> std::fmt::Display for Expr<'a> {
|
||||||
writeln!(f)?;
|
writeln!(f)?;
|
||||||
INDENT.with(|i| i.set(i.get() + 1));
|
INDENT.with(|i| i.set(i.get() + 1));
|
||||||
let res = (|| {
|
let res = (|| {
|
||||||
for stmt in list {
|
for stmt in stmts {
|
||||||
for _ in 0..INDENT.with(|i| i.get()) {
|
for _ in 0..INDENT.with(|i| i.get()) {
|
||||||
write!(f, "\t")?;
|
write!(f, "\t")?;
|
||||||
}
|
}
|
||||||
fmt(stmt, f)?;
|
stmt.fmt(f)?;
|
||||||
|
writeln!(f)?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
})();
|
})();
|
||||||
|
@ -891,7 +892,7 @@ impl<'a> std::fmt::Display for Expr<'a> {
|
||||||
for _ in 0..INDENT.with(|i| i.get()) {
|
for _ in 0..INDENT.with(|i| i.get()) {
|
||||||
write!(f, "\t")?;
|
write!(f, "\t")?;
|
||||||
}
|
}
|
||||||
write!(f, "{end}")?;
|
write!(f, "}}")?;
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
Self::Number { value, .. } => write!(f, "{value}"),
|
Self::Number { value, .. } => write!(f, "{value}"),
|
||||||
|
|
Loading…
Reference in a new issue