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

Side by Side Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 2535373003: Resolve type arguments to generic methods. (Closed)
Patch Set: Created 4 years 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 '../tokens/token.dart' show Token; 5 import '../tokens/token.dart' show Token;
6 import '../tokens/token_constants.dart' as Tokens 6 import '../tokens/token_constants.dart' as Tokens
7 show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN; 7 show IDENTIFIER_TOKEN, KEYWORD_TOKEN, PLUS_TOKEN;
8 import '../util/util.dart'; 8 import '../util/util.dart';
9 import 'nodes.dart'; 9 import 'nodes.dart';
10 10
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 unparseSendArgument(Send node, {bool spacesNeeded: false}) { 450 unparseSendArgument(Send node, {bool spacesNeeded: false}) {
451 if (node.argumentsNode == null) return; 451 if (node.argumentsNode == null) return;
452 452
453 if (node.isIsNotCheck) { 453 if (node.isIsNotCheck) {
454 Send argNode = node.arguments.head; 454 Send argNode = node.arguments.head;
455 visit(argNode.selector); 455 visit(argNode.selector);
456 space(); 456 space();
457 visit(argNode.receiver); 457 visit(argNode.receiver);
458 } else { 458 } else {
459 if (spacesNeeded) write(' '); 459 if (spacesNeeded) write(' ');
460 visit(node.typeArgumentsNode);
eernst 2016/11/30 10:39:01 Yes! If this is used to format diagnostic messages
460 visit(node.argumentsNode); 461 visit(node.argumentsNode);
461 } 462 }
462 } 463 }
463 464
464 visitSend(Send node) { 465 visitSend(Send node) {
465 Operator op = node.selector.asOperator(); 466 Operator op = node.selector.asOperator();
466 String opString = op != null ? op.source : null; 467 String opString = op != null ? op.source : null;
467 bool spacesNeeded = minify 468 bool spacesNeeded = minify
468 ? identical(opString, 'is') || identical(opString, 'as') 469 ? identical(opString, 'is') || identical(opString, 'as')
469 : (opString != null && !node.isPrefix && !node.isIndex); 470 : (opString != null && !node.isPrefix && !node.isIndex);
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 } 898 }
898 899
899 visitStatement(Statement node) { 900 visitStatement(Statement node) {
900 throw 'internal error'; // Should not be called. 901 throw 'internal error'; // Should not be called.
901 } 902 }
902 903
903 visitStringNode(StringNode node) { 904 visitStringNode(StringNode node) {
904 throw 'internal error'; // Should not be called. 905 throw 'internal error'; // Should not be called.
905 } 906 }
906 } 907 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698