Updated to SDK 2.17

This commit is contained in:
thomashii@dukefirehawk.com 2022-07-06 23:20:10 +08:00
parent 3767bbf838
commit f3d07b762a
7 changed files with 12 additions and 9 deletions

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ class _Repeat<T> extends ListParser<T> {
if (result.successful) { if (result.successful) {
success++; success++;
if (result.value != null) { if (result.value != null) {
results.add(result.value!); results.add(result.value as T);
} }
replay = args.scanner.position; replay = args.scanner.position;
} else if (backtrack) { } else if (backtrack) {

View file

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

View file

@ -1,15 +1,15 @@
name: belatuk_combinator 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. 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 homepage: https://github.com/dart-backend/belatuk-common-utilities/tree/main/packages/combinator
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.17.0 <3.0.0'
dependencies: dependencies:
belatuk_code_buffer: ^3.0.0 belatuk_code_buffer: ^4.0.0
matcher: ^0.12.10 matcher: ^0.12.10
source_span: ^1.8.1 source_span: ^1.8.1
string_scanner: ^1.1.0 string_scanner: ^1.1.0
tuple: ^2.0.0 tuple: ^2.0.0
dev_dependencies: dev_dependencies:
test: ^1.17.4 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:belatuk_combinator/belatuk_combinator.dart';
import 'package:matcher/matcher.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
import 'common.dart'; import 'common.dart';