Merge pull request #2 from dart-backend/feature/migrate

Updated to SDK 2.17
This commit is contained in:
Thomas Hii 2022-07-06 23:21:29 +08:00 committed by GitHub
commit b8cbfd95ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 9 deletions

View file

@ -1,5 +1,9 @@
# Change Log
## 4.0.0
* Require Dart >= 2.17
## 3.0.1
* Fixed license link

View file

@ -62,7 +62,7 @@ class _Chain<T> extends ListParser<T> {
}
if (result.value != null) {
results.add(result.value!);
results.add(result.value as T);
} else {
results.add('NULL' as T);
}

View file

@ -19,7 +19,7 @@ class _Check<T> extends Parser<T> {
SyntaxError(
severity,
errorMessage ??
matcher.describe(StringDescription('Expected ')).toString() + '.',
'${matcher.describe(StringDescription('Expected '))}.',
result.span,
),
]);

View file

@ -25,7 +25,7 @@ class _Repeat<T> extends ListParser<T> {
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) {

View file

@ -15,7 +15,7 @@ class _ToList<T> extends ListParser<T> {
var values = <T>[];
if (result.value != null) {
values.add(result.value!);
values.add(result.value as T);
}
return ParseResult(
args.trampoline,

View file

@ -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

View file

@ -1,5 +1,4 @@
import 'package:belatuk_combinator/belatuk_combinator.dart';
import 'package:matcher/matcher.dart';
import 'package:test/test.dart';
import 'common.dart';