A parsed stylesheet, from StylesheetParser.parse_stylesheet/1.
rules- itsStylesheetParser.QualifiedRules andStylesheetParser.AtRules, in order.errors- aStylesheetParser.ParseErrorfor each thing it dropped or recovered from, in the order they are in the input.
to_string/1 serializes its rules, one a line.
iex> {:ok, stylesheet} = StylesheetParser.parse_stylesheet("a { color: red } b { color: blue; oops }")
iex> Enum.map(stylesheet.rules, &to_string/1)
["a { color: red; }", "b { color: blue; }"]
iex> Enum.map(stylesheet.errors, &Exception.message/1)
["1:35: expected : after oops"]
iex> to_string(stylesheet)
"a { color: red; }\nb { color: blue; }"