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

Side by Side Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2856123002: Add flag to track if a constructor is the synthetic default constructor. (Closed)
Patch Set: Created 3 years, 7 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 | « pkg/kernel/lib/ast.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library kernel.ast_to_text; 4 library kernel.ast_to_text;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../import_table.dart'; 7 import '../import_table.dart';
8 8
9 class Namer<T> { 9 class Namer<T> {
10 int index = 0; 10 int index = 0;
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 writeWord("/* from ${node.fileUri} */"); 726 writeWord("/* from ${node.fileUri} */");
727 } 727 }
728 writeFunction(node.function, name: getMemberName(node)); 728 writeFunction(node.function, name: getMemberName(node));
729 } 729 }
730 730
731 visitConstructor(Constructor node) { 731 visitConstructor(Constructor node) {
732 writeAnnotationList(node.annotations); 732 writeAnnotationList(node.annotations);
733 writeIndentation(); 733 writeIndentation();
734 writeModifier(node.isExternal, 'external'); 734 writeModifier(node.isExternal, 'external');
735 writeModifier(node.isConst, 'const'); 735 writeModifier(node.isConst, 'const');
736 writeModifier(node.isSyntheticDefault, 'default');
736 writeWord('constructor'); 737 writeWord('constructor');
737 writeFunction(node.function, 738 writeFunction(node.function,
738 name: node.name, initializers: node.initializers); 739 name: node.name, initializers: node.initializers);
739 } 740 }
740 741
741 visitClass(Class node) { 742 visitClass(Class node) {
742 writeAnnotationList(node.annotations); 743 writeAnnotationList(node.annotations);
743 writeIndentation(); 744 writeIndentation();
744 writeModifier(node.isAbstract, 'abstract'); 745 writeModifier(node.isAbstract, 'abstract');
745 writeWord('class'); 746 writeWord('class');
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 } 1644 }
1644 throw 'illegal ProcedureKind: $kind'; 1645 throw 'illegal ProcedureKind: $kind';
1645 } 1646 }
1646 1647
1647 class ExpressionPrinter { 1648 class ExpressionPrinter {
1648 final Printer writeer; 1649 final Printer writeer;
1649 final int minimumPrecedence; 1650 final int minimumPrecedence;
1650 1651
1651 ExpressionPrinter(this.writeer, this.minimumPrecedence); 1652 ExpressionPrinter(this.writeer, this.minimumPrecedence);
1652 } 1653 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698