Annotate method error with alwaysThrows annotation. (dart-lang/string_scanner#11)
diff --git a/pkgs/string_scanner/CHANGELOG.md b/pkgs/string_scanner/CHANGELOG.md index 2909bea..3602fb3 100644 --- a/pkgs/string_scanner/CHANGELOG.md +++ b/pkgs/string_scanner/CHANGELOG.md
@@ -1,3 +1,7 @@ +## 1.1.0 + +* Add @alwaysThrows annotation to error method. + ## 1.0.3 * Set max SDK version to `<3.0.0`, and adjust other dependencies.
diff --git a/pkgs/string_scanner/lib/src/string_scanner.dart b/pkgs/string_scanner/lib/src/string_scanner.dart index ea3d6d6..d32dc38 100644 --- a/pkgs/string_scanner/lib/src/string_scanner.dart +++ b/pkgs/string_scanner/lib/src/string_scanner.dart
@@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:charcode/charcode.dart'; +import 'package:meta/meta.dart'; import 'package:source_span/source_span.dart'; import 'exception.dart'; @@ -197,6 +198,7 @@ /// position; if only [position] is passed, [length] defaults to 0. /// /// It's an error to pass [match] at the same time as [position] or [length]. + @alwaysThrows void error(String message, {Match match, int position, int length}) { validateErrorArgs(string, match, position, length);
diff --git a/pkgs/string_scanner/pubspec.yaml b/pkgs/string_scanner/pubspec.yaml index 7c87a0d..7691990 100644 --- a/pkgs/string_scanner/pubspec.yaml +++ b/pkgs/string_scanner/pubspec.yaml
@@ -1,5 +1,5 @@ name: string_scanner -version: 1.0.3 +version: 1.0.4 description: A class for parsing strings using a sequence of patterns. author: Dart Team <misc@dartlang.org> @@ -10,6 +10,7 @@ dependencies: charcode: ^1.1.0 + meta: ^1.1.0 source_span: ^1.4.0 dev_dependencies: