Correct a misused putIfAbsent call (#109)

There is no need to assign within the callback for a `putIfAbsent`
default. Refactor to the most idiomatic version today which is to use
`??=` (since we don't ever assign a null value so we don't care about
the distinction between a missing key and a key assigned to null) and
return the value directly rather than putting it in the Map and then
pulling it back out.
1 file changed
tree: d701bce85d0695dd11e4473a759c443794eee2c7
  1. example/
  2. lib/
  3. test/
  4. .gitignore
  5. .test_config
  6. .travis.yml
  7. analysis_options.yaml
  8. CHANGELOG.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

A Dart CSS parser.

Usage

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.