@@ -15,16 +15,15 @@ const _default = css.PreprocessorOptions(
15
15
/// tests (by default) will ensure that the CSS is really valid.
16
16
StyleSheet parseCss (String cssInput,
17
17
{List <css.Message > errors, css.PreprocessorOptions opts}) {
18
- return css.parse (cssInput,
19
- errors: errors, options: opts == null ? _default : opts);
18
+ return css.parse (cssInput, errors: errors, options: opts ?? _default);
20
19
}
21
20
22
21
// Pretty printer for CSS.
23
22
var emitCss = CssPrinter ();
24
23
String prettyPrint (StyleSheet ss) =>
25
24
(emitCss..visitTree (ss, pretty: true )).toString ();
26
25
27
- main () {
26
+ void main () {
28
27
var errors = < css.Message > [];
29
28
30
29
// Parse a simple stylesheet.
@@ -42,7 +41,7 @@ main() {
42
41
errors: errors);
43
42
44
43
if (errors.isNotEmpty) {
45
- print (" Got ${errors .length } errors.\n " );
44
+ print (' Got ${errors .length } errors.\n ' );
46
45
for (var error in errors) {
47
46
print (error);
48
47
}
@@ -60,7 +59,7 @@ main() {
60
59
errors: errors);
61
60
62
61
if (errors.isNotEmpty) {
63
- print (" Got ${errors .length } errors.\n " );
62
+ print (' Got ${errors .length } errors.\n ' );
64
63
for (var error in errors) {
65
64
print (error);
66
65
}
@@ -74,7 +73,7 @@ main() {
74
73
stylesheetError = parseCss ('# div1 { color: red; }' , errors: errors);
75
74
76
75
if (errors.isNotEmpty) {
77
- print (" Detected ${errors .length } problem in checked mode.\n " );
76
+ print (' Detected ${errors .length } problem in checked mode.\n ' );
78
77
for (var error in errors) {
79
78
print (error);
80
79
}
@@ -87,7 +86,7 @@ main() {
87
86
print (' ======================' );
88
87
var selectorAst = css.selector ('#div .foo' , errors: errors);
89
88
if (errors.isNotEmpty) {
90
- print (" Got ${errors .length } errors.\n " );
89
+ print (' Got ${errors .length } errors.\n ' );
91
90
for (var error in errors) {
92
91
print (error);
93
92
}
0 commit comments