Chromium Code Reviews| Index: example/call_parser.dart |
| diff --git a/example/call_parser.dart b/example/call_parser.dart |
| index 3248f7fdfb845ff754ede6caed43c98a65227cec..e322c36c362c1f176656b43c4467075a768879d1 100644 |
| --- a/example/call_parser.dart |
| +++ b/example/call_parser.dart |
| @@ -4,17 +4,20 @@ |
| import 'package:csslib/parser.dart' as css; |
| import 'package:csslib/visitor.dart'; |
| +const _default = const css.PreprocessorOptions( |
| + useColors: false, |
| + checked: true, |
| + warningsAsErrors: true, |
| + inputFile: 'memory'); |
| + |
| /** |
| * Spin-up CSS parser in checked mode to detect any problematic CSS. Normally, |
| * CSS will allow any property/value pairs regardless of validity; all of our |
| * tests (by default) will ensure that the CSS is really valid. |
| */ |
| -StyleSheet parseCss(String cssInput, {List errors, List opts}) => css.parse( |
| - cssInput, |
| - errors: errors, |
| - options: opts == null |
| - ? ['--no-colors', '--checked', '--warnings_as_errors', 'memory'] |
| - : opts); |
| +StyleSheet parseCss(String cssInput, |
| + {List errors, css.PreprocessorOptions opts}) => css.parse(cssInput, |
|
Bob Nystrom
2015/04/03 16:15:24
This method is long enough that it should really u
kevmoo
2015/04/03 16:31:25
Done.
|
| + errors: errors, options: opts == null ? _default : opts); |
| // Pretty printer for CSS. |
| var emitCss = new CssPrinter(); |