| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.scanner.abstract_scanner; | 5 library fasta.scanner.abstract_scanner; |
| 6 | 6 |
| 7 import 'dart:collection' show ListMixin; | 7 import 'dart:collection' show ListMixin; |
| 8 | 8 |
| 9 import 'dart:typed_data' show Uint16List, Uint32List; | 9 import 'dart:typed_data' show Uint16List, Uint32List; |
| 10 | 10 |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 } | 858 } |
| 859 | 859 |
| 860 /** | 860 /** |
| 861 * Append the given token to the [tail] of the current stream of tokens. | 861 * Append the given token to the [tail] of the current stream of tokens. |
| 862 */ | 862 */ |
| 863 void appendToken(Token token) { | 863 void appendToken(Token token) { |
| 864 tail.next = token; | 864 tail.next = token; |
| 865 tail.next.previousToken = tail; | 865 tail.next.previousToken = tail; |
| 866 tail = tail.next; | 866 tail = tail.next; |
| 867 if (comments != null) { | 867 if (comments != null) { |
| 868 for (CommentToken c = comments; c != null; c = c.next) { |
| 869 c.parent = tail; |
| 870 } |
| 868 tail.precedingCommentTokens = comments; | 871 tail.precedingCommentTokens = comments; |
| 869 comments = null; | 872 comments = null; |
| 870 commentsTail = null; | 873 commentsTail = null; |
| 871 } | 874 } |
| 872 } | 875 } |
| 873 | 876 |
| 874 void _appendToCommentStream(Token newComment) { | 877 void _appendToCommentStream(Token newComment) { |
| 875 if (comments == null) { | 878 if (comments == null) { |
| 876 comments = newComment; | 879 comments = newComment; |
| 877 commentsTail = comments; | 880 commentsTail = comments; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 switchToUint32(newLength); | 1284 switchToUint32(newLength); |
| 1282 } | 1285 } |
| 1283 } | 1286 } |
| 1284 | 1287 |
| 1285 void switchToUint32(int newLength) { | 1288 void switchToUint32(int newLength) { |
| 1286 final newArray = new Uint32List(newLength); | 1289 final newArray = new Uint32List(newLength); |
| 1287 newArray.setRange(0, arrayLength, array); | 1290 newArray.setRange(0, arrayLength, array); |
| 1288 array = newArray; | 1291 array = newArray; |
| 1289 } | 1292 } |
| 1290 } | 1293 } |
| OLD | NEW |