Skip to content

Commit 5320032

Browse files
committed
Stop using deprecated ParserErrorCode.UNEXPECTED_TOKEN.
In https://dart-review.googlesource.com/c/sdk/+/444921, all analyzer error constants were renamed to camelCase, but ParserErrorCode.UNEXPECTED_TOKEN was left in place (and deprecated) since it is used by dart_style. This change updates dart_style to use the new camelCase declaration.
1 parent 34742d7 commit 5320032

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/dart_formatter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ final class DartFormatter {
200200
source: stringSource,
201201
offset: token.offset - inputOffset,
202202
length: math.max(token.length, 1),
203-
diagnosticCode: ParserErrorCode.UNEXPECTED_TOKEN,
203+
diagnosticCode: ParserErrorCode.unexpectedToken,
204204
arguments: [token.lexeme],
205205
);
206206
throw FormatterException([error]);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
sdk: ^3.7.0
1010

1111
dependencies:
12-
analyzer: ^8.1.0
12+
analyzer: ^8.2.0
1313
args: ^2.0.0
1414
collection: ^1.19.0
1515
package_config: ^2.1.0

0 commit comments

Comments
 (0)