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

Side by Side Diff: pkg/analysis_server/lib/src/status/ast_writer.dart

Issue 2624283003: Revert "Add support for generic function type syntax, part 1" (TBR) (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analysis_server.src.status.ast_writer; 5 library analysis_server.src.status.ast_writer;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/status/tree_writer.dart'; 9 import 'package:analysis_server/src/status/tree_writer.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 properties['static element'] = node.staticElement; 134 properties['static element'] = node.staticElement;
135 } else if (node is SimpleIdentifier) { 135 } else if (node is SimpleIdentifier) {
136 properties['static element'] = node.staticElement; 136 properties['static element'] = node.staticElement;
137 properties['static type'] = node.staticType; 137 properties['static type'] = node.staticType;
138 properties['propagated element'] = node.propagatedElement; 138 properties['propagated element'] = node.propagatedElement;
139 properties['propagated type'] = node.propagatedType; 139 properties['propagated type'] = node.propagatedType;
140 } else if (node is SimpleStringLiteral) { 140 } else if (node is SimpleStringLiteral) {
141 properties['value'] = node.value; 141 properties['value'] = node.value;
142 } else if (node is SuperConstructorInvocation) { 142 } else if (node is SuperConstructorInvocation) {
143 properties['static element'] = node.staticElement; 143 properties['static element'] = node.staticElement;
144 } else if (node is TypeAnnotation) { 144 } else if (node is TypeName) {
145 properties['type'] = node.type; 145 properties['type'] = node.type;
146 } else if (node is VariableDeclarationList) { 146 } else if (node is VariableDeclarationList) {
147 properties['keyword'] = node.keyword; 147 properties['keyword'] = node.keyword;
148 } else if (node is Declaration) { 148 } else if (node is Declaration) {
149 properties['element'] = node.element; 149 properties['element'] = node.element;
150 } else if (node is Expression) { 150 } else if (node is Expression) {
151 properties['static type'] = node.staticType; 151 properties['static type'] = node.staticType;
152 properties['propagated type'] = node.propagatedType; 152 properties['propagated type'] = node.propagatedType;
153 } else if (node is FunctionBody) { 153 } else if (node is FunctionBody) {
154 properties['isAsynchronous'] = node.isAsynchronous; 154 properties['isAsynchronous'] = node.isAsynchronous;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return nameNode.name; 188 return nameNode.name;
189 } 189 }
190 } else if (node is FunctionTypeAlias) { 190 } else if (node is FunctionTypeAlias) {
191 return node.name.name; 191 return node.name.name;
192 } else if (node is Identifier) { 192 } else if (node is Identifier) {
193 return node.name; 193 return node.name;
194 } else if (node is MethodDeclaration) { 194 } else if (node is MethodDeclaration) {
195 return node.name.name; 195 return node.name.name;
196 } else if (node is TopLevelVariableDeclaration) { 196 } else if (node is TopLevelVariableDeclaration) {
197 return _getNames(node.variables); 197 return _getNames(node.variables);
198 } else if (node is TypeAnnotation) { 198 } else if (node is TypeName) {
199 return node.toSource(); 199 return node.toSource();
200 } else if (node is TypeParameter) { 200 } else if (node is TypeParameter) {
201 return node.name.name; 201 return node.name.name;
202 } else if (node is VariableDeclaration) { 202 } else if (node is VariableDeclaration) {
203 return node.name.name; 203 return node.name.name;
204 } 204 }
205 return null; 205 return null;
206 } 206 }
207 207
208 /** 208 /**
(...skipping 25 matching lines...) Expand all
234 buffer.write('..'); 234 buffer.write('..');
235 buffer.write(node.offset + node.length - 1); 235 buffer.write(node.offset + node.length - 1);
236 buffer.write(']'); 236 buffer.write(']');
237 if (node.isSynthetic) { 237 if (node.isSynthetic) {
238 buffer.write(' (synthetic)'); 238 buffer.write(' (synthetic)');
239 } 239 }
240 buffer.write('</span>'); 240 buffer.write('</span>');
241 buffer.write('<br>'); 241 buffer.write('<br>');
242 } 242 }
243 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698