aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Rewrite
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-18 23:55:46 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-18 23:55:46 +0000
commit1b3188cfc2bfaeb14d40c43c1df62097b79016d1 (patch)
treee40c98138b3f0691345984ae7f5a9548bd3ac00b /include/clang/Rewrite
parentb485cd1e0a5a1e942d0e682b9b1c4bc9df111528 (diff)
More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Rewrite')
-rw-r--r--include/clang/Rewrite/HTMLRewrite.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/clang/Rewrite/HTMLRewrite.h b/include/clang/Rewrite/HTMLRewrite.h
index 3f821cc1fd..dddde01068 100644
--- a/include/clang/Rewrite/HTMLRewrite.h
+++ b/include/clang/Rewrite/HTMLRewrite.h
@@ -30,15 +30,33 @@ namespace html {
HEAD,
HTML,
PRE,
- SPAN };
+ SPAN,
+ STYLE };
void EscapeText(Rewriter& R, unsigned FileID, bool EscapeSpaces = false);
void InsertTag(Rewriter& R, Tags tag,
SourceLocation OpenLoc, SourceLocation CloseLoc,
- const char* Attributes = NULL, const char* Content = NULL,
+ const char* Attrs = NULL, const char* Content = NULL,
bool Newline = false,
- bool OpenInsertBefore = true, bool CloseInsertAfter = true);
+ bool OpenInsertBefore = true, bool CloseInsertBefore = false);
+
+ static inline
+ void InsertTagBefore(Rewriter& R, Tags tag,
+ SourceLocation OpenLoc, SourceLocation CloseLoc,
+ const char* Attrs = NULL, const char* Content = NULL,
+ bool Newline = false) {
+ InsertTag(R, tag, OpenLoc, CloseLoc, Attrs, Content, Newline, true, true);
+ }
+
+ static inline
+ void InsertOuterTag(Rewriter& R, Tags tag,
+ SourceLocation OpenLoc, SourceLocation CloseLoc,
+ const char* Attrs = NULL, const char* Content = NULL,
+ bool Newline = false) {
+
+ InsertTag(R, tag, OpenLoc, CloseLoc, Attrs, Content, Newline, true, false);
+ }
// High-level operations.