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

Side by Side Diff: pkg/analyzer/test/src/summary/element_text.dart

Issue 2978093002: Resynthesize top-level functions from Kernel. (Closed)
Patch Set: Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 writeExpression(e.name); 417 writeExpression(e.name);
418 if (e.typeArguments != null) { 418 if (e.typeArguments != null) {
419 writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression); 419 writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression);
420 } 420 }
421 } else { 421 } else {
422 fail('Unsupported expression type: ${e.runtimeType}'); 422 fail('Unsupported expression type: ${e.runtimeType}');
423 } 423 }
424 } 424 }
425 425
426 void writeFunctionElement(FunctionElement e) { 426 void writeFunctionElement(FunctionElement e) {
427 writeDocumentation(e);
428 writeMetadata(e, '', '\n');
429
427 writeIf(e.isExternal, 'external '); 430 writeIf(e.isExternal, 'external ');
428 431
429 writeType2(e.returnType); 432 writeType2(e.returnType);
430 433
431 writeName(e); 434 writeName(e);
432 435
433 writeTypeParameterElements(e.typeParameters); 436 writeTypeParameterElements(e.typeParameters);
434 writeParameterElements(e.parameters); 437 writeParameterElements(e.parameters);
435 438
436 writeBodyModifiers(e); 439 writeBodyModifiers(e);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 return components.join(';'); 839 return components.join(';');
837 } 840 }
838 } 841 }
839 842
840 class _Replacement { 843 class _Replacement {
841 final int offset; 844 final int offset;
842 final int end; 845 final int end;
843 final String text; 846 final String text;
844 _Replacement(this.offset, this.end, this.text); 847 _Replacement(this.offset, this.end, this.text);
845 } 848 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698