Chromium Code Reviews| Index: pkg/analyzer/lib/src/dart/ast/utilities.dart |
| diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart |
| index 05ff07f1442b04ef2e3ca3b6c19b8e3e0ee53f42..107a28b1f691721f37965cda94e51ca69c77c802 100644 |
| --- a/pkg/analyzer/lib/src/dart/ast/utilities.dart |
| +++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart |
| @@ -42,7 +42,7 @@ class AstCloner implements AstVisitor<AstNode> { |
| /** |
| * The last cloned token. |
| */ |
| - Token _lastCloned; |
| + Token _lastCloned = new Token(TokenType.EOF, -1); |
|
Brian Wilkerson
2016/02/18 21:00:34
The EOF token should be it's own 'previous' token.
|
| /** |
| * The offset of the last cloned token. |
| @@ -952,7 +952,7 @@ class AstCloner implements AstVisitor<AstNode> { |
| } |
| } |
| _clonedTokens[token] = clone; |
| - _lastCloned?.setNext(clone); |
| + _lastCloned.setNext(clone); |
| _lastCloned = clone; |
| if (token.type == TokenType.EOF) { |
| break; |