OLD | NEW |
---|---|
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.generated.parser; | 5 library analyzer.src.generated.parser; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import "dart:math" as math; | 8 import "dart:math" as math; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3944 } | 3944 } |
3945 | 3945 |
3946 bool _injectGenericComment(TokenType type, int prefixLen) { | 3946 bool _injectGenericComment(TokenType type, int prefixLen) { |
3947 if (parseGenericMethodComments) { | 3947 if (parseGenericMethodComments) { |
3948 CommentToken t = _currentToken.precedingComments; | 3948 CommentToken t = _currentToken.precedingComments; |
3949 for (; t != null; t = t.next) { | 3949 for (; t != null; t = t.next) { |
3950 if (t.type == type) { | 3950 if (t.type == type) { |
3951 String comment = t.lexeme.substring(prefixLen, t.lexeme.length - 2); | 3951 String comment = t.lexeme.substring(prefixLen, t.lexeme.length - 2); |
3952 Token list = _scanGenericMethodComment(comment, t.offset + prefixLen); | 3952 Token list = _scanGenericMethodComment(comment, t.offset + prefixLen); |
3953 if (list != null) { | 3953 if (list != null) { |
3954 // Remove the tokens from the comment stream. | |
Bob Nystrom
2016/02/18 16:58:58
Nit: "tokens" -> "token".
The overall effect of t
| |
3955 t.remove(); | |
3954 // Insert the tokens into the stream. | 3956 // Insert the tokens into the stream. |
3955 _injectTokenList(list); | 3957 _injectTokenList(list); |
3956 return true; | 3958 return true; |
3957 } | 3959 } |
3958 } | 3960 } |
3959 } | 3961 } |
3960 } | 3962 } |
3961 return false; | 3963 return false; |
3962 } | 3964 } |
3963 | 3965 |
(...skipping 7388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11352 } | 11354 } |
11353 | 11355 |
11354 /** | 11356 /** |
11355 * Copy resolution data from the [fromNode] to the [toNode]. | 11357 * Copy resolution data from the [fromNode] to the [toNode]. |
11356 */ | 11358 */ |
11357 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 11359 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
11358 ResolutionCopier copier = new ResolutionCopier(); | 11360 ResolutionCopier copier = new ResolutionCopier(); |
11359 copier._isEqualNodes(fromNode, toNode); | 11361 copier._isEqualNodes(fromNode, toNode); |
11360 } | 11362 } |
11361 } | 11363 } |
OLD | NEW |