Fix source maps

This commit is contained in:
2025-12-12 21:48:25 -07:00
parent 20f7cb9a4b
commit 9de59ee3b1
7 changed files with 333 additions and 200 deletions

View File

@@ -88,9 +88,7 @@ fn run_logic<'a>() -> Result<(), Error<'a>> {
None => BufWriter::new(Box::new(std::io::stdout())),
};
let mut tmp = BufWriter::new(vec![]);
let compiler = Compiler::new(parser, &mut tmp, None);
let compiler = Compiler::new(parser, None);
let CompilationResult {
errors,
@@ -109,11 +107,7 @@ fn run_logic<'a>() -> Result<(), Error<'a>> {
}
}
let instructions = optimizer::optimize(instructions);
for instruction in instructions {
writer.write_all(format!("{}\n", instruction.instruction).as_bytes())?;
}
optimizer::optimize(instructions).write(&mut writer)?;
writer.flush()?;