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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 2188403002: Revert "fix #26141, add support for type arguments to constants" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/constant/evaluation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.dart.ast.utilities; 5 library analyzer.src.dart.ast.utilities;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return null; 65 return null;
66 } 66 }
67 return node.accept(this) as AstNode/*=E*/; 67 return node.accept(this) as AstNode/*=E*/;
68 } 68 }
69 69
70 /** 70 /**
71 * Return a list containing cloned versions of the nodes in the given list of 71 * Return a list containing cloned versions of the nodes in the given list of
72 * [nodes]. 72 * [nodes].
73 */ 73 */
74 List<AstNode/*=E*/ > cloneNodeList/*<E extends AstNode>*/( 74 List<AstNode/*=E*/ > cloneNodeList/*<E extends AstNode>*/(
75 List/*<E>*/ nodes) { 75 NodeList/*<E>*/ nodes) {
76 int count = nodes.length; 76 int count = nodes.length;
77 List/*<E>*/ clonedNodes = new List/*<E>*/(); 77 List/*<E>*/ clonedNodes = new List/*<E>*/();
78 for (int i = 0; i < count; i++) { 78 for (int i = 0; i < count; i++) {
79 clonedNodes.add((nodes[i]).accept(this) as AstNode/*=E*/); 79 clonedNodes.add((nodes[i]).accept(this) as AstNode/*=E*/);
80 } 80 }
81 return clonedNodes; 81 return clonedNodes;
82 } 82 }
83 83
84 /** 84 /**
85 * Clone the given [token] if tokens are supposed to be cloned. 85 * Clone the given [token] if tokens are supposed to be cloned.
(...skipping 7743 matching lines...) Expand 10 before | Expand all | Expand 10 after
7829 * Safely visit the given [token], printing the [suffix] after the token if it 7829 * Safely visit the given [token], printing the [suffix] after the token if it
7830 * is non-`null`. 7830 * is non-`null`.
7831 */ 7831 */
7832 void _visitTokenWithSuffix(Token token, String suffix) { 7832 void _visitTokenWithSuffix(Token token, String suffix) {
7833 if (token != null) { 7833 if (token != null) {
7834 _writer.print(token.lexeme); 7834 _writer.print(token.lexeme);
7835 _writer.print(suffix); 7835 _writer.print(suffix);
7836 } 7836 }
7837 } 7837 }
7838 } 7838 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/constant/evaluation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698