Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: example/call_parser.dart

Issue 1022963002: pkg/csslib: fixes for args (Closed) Base URL: https://github.com/dart-lang/csslib@master
Patch Set: nits Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | lib/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/call_parser.dart
diff --git a/example/call_parser.dart b/example/call_parser.dart
index 3248f7fdfb845ff754ede6caed43c98a65227cec..7179a170f83697017689de04253dfa474588416d 100644
--- a/example/call_parser.dart
+++ b/example/call_parser.dart
@@ -4,17 +4,22 @@
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}) {
+ return css.parse(cssInput,
+ errors: errors, options: opts == null ? _default : opts);
+}
// Pretty printer for CSS.
var emitCss = new CssPrinter();
« no previous file with comments | « CHANGELOG.md ('k') | lib/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698