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

Side by Side Diff: lib/compiler/implementation/tree/renamer.dart

Issue 10795064: dart2dart: Introduce Renamer that is used by renaming unparser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698