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

Unified Diff: packages/csslib/example/call_parser.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/csslib/CHANGELOG.md ('k') | packages/csslib/lib/css.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/csslib/example/call_parser.dart
diff --git a/packages/csslib/example/call_parser.dart b/packages/csslib/example/call_parser.dart
index 7179a170f83697017689de04253dfa474588416d..9a993ea6fc66320192ba855349e210f189529e26 100644
--- a/packages/csslib/example/call_parser.dart
+++ b/packages/csslib/example/call_parser.dart
@@ -16,7 +16,7 @@ const _default = const css.PreprocessorOptions(
* tests (by default) will ensure that the CSS is really valid.
*/
StyleSheet parseCss(String cssInput,
- {List errors, css.PreprocessorOptions opts}) {
+ {List<css.Message> errors, css.PreprocessorOptions opts}) {
return css.parse(cssInput,
errors: errors, options: opts == null ? _default : opts);
}
@@ -27,7 +27,7 @@ String prettyPrint(StyleSheet ss) =>
(emitCss..visitTree(ss, pretty: true)).toString();
main() {
- var errors = [];
+ var errors = <css.Message>[];
// Parse a simple stylesheet.
print('1. Good CSS, parsed CSS emitted:');
@@ -40,7 +40,8 @@ main() {
'}'
'#div {'
'color : #00F578; border-color: #878787;'
- '}', errors: errors);
+ '}',
+ errors: errors);
if (!errors.isEmpty) {
print("Got ${errors.length} errors.\n");
@@ -54,9 +55,11 @@ main() {
// Parse a stylesheet with errors
print('2. Catch severe syntax errors:');
print(' ===========================');
- var stylesheetError = parseCss('.foo #%^&*asdf{ '
+ var stylesheetError = parseCss(
+ '.foo #%^&*asdf{ '
'color: red; left: 20px; top: 20px; width: 100px; height:200px'
- '}', errors: errors);
+ '}',
+ errors: errors);
if (!errors.isEmpty) {
print("Got ${errors.length} errors.\n");
« no previous file with comments | « packages/csslib/CHANGELOG.md ('k') | packages/csslib/lib/css.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698