mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 15:38:48 +00:00
Format and stuff
This commit is contained in:
@@ -8,14 +8,14 @@ use lang_c::span::Node;
|
||||
use crate::utils::AssertSupported;
|
||||
use crate::Translate;
|
||||
|
||||
/// TODO(document)
|
||||
/// Parse Error
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
ParseError(ParseError),
|
||||
Unsupported,
|
||||
}
|
||||
|
||||
/// TODO(document)
|
||||
/// C file Parser.
|
||||
#[derive(Default, Clone, Copy, Debug)]
|
||||
pub struct Parse;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
use std::io::{Result, Write};
|
||||
|
||||
use lang_c::ast::*;
|
||||
use lang_c::span::Node;
|
||||
|
||||
use core::ops::Deref;
|
||||
use std::io::{Result, Write};
|
||||
|
||||
use crate::write_base::*;
|
||||
|
||||
impl<T: WriteLine> WriteLine for Node<T> {
|
||||
@@ -19,8 +18,8 @@ impl<T: WriteString> WriteString for Node<T> {
|
||||
}
|
||||
|
||||
impl WriteLine for TranslationUnit {
|
||||
fn write_line(&self, _indent: usize, _write: &mut dyn Write) -> Result<()> {
|
||||
todo!("Homework: write C")
|
||||
fn write_line(&self, indent: usize, write: &mut dyn Write) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user