LLDB mainline
|
A pair of strings that should be placed around a certain token. More...
#include <Highlighter.h>
Public Member Functions | |
ColorStyle ()=default | |
ColorStyle (llvm::StringRef prefix, llvm::StringRef suffix) | |
void | Apply (Stream &s, llvm::StringRef value) const |
Applies this style to the given value. | |
void | Set (llvm::StringRef prefix, llvm::StringRef suffix) |
Sets the prefix and suffix strings. | |
Private Attributes | |
std::string | m_prefix |
std::string | m_suffix |
A pair of strings that should be placed around a certain token.
Usually stores color codes in these strings (the suffix string is often used for resetting the terminal attributes back to normal).
Definition at line 29 of file Highlighter.h.
|
default |
|
inline |
Definition at line 35 of file Highlighter.h.
References Set().
void HighlightStyle::ColorStyle::Apply | ( | Stream & | s, |
llvm::StringRef | value | ||
) | const |
Applies this style to the given value.
s | The stream to which the result should be appended. |
value | The value that we should place our strings around. |
Definition at line 19 of file Highlighter.cpp.
References m_prefix, and m_suffix.
Referenced by lldb_private::DefaultHighlighter::Highlight(), and lldb_private::ClangHighlighter::Highlight().
void HighlightStyle::ColorStyle::Set | ( | llvm::StringRef | prefix, |
llvm::StringRef | suffix | ||
) |
Sets the prefix and suffix strings.
Definition at line 23 of file Highlighter.cpp.
References lldb_private::ansi::FormatAnsiTerminalCodes().
Referenced by ColorStyle(), and lldb_private::SourceManager::File::DisplaySourceLines().
|
private |
Definition at line 30 of file Highlighter.h.
Referenced by Apply().
|
private |
Definition at line 31 of file Highlighter.h.
Referenced by Apply().