commit | 7759c1d4912027793853784da090d0f8080af832 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Fri Aug 28 08:39:52 2020 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 28 08:39:52 2020 -0700 |
tree | 8485f7426e26969a9823af5a88f01e63fcb04002 | |
parent | 1e96b6c329f77a3a972a5fca34c351fa11b90782 [diff] |
Migrate to null safety (#110) - *Breaking* The `Font.merge` and `BoxEdge.merge` factory constructors are now static methods since a factory constructor can't return null, but that was the entire point of these constructors. - Add nullable return types on methods that have a branch returning `null`. - Add a lot of `?` on parameters that can't provably be non-null. - Add a lot of `!`. - Add overrides of `TreeNode.clone` to tighten the return type in a few places and allow some skipped explicit casts. - Remove some dead code on conditional branches that never would have been followed, even before the migration, but weren't obvious statically. - Add explicit casts.
A Dart CSS parser.
Parsing CSS is easy!
import 'package:csslib/parser.dart'; main() { var stylesheet = parse( '.foo { color: red; left: 20px; top: 20px; width: 100px; height:200px }'); print(stylesheet.toDebugString()); }
You can pass a String
or List<int>
to parse
.