Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 2948393002: Clean up type parameters in comments (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | pkg/analyzer/lib/src/dart/constant/evaluation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ccb388e64c02c03fe1b9925bdbfb846dc2eea667..5f2d0b47ddc1357e9b27c3999b6dd0341bd5557d 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -70,22 +70,22 @@ class AstCloner implements AstVisitor<AstNode> {
/**
* Return a clone of the given [node].
*/
- AstNode/*=E*/ cloneNode/*<E extends AstNode>*/(AstNode/*=E*/ node) {
+ E cloneNode<E extends AstNode>(E node) {
if (node == null) {
return null;
}
- return node.accept(this) as AstNode/*=E*/;
+ return node.accept(this) as E;
}
/**
* Return a list containing cloned versions of the nodes in the given list of
* [nodes].
*/
- List<AstNode/*=E*/ > cloneNodeList/*<E extends AstNode>*/(List/*<E>*/ nodes) {
+ List<E> cloneNodeList<E extends AstNode>(List<E> nodes) {
int count = nodes.length;
- List/*<E>*/ clonedNodes = new List/*<E>*/();
+ List<E> clonedNodes = new List<E>();
for (int i = 0; i < count; i++) {
- clonedNodes.add((nodes[i]).accept(this) as AstNode/*=E*/);
+ clonedNodes.add((nodes[i]).accept(this) as E);
}
return clonedNodes;
}
@@ -3874,19 +3874,19 @@ class IncrementalAstCloner implements AstVisitor<AstNode> {
_cloneNode(node.expression),
_mapToken(node.semicolon));
- AstNode/*=E*/ _cloneNode/*<E extends AstNode>*/(AstNode/*=E*/ node) {
+ E _cloneNode<E extends AstNode>(E node) {
if (node == null) {
return null;
}
if (identical(node, _oldNode)) {
- return _newNode as AstNode/*=E*/;
+ return _newNode as E;
}
- return node.accept(this) as AstNode/*=E*/;
+ return node.accept(this) as E;
}
- List/*<E>*/ _cloneNodeList/*<E extends AstNode>*/(NodeList/*<E>*/ nodes) {
- List/*<E>*/ clonedNodes = new List/*<E>*/();
- for (AstNode/*=E*/ node in nodes) {
+ List<E> _cloneNodeList<E extends AstNode>(NodeList<E> nodes) {
+ List<E> clonedNodes = new List<E>();
+ for (E node in nodes) {
clonedNodes.add(_cloneNode(node));
}
return clonedNodes;
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast_factory.dart ('k') | pkg/analyzer/lib/src/dart/constant/evaluation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698