commit | c75e20cea8e7bbe44937262de51d636ac5d4c7a1 | [log] [tgz] |
---|---|---|
author | Bob Nystrom <rnystrom@google.com> | Wed Apr 20 17:07:17 2016 -0700 |
committer | Bob Nystrom <rnystrom@google.com> | Wed Apr 20 17:07:17 2016 -0700 |
tree | 49bfa5232d37b0bc61462060950574ef3c10c865 | |
parent | 3cc40426ce22572c43b5d45906279aede6309747 [diff] |
Fix all strong mode errors and warnings. This is almost all: - Adding type annotations to empty lists that are later filled. Many of these could be simplified by using .map(...).toList() to create the list instead, but I wanted to minimize my changes. - Adding type arguments to some List annotations. I did find one thing that I believe was a bug where a list was being inadvertently flattened. Strong mode caught that. R=terry@google.com Review URL: https://codereview.chromium.org//1832993003 .
This is a CSS parser written entirely in Dart. It can be used in the client/server/command line.
This package is installed with Pub, see: install instructions for this package.
Parsing CSS is easy!
import 'package:csslib/parser.dart' show parse; import 'package:csslib/css.dart'; main() { var stylesheet = parse( '.foo { color: red; left: 20px; top: 20px; width: 100px; height:200px }'); print(stylesheet.toString()); }
You can pass a String or list of bytes to parse
.
Basic tests can be found in this repository:
pub run test
The full CSS test suite can be found in https://github.com/dart-lang/csslib-test-suite
cd ../csslib-test-suite ./run.sh