Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * Renames types, identifiers before printing them out. | |
| 7 */ | |
| 8 interface Renamer { | |
| 9 /** | |
| 10 * Renames type name for given type annotation. Should not touch type | |
| 11 * arguments. Returns [null] if no rename is needed. | |
| 12 */ | |
| 13 String renameTypeName(TypeAnnotation type); | |
| 14 | |
| 15 /** | |
| 16 * Renames method name. Returns [null] if no rename is needed. | |
| 17 */ | |
| 18 String renameSendMethod(Send send); | |
| 19 | |
| 20 /** | |
| 21 * Renames identifier. Returns [null] if no rename is needed. | |
| 22 */ | |
| 23 String renameIdentifier(Identifier node); | |
| 24 } | |
| 25 | |
| 26 /** | |
| 27 * Renamer that does nothing. | |
| 28 */ | |
| 29 class NoRenamer implements Renamer { | |
|
Anton Muhin
2012/07/23 17:01:27
instead of additional class, null might be default
Roman
2012/07/23 17:38:33
Done.
| |
| 30 const NoRenamer(); | |
| 31 String renameTypeName(TypeAnnotation type) => null; | |
| 32 String renameSendMethod(Send send) => null; | |
| 33 String renameIdentifier(Identifier node) => null; | |
| 34 } | |
| OLD | NEW |