diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-16 06:11:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-16 06:11:58 +0000 |
commit | 3245a0a1c7a4fd74fca845b2edba275bb126d773 (patch) | |
tree | ab2aab4b4acc1ce3427c823ee94da56635472898 /include/clang/Rewrite/HTMLRewrite.h | |
parent | 8ac661c3c5ffaeedfb3268994ad864ade77b3ba0 (diff) |
Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Rewrite/HTMLRewrite.h')
-rw-r--r-- | include/clang/Rewrite/HTMLRewrite.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Rewrite/HTMLRewrite.h b/include/clang/Rewrite/HTMLRewrite.h index d5bdc89070..520030fcdf 100644 --- a/include/clang/Rewrite/HTMLRewrite.h +++ b/include/clang/Rewrite/HTMLRewrite.h @@ -21,6 +21,7 @@ namespace clang { class Rewriter; +class Preprocessor; namespace html { @@ -42,7 +43,12 @@ namespace html { void AddLineNumbers(Rewriter& R, unsigned FileID); void AddHeaderFooterInternalBuiltinCSS(Rewriter& R, unsigned FileID); - + + /// SyntaxHighlight - Relex the specified FileID and annotate the HTML with + /// information about keywords, macro expansions etc. This uses the macro + /// table state from the end of the file, so it won't be perfectly perfect, + /// but it will be reasonably close. + void SyntaxHighlight(Rewriter &R, unsigned FileID, Preprocessor &PP); } // end html namespace } // end clang namespace |