mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
27 lines
533 B
Rust
27 lines
533 B
Rust
use core::fmt;
|
|
|
|
use lang_c::ast::*;
|
|
|
|
use crate::*;
|
|
|
|
#[derive(Default, Debug)]
|
|
pub struct Irgen {}
|
|
|
|
#[derive(Debug, PartialEq)]
|
|
pub struct IrgenError {}
|
|
|
|
impl fmt::Display for IrgenError {
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
write!(f, "IrgenError")
|
|
}
|
|
}
|
|
|
|
impl Translate<TranslationUnit> for Irgen {
|
|
type Target = ir::TranslationUnit;
|
|
type Error = IrgenError;
|
|
|
|
fn translate(&mut self, _unit: &TranslationUnit) -> Result<Self::Target, Self::Error> {
|
|
todo!("homework 2")
|
|
}
|
|
}
|