| Index: pkg/analyzer/lib/src/generated/parser.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
|
| index c90928f8fc26bd1fafc715eb46010b02bfd9d3c7..748fbba36af05e1edab0d3f958fad8723dab227a 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -5033,11 +5033,6 @@ class Parser {
|
| String referenceSource, int sourceOffset) {
|
| // TODO(brianwilkerson) The errors are not getting the right offset/length
|
| // and are being duplicated.
|
| - if (referenceSource.length == 0) {
|
| - Token syntheticToken =
|
| - new SyntheticStringToken(TokenType.IDENTIFIER, "", sourceOffset);
|
| - return new CommentReference(null, new SimpleIdentifier(syntheticToken));
|
| - }
|
| try {
|
| BooleanErrorListener listener = new BooleanErrorListener();
|
| Scanner scanner = new Scanner(
|
| @@ -5047,6 +5042,12 @@ class Parser {
|
| if (listener.errorReported) {
|
| return null;
|
| }
|
| + if (firstToken.type == TokenType.EOF) {
|
| + Token syntheticToken =
|
| + new SyntheticStringToken(TokenType.IDENTIFIER, "", sourceOffset);
|
| + syntheticToken.setNext(firstToken);
|
| + return new CommentReference(null, new SimpleIdentifier(syntheticToken));
|
| + }
|
| Token newKeyword = null;
|
| if (_tokenMatchesKeyword(firstToken, Keyword.NEW)) {
|
| newKeyword = firstToken;
|
|
|