DEV: Handle comments embedded in not, import or include expressions

This commit is contained in:
Jeremy Wall 2019-05-23 20:01:03 -05:00
parent ff2aafeb98
commit 82d6ca9ecb

View File

@ -437,6 +437,9 @@ where
write!(self.w, ")")?;
}
Expression::Import(_def) => {
if self.has_comment(_def.path.pos.line) {
self.render_missed_comments(_def.path.pos.line)?;
}
write!(
self.w,
"import \"{}\"",
@ -444,6 +447,9 @@ where
)?;
}
Expression::Include(_def) => {
if self.has_comment(_def.path.pos.line) {
self.render_missed_comments(_def.path.pos.line)?;
}
write!(
self.w,
"include {} \"{}\"",