diff --git a/packages/combinator/CHANGELOG.md b/packages/combinator/CHANGELOG.md index 3a6bcd0..01f140d 100644 --- a/packages/combinator/CHANGELOG.md +++ b/packages/combinator/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 4.0.0 + +* Require Dart >= 2.17 + ## 3.0.1 * Fixed license link diff --git a/packages/combinator/lib/src/combinator/chain.dart b/packages/combinator/lib/src/combinator/chain.dart index 101836b..5833323 100644 --- a/packages/combinator/lib/src/combinator/chain.dart +++ b/packages/combinator/lib/src/combinator/chain.dart @@ -62,7 +62,7 @@ class _Chain extends ListParser { } if (result.value != null) { - results.add(result.value!); + results.add(result.value as T); } else { results.add('NULL' as T); } diff --git a/packages/combinator/lib/src/combinator/check.dart b/packages/combinator/lib/src/combinator/check.dart index a6f7bed..3ef6652 100644 --- a/packages/combinator/lib/src/combinator/check.dart +++ b/packages/combinator/lib/src/combinator/check.dart @@ -19,7 +19,7 @@ class _Check extends Parser { SyntaxError( severity, errorMessage ?? - matcher.describe(StringDescription('Expected ')).toString() + '.', + '${matcher.describe(StringDescription('Expected '))}.', result.span, ), ]); diff --git a/packages/combinator/lib/src/combinator/repeat.dart b/packages/combinator/lib/src/combinator/repeat.dart index 3e159ad..6b89019 100644 --- a/packages/combinator/lib/src/combinator/repeat.dart +++ b/packages/combinator/lib/src/combinator/repeat.dart @@ -25,7 +25,7 @@ class _Repeat extends ListParser { if (result.successful) { success++; if (result.value != null) { - results.add(result.value!); + results.add(result.value as T); } replay = args.scanner.position; } else if (backtrack) { diff --git a/packages/combinator/lib/src/combinator/to_list.dart b/packages/combinator/lib/src/combinator/to_list.dart index 320be1f..bfd7e7b 100644 --- a/packages/combinator/lib/src/combinator/to_list.dart +++ b/packages/combinator/lib/src/combinator/to_list.dart @@ -15,7 +15,7 @@ class _ToList extends ListParser { var values = []; if (result.value != null) { - values.add(result.value!); + values.add(result.value as T); } return ParseResult( args.trampoline, diff --git a/packages/combinator/pubspec.yaml b/packages/combinator/pubspec.yaml index 01d5b1f..c56b08a 100644 --- a/packages/combinator/pubspec.yaml +++ b/packages/combinator/pubspec.yaml @@ -1,15 +1,15 @@ name: belatuk_combinator -version: 3.0.1 +version: 4.0.0 description: Packrat parser combinators that support static typing, generics, file spans, memoization, and more. homepage: https://github.com/dart-backend/belatuk-common-utilities/tree/main/packages/combinator environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.17.0 <3.0.0' dependencies: - belatuk_code_buffer: ^3.0.0 + belatuk_code_buffer: ^4.0.0 matcher: ^0.12.10 source_span: ^1.8.1 string_scanner: ^1.1.0 tuple: ^2.0.0 dev_dependencies: test: ^1.17.4 - lints: ^1.0.0 + lints: ^2.0.0 diff --git a/packages/combinator/test/misc_test.dart b/packages/combinator/test/misc_test.dart index 1487824..9d3f734 100644 --- a/packages/combinator/test/misc_test.dart +++ b/packages/combinator/test/misc_test.dart @@ -1,5 +1,4 @@ import 'package:belatuk_combinator/belatuk_combinator.dart'; -import 'package:matcher/matcher.dart'; import 'package:test/test.dart'; import 'common.dart';