mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 15:38:48 +00:00
Update homework 1 and 2
This commit is contained in:
26
src/irgen/mod.rs
Normal file
26
src/irgen/mod.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use core::fmt;
|
||||
|
||||
use lang_c::ast::*;
|
||||
|
||||
use crate::*;
|
||||
|
||||
#[derive(Default)]
|
||||
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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user