clang API Documentation
00001 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // AST Consumers. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef REWRITE_ASTCONSUMERS_H 00015 #define REWRITE_ASTCONSUMERS_H 00016 00017 #include "clang/Basic/LLVM.h" 00018 #include <string> 00019 00020 namespace clang { 00021 00022 class ASTConsumer; 00023 class DiagnosticsEngine; 00024 class LangOptions; 00025 class Preprocessor; 00026 00027 // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code. 00028 // This is considered experimental, and only works with Apple's ObjC runtime. 00029 ASTConsumer *CreateObjCRewriter(const std::string &InFile, 00030 raw_ostream *OS, 00031 DiagnosticsEngine &Diags, 00032 const LangOptions &LOpts, 00033 bool SilenceRewriteMacroWarning); 00034 ASTConsumer *CreateModernObjCRewriter(const std::string &InFile, 00035 raw_ostream *OS, 00036 DiagnosticsEngine &Diags, 00037 const LangOptions &LOpts, 00038 bool SilenceRewriteMacroWarning); 00039 00040 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to 00041 /// HTML with syntax highlighting suitable for viewing in a web-browser. 00042 ASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP, 00043 bool SyntaxHighlight = true, 00044 bool HighlightMacros = true); 00045 00046 } // end clang namespace 00047 00048 #endif