aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Rewrite/HTMLRewrite.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Rewrite/HTMLRewrite.h')
-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.