This machine mirrors various open-source projects.
20 Gbit/s uplink.
If there are any issues or you want another project mirrored, please contact
mirror-service -=AT=- netcologne DOT de !
00001 //===-- ast/ExprDumper.h -------------------------------------- -*- C++ -*-===// 00002 // 00003 // This file is distributed under the MIT license. See LICENSE.txt for details. 00004 // 00005 // Copyright (C) 2009-2010, Stephen Wilson 00006 // 00007 //===----------------------------------------------------------------------===// 00008 00009 //===----------------------------------------------------------------------===// 00017 //===----------------------------------------------------------------------===// 00018 00019 #ifndef COMMA_AST_EXPRDUMPER_HDR_GUARD 00020 #define COMMA_AST_EXPRDUMPER_HDR_GUARD 00021 00022 #include "AstDumper.h" 00023 #include "comma/ast/ExprVisitor.h" 00024 00025 namespace comma { 00026 00027 class ExprDumper : public AstDumperBase, private ExprVisitor { 00028 00029 public: 00032 ExprDumper(llvm::raw_ostream &stream, AstDumper *dumper) 00033 : AstDumperBase(stream), 00034 dumper(dumper) { } 00035 00038 llvm::raw_ostream &dump(Expr *expr, unsigned level = 0); 00039 00040 private: 00042 AstDumper *dumper; 00043 00045 llvm::raw_ostream &dumpAST(Ast* node) { 00046 return dumper->dump(node, indentLevel); 00047 } 00048 00059 void visitDeclRefExpr(DeclRefExpr *node); 00060 void visitFunctionCallExpr(FunctionCallExpr *node); 00061 void visitIndexedArrayExpr(IndexedArrayExpr *node); 00062 void visitInjExpr(InjExpr *node); 00063 void visitPrjExpr(PrjExpr *node); 00064 void visitIntegerLiteral(IntegerLiteral *node); 00065 void visitStringLiteral(StringLiteral *node); 00066 void visitAggregateExpr(AggregateExpr *node); 00067 void visitConversionExpr(ConversionExpr *node); 00068 void visitNullExpr(NullExpr *node); 00069 void visitQualifiedExpr(QualifiedExpr *node); 00070 void visitDereferenceExpr(DereferenceExpr *node); 00071 void visitAllocatorExpr(AllocatorExpr *node); 00072 void visitSelectedExpr(SelectedExpr *node); 00073 }; 00074 00075 } // end comma namespace. 00076 00077 #endif