Skip to content

Commit

Permalink
misc: require Dart 2, fix deprecations, prepare to release 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Jul 12, 2018
1 parent 958b540 commit 45fe540
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 24 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.buildlog
.DS_Store
.idea
.pub/
.settings/
build/
packages
.dart_tool/
.packages
pubspec.lock
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: dart
sudo: false
dart:
- stable
#- stable
- dev
dart_task:
- test: -p vm
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.4

* Now requires Dart 2.

## 1.0.3

* Work around an inference bug in the new common front-end.
Expand Down
2 changes: 0 additions & 2 deletions analysis_options.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions codereview.settings

This file was deleted.

4 changes: 1 addition & 3 deletions lib/src/evaluator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:collection/collection.dart';

import 'ast.dart';
import 'visitor.dart';

Expand All @@ -17,7 +15,7 @@ class Evaluator implements Visitor<bool> {

Evaluator(semantics)
: _semantics = semantics is Iterable
? DelegatingIterable.typed(semantics.toSet()).contains
? semantics.toSet().cast().contains
: semantics as _Semantics;

bool visitVariable(VariableNode node) => _semantics(node.name);
Expand Down
7 changes: 3 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: boolean_selector
version: 1.0.3
version: 1.0.4
description: A flexible syntax for boolean expressions.
author: Dart Team <[email protected]>
homepage: https:/dart-lang/boolean_selector

environment:
sdk: '>=1.8.0 <2.0.0'
sdk: '>=2.0.0-dev.58 <3.0.0'

dependencies:
collection: '^1.5.0'
source_span: '^1.0.0'
string_scanner: '>=0.1.1 <2.0.0'

dev_dependencies:
test: '^0.12.0'
test: ^1.2.0
8 changes: 4 additions & 4 deletions test/parser_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import 'package:boolean_selector/src/ast.dart';
import 'package:boolean_selector/src/parser.dart';

/// A matcher that asserts that a value is a [ConditionalNode].
Matcher _isConditionalNode = new isInstanceOf<ConditionalNode>();
final _isConditionalNode = new TypeMatcher<ConditionalNode>();

/// A matcher that asserts that a value is an [OrNode].
Matcher _isOrNode = new isInstanceOf<OrNode>();
final _isOrNode = new TypeMatcher<OrNode>();

/// A matcher that asserts that a value is an [AndNode].
Matcher _isAndNode = new isInstanceOf<AndNode>();
final _isAndNode = new TypeMatcher<AndNode>();

/// A matcher that asserts that a value is a [NotNode].
Matcher _isNotNode = new isInstanceOf<NotNode>();
final _isNotNode = new TypeMatcher<NotNode>();

void main() {
group("parses a conditional expression", () {
Expand Down

0 comments on commit 45fe540

Please sign in to comment.