mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Introduce the ASTPrinter class, and have its callbacks invoked during AST printing.
This provides useful extension points during AST printing. Swift SVN r11338
This commit is contained in:
@@ -43,6 +43,7 @@ namespace clang {
|
||||
namespace swift {
|
||||
class ArchetypeType;
|
||||
class ASTContext;
|
||||
class ASTPrinter;
|
||||
class ASTWalker;
|
||||
class Type;
|
||||
class Expr;
|
||||
@@ -377,18 +378,14 @@ public:
|
||||
///
|
||||
/// \param OS Output stream to which the declaration will be printed.
|
||||
void print(raw_ostream &OS) const;
|
||||
void print(raw_ostream &OS, const PrintOptions &Opts) const;
|
||||
|
||||
/// \brief Pretty-print the given declaration.
|
||||
///
|
||||
/// \param os Output stream to which the declaration will be printed.
|
||||
/// \param Printer ASTPrinter object.
|
||||
///
|
||||
/// \param options Options to control how pretty-printing is performed.
|
||||
///
|
||||
/// \param declOffsets If non-null, will be populated with the stream offsets
|
||||
/// at which each declaration encountered is printed.
|
||||
void print(raw_ostream &os, const PrintOptions &options,
|
||||
SmallVectorImpl<std::pair<Decl *, uint64_t>> *declOffsets
|
||||
= nullptr) const;
|
||||
/// \param Opts Options to control how pretty-printing is performed.
|
||||
void print(ASTPrinter &Printer, const PrintOptions &Opts) const;
|
||||
|
||||
/// \brief Determine whether this declaration should be printed when
|
||||
/// encountered in its declaration context's list of members.
|
||||
|
||||
Reference in New Issue
Block a user