From a3ecfbbf3e6453d1552628b4ffbd35038de86d98 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Wed, 8 Jan 2020 20:39:05 -0500 Subject: [PATCH] Preserve toplevel multiline comments and add tests for them --- src/css.rs | 88 ++++++++++++++++++++++++++++++++++++--------------- src/format.rs | 40 +++++++++++++++++++---- src/lexer.rs | 4 ++- src/main.rs | 66 ++++++++++++++++++++++++++++++++------ src/style.rs | 48 +++++++++++++++------------- 5 files changed, 181 insertions(+), 65 deletions(-) diff --git a/src/css.rs b/src/css.rs index fce4cef..daf236e 100644 --- a/src/css.rs +++ b/src/css.rs @@ -1,29 +1,53 @@ //! # Convert from SCSS AST to CSS use crate::{RuleSet, Selector, Stmt, Style, StyleSheet}; +// use crate::common::AtRule; +use std::fmt; use std::io; #[derive(Debug, Clone)] -pub struct Block { - selector: Selector, - styles: Vec