#include <AstDumper.h>
Public Member Functions | |
virtual | ~AstDumperBase () |
AstDumperBase (llvm::raw_ostream &S) | |
Constructs a dumper which prints to the given stream. | |
Protected Member Functions | |
void | indent () |
void | dedent () |
Decrements the indentation level. | |
virtual llvm::raw_ostream & | printHeader (Ast *node) |
llvm::raw_ostream & | printIndentation () |
llvm::raw_ostream & | dumpParamMode (PM::ParameterMode mode) |
Protected Attributes | |
llvm::raw_ostream & | S |
The stream we are writing to. | |
unsigned | indentLevel |
The current indentation level. |
A virtual base class encapsulating common functionality amongst the various dumpers.
Definition at line 36 of file AstDumper.h.
virtual comma::AstDumperBase::~AstDumperBase | ( | ) | [inline, virtual] |
Definition at line 39 of file AstDumper.h.
comma::AstDumperBase::AstDumperBase | ( | llvm::raw_ostream & | S | ) | [inline] |
Constructs a dumper which prints to the given stream.
Definition at line 42 of file AstDumper.h.
void comma::AstDumperBase::dedent | ( | ) | [inline, protected] |
Decrements the indentation level.
Definition at line 56 of file AstDumper.h.
llvm::raw_ostream & AstDumperBase::dumpParamMode | ( | PM::ParameterMode | mode | ) | [protected] |
Prints a code indicating the given parameter mode to the stream. Either "I", "O", "IO", or "D" is printed (no trailing space), meaning "in" "out" "in out" or default, respecively.
Definition at line 46 of file AstDumper.cpp.
void comma::AstDumperBase::indent | ( | ) | [inline, protected] |
Increments the indentation level. Typically, this is paired with a corresponding call to dedent().
Definition at line 53 of file AstDumper.h.
llvm::raw_ostream & AstDumperBase::printHeader | ( | Ast * | node | ) | [protected, virtual] |
Prints a common header to the stream of the form "<kind-name pointer-value". Note the lack of a trailing space. This method can be overriden in subclasses to implement their own notion of a common header.
Definition at line 31 of file AstDumper.cpp.
llvm::raw_ostream & AstDumperBase::printIndentation | ( | ) | [protected] |
Emits this->indentLevel many spaces onto the output stream.
FIXME: This method can be removed once llvm-2.7 is released. raw_ostream should have its own indent method at that time.
Definition at line 39 of file AstDumper.cpp.
unsigned comma::AstDumperBase::indentLevel [protected] |
The current indentation level.
Definition at line 49 of file AstDumper.h.
llvm::raw_ostream& comma::AstDumperBase::S [protected] |
The stream we are writing to.
Definition at line 46 of file AstDumper.h.