Index: pkg/front_end/lib/src/fasta/analyzer/token_utils.dart |
diff --git a/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart b/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart |
index 11915cf7abc27775b0b472111e0b8a2324a06d1e..b1244f24b4f6842e1677a88fa407c1b9e8cbb122 100644 |
--- a/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart |
+++ b/pkg/front_end/lib/src/fasta/analyzer/token_utils.dart |
@@ -282,6 +282,7 @@ Token fromAnalyzerTokenStream(analyzer.Token analyzerToken) { |
token = token.next; |
while (token != null) { |
tail.next = fromAnalyzerToken(token); |
+ tail.next.previousToken = tail; |
tail = tail.next; |
token = token.next; |
} |
@@ -293,6 +294,7 @@ Token fromAnalyzerTokenStream(analyzer.Token analyzerToken) { |
token.precedingComments = |
translateComments(analyzerToken.precedingComments); |
tokenTail.next = token; |
+ tokenTail.next.previousToken = tokenTail; |
tokenTail = token; |
matchGroups(analyzerToken, token); |
return analyzerToken.next; |
@@ -302,6 +304,7 @@ Token fromAnalyzerTokenStream(analyzer.Token analyzerToken) { |
// TODO(paulberry): join up begingroup/endgroup. |
if (analyzerToken.type == TokenType.EOF) { |
tokenTail.next = new SymbolToken(EOF_INFO, analyzerToken.offset); |
+ tokenTail.next.previousToken = tokenTail; |
tokenTail.next.precedingComments = |
translateComments(analyzerToken.precedingComments); |
return tokenHead.next; |