aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Rewrite/HTMLRewrite.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-16 22:45:51 +0000
committerChris Lattner <sabre@nondot.org>2008-04-16 22:45:51 +0000
commit5ef3e2c45f13fccdb0d7bbcf24c1beee8eee6f64 (patch)
treeccdd23cbfa647e9b587179012dd28dd16718aa47 /include/clang/Rewrite/HTMLRewrite.h
parentdb86371cb5647e64711afde1f638f77b29695d45 (diff)
add a new HighlightRange API, it doesn't handle multiline ranges
yet, but it will soon... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Rewrite/HTMLRewrite.h')
-rw-r--r--include/clang/Rewrite/HTMLRewrite.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Rewrite/HTMLRewrite.h b/include/clang/Rewrite/HTMLRewrite.h
index be16eaaab1..69afa1caac 100644
--- a/include/clang/Rewrite/HTMLRewrite.h
+++ b/include/clang/Rewrite/HTMLRewrite.h
@@ -25,6 +25,19 @@ class Preprocessor;
namespace html {
+ /// HighlightRange - Highlight a range in the source code with the specified
+ /// start/end tags. B/E must be in the same file. This ensures that
+ /// start/end tags are placed at the start/end of each line if the range is
+ /// multiline.
+ void HighlightRange(Rewriter &R, SourceLocation B, SourceLocation E,
+ const char *StartTag, const char *EndTag);
+
+ /// HighlightRange - This is the same as the above method, but takes
+ /// decomposed file locations.
+ void HighlightRange(RewriteBuffer &RB, unsigned B, unsigned E,
+ const char *BufferStart,
+ const char *StartTag, const char *EndTag);
+
/// EscapeText - HTMLize a specified file so that special characters are
/// are translated so that they are not interpreted as HTML tags. In this
/// version tabs are not replaced with spaces by default, as this can
@@ -55,6 +68,7 @@ namespace html {
void HighlightMacros(Rewriter &R, unsigned FileID, Preprocessor &PP);
+
} // end html namespace
} // end clang namespace