clang 19.0.0git
Namespaces | Typedefs | Functions
HTMLRewrite.h File Reference
#include "clang/Basic/SourceLocation.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::html
 

Typedefs

using clang::html::RelexRewriteCacheRef = std::shared_ptr< RelexRewriteCache >
 

Functions

RelexRewriteCacheRef clang::html::instantiateRelexRewriteCache ()
 If you need to rewrite the same file multiple times, you can instantiate a RelexRewriteCache and refer functions such as SyntaxHighlight() and HighlightMacros() to it so that to avoid re-lexing the file each time.
 
void clang::html::HighlightRange (Rewriter &R, SourceLocation B, SourceLocation E, const char *StartTag, const char *EndTag, bool IsTokenRange=true)
 HighlightRange - Highlight a range in the source code with the specified start/end tags.
 
void clang::html::HighlightRange (Rewriter &R, SourceRange Range, const char *StartTag, const char *EndTag)
 HighlightRange - Highlight a range in the source code with the specified start/end tags.
 
void clang::html::HighlightRange (RewriteBuffer &RB, unsigned B, unsigned E, const char *BufferStart, const char *StartTag, const char *EndTag)
 HighlightRange - This is the same as the above method, but takes decomposed file locations.
 
void clang::html::EscapeText (Rewriter &R, FileID FID, bool EscapeSpaces=false, bool ReplaceTabs=false)
 EscapeText - HTMLize a specified file so that special characters are are translated so that they are not interpreted as HTML tags.
 
std::string clang::html::EscapeText (StringRef s, bool EscapeSpaces=false, bool ReplaceTabs=false)
 EscapeText - HTMLized the provided string so that special characters in 's' are not interpreted as HTML tags.
 
void clang::html::AddLineNumbers (Rewriter &R, FileID FID)
 
void clang::html::AddHeaderFooterInternalBuiltinCSS (Rewriter &R, FileID FID, StringRef title)
 
void clang::html::SyntaxHighlight (Rewriter &R, FileID FID, const Preprocessor &PP, RelexRewriteCacheRef Cache=nullptr)
 SyntaxHighlight - Relex the specified FileID and annotate the HTML with information about keywords, comments, etc.
 
void clang::html::HighlightMacros (Rewriter &R, FileID FID, const Preprocessor &PP, RelexRewriteCacheRef Cache=nullptr)
 HighlightMacros - This uses the macro table state from the end of the file, to reexpand macros and insert (into the HTML) information about the macro expansions.