placeholder for unknown at rules in Display

This commit is contained in:
ConnorSkees 2020-02-22 12:00:07 -05:00
parent a4cd8ae02c
commit c8e3462e74

View File

@ -1,5 +1,6 @@
use std::fmt::Write; use std::fmt::Write;
use crate::atrule::AtRule;
use crate::error::SassResult; use crate::error::SassResult;
use crate::{RuleSet, Stmt, StyleSheet}; use crate::{RuleSet, Stmt, StyleSheet};
@ -33,9 +34,15 @@ impl<W: Write> PrettyPrinter<W> {
Stmt::Style(s) => { Stmt::Style(s) => {
writeln!(self.buf, "{}{}", padding, s)?; writeln!(self.buf, "{}{}", padding, s)?;
} }
Stmt::AtRule(r) => { Stmt::AtRule(r) => match r {
writeln!(self.buf, "{}{}", padding, r)?; AtRule::Unknown(..) => todo!("Display @rules properly"),
} AtRule::Charset(toks) => write!(
self.buf,
"@charset {};",
toks.iter().map(|x| x.kind.to_string()).collect::<String>()
)?,
_ => todo!(),
},
} }
Ok(()) Ok(())
} }