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

Side by Side Diff: lib/src/js_ast/type_printer.dart

Issue 2016483002: Enable strong mode in DDC, fix all warnings/errors (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 | « lib/src/js_ast/template.dart ('k') | test/codegen_test.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) 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 4
5 part of js_ast; 5 part of js_ast;
6 6
7 abstract class _TypePrinterBase implements TypeRefVisitor { 7 abstract class _TypePrinterBase implements TypeRefVisitor {
8 void out(String s); 8 void out(String s);
9 void visit(Node node); 9 void visit(Node node);
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 @override 142 @override
143 visitIdentifier(Identifier node) { 143 visitIdentifier(Identifier node) {
144 //out(localNamer.getName(node)); 144 //out(localNamer.getName(node));
145 out(node.name); 145 out(node.name);
146 } 146 }
147 147
148 @override 148 @override
149 visitAccess(PropertyAccess node) { 149 visitAccess(PropertyAccess node) {
150 var selector = node.selector; 150 var selector = node.selector;
151 assert(selector is LiteralString); 151 if (selector is LiteralString) {
152 if (selector is! LiteralString) { 152 visit(node.receiver);
153 out(".");
154 out(selector.valueWithoutQuotes);
155 } else {
156 assert(false);
153 out("?"); 157 out("?");
154 return;
155 } 158 }
156 visit(node.receiver);
157 out(".");
158 out(selector.valueWithoutQuotes);
159 } 159 }
160 160
161 @override toString() => _buffer.toString(); 161 @override toString() => _buffer.toString();
162 162
163 @override 163 @override
164 visitArrayTypeRef(ArrayTypeRef node) { 164 visitArrayTypeRef(ArrayTypeRef node) {
165 out("Array"); 165 out("Array");
166 if (node.elementType != null) { 166 if (node.elementType != null) {
167 out("<"); 167 out("<");
168 visit(node.elementType); 168 visit(node.elementType);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 outSeparated(", ", node.paramTypes.values); 217 outSeparated(", ", node.paramTypes.values);
218 } 218 }
219 out(')'); 219 out(')');
220 if (node.returnType != null) { 220 if (node.returnType != null) {
221 out(":"); 221 out(":");
222 visit(node.returnType); 222 visit(node.returnType);
223 } 223 }
224 } 224 }
225 } 225 }
226 } 226 }
OLDNEW
« no previous file with comments | « lib/src/js_ast/template.dart ('k') | test/codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698