| Index: pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
|
| index 21cd030bfb63c0dba16f551bf533f3e45390e7a1..d9dc176f4e03e4e619161dd8cb72b49cd25bcc2e 100644
|
| --- a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
|
| +++ b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
|
| @@ -3,8 +3,7 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| import 'package:front_end/src/fasta/errors.dart';
|
| -import 'package:front_end/src/fasta/scanner/token.dart';
|
| -import 'package:front_end/src/scanner/token.dart' show Token;
|
| +import 'package:front_end/src/scanner/token.dart' show BeginToken, Token;
|
|
|
| /// Provides the capability of inserting tokens into a token stream by rewriting
|
| /// the previous token to point to the inserted token.
|
| @@ -27,8 +26,7 @@ class TokenStreamRewriter {
|
| /// Creates a [TokenStreamRewriter] which is prepared to rewrite the token
|
| /// stream whose first token is [firstToken].
|
| TokenStreamRewriter(Token firstToken)
|
| - : _head =
|
| - firstToken.previous ?? (new SymbolToken.eof(-1)..next = firstToken);
|
| + : _head = firstToken.previous ?? (new Token.eof(-1)..next = firstToken);
|
|
|
| /// Gets the first token in the stream (which may not be the same token that
|
| /// was passed to the constructor, if something was inserted before it).
|
| @@ -89,7 +87,7 @@ class TokenStreamRewriter {
|
| Token _scanForPreviousToken(Token target, Token pos) {
|
| while (!identical(pos.next, target)) {
|
| Token nextPos;
|
| - if (pos is BeginGroupToken &&
|
| + if (pos is BeginToken &&
|
| pos.endGroup != null &&
|
| pos.endGroup.charOffset < target.charOffset) {
|
| nextPos = pos.endGroup;
|
|
|