Go to the documentation of this file.
19 s << m_prefix << value << m_suffix;
23 llvm::StringRef suffix) {
30 llvm::Optional<size_t> cursor_pos,
31 llvm::StringRef previous_lines,
34 if (!cursor_pos || *cursor_pos >= line.size()) {
43 size_t column = *cursor_pos;
45 s << line.substr(0, column);
49 s << line.substr(column + 1U);
66 llvm::StringRef path)
const {
75 llvm::Optional<size_t> cursor_pos,
76 llvm::StringRef previous_lines)
const {
78 Highlight(options, line, cursor_pos, previous_lines, s);
static HighlightStyle MakeVimStyle()
Returns a HighlightStyle that is based on vim's default highlight style.
void Set(llvm::StringRef prefix, llvm::StringRef suffix)
Sets the prefix and suffix strings.
const Highlighter & getHighlighterFor(lldb::LanguageType language_type, llvm::StringRef path) const
Queries all known highlighter for one that can highlight some source code.
LanguageType
Programming language type.
static HighlightStyle::ColorStyle GetColor(const char *c)
ColorStyle selected
The style for the token which is below the cursor of the user.
ColorStyle scalar_literal
Matches scalar value literals like '42' or '0.1'.
llvm::StringRef GetString() const
Annotates source code with color attributes.
ColorStyle keyword
Matches all reserved keywords in the language.
ColorStyle comment
Matches any comments in the language.
string(SUBSTRING ${p} 10 -1 pStripped) if($
static Language * FindPlugin(lldb::LanguageType language)
void Highlight(const HighlightStyle &options, llvm::StringRef line, llvm::Optional< size_t > cursor_pos, llvm::StringRef previous_lines, Stream &s) const override
Highlights the given line.
Represents style that the highlighter should apply to the given source code.
A class that represents a running process on the host machine.
virtual const Highlighter * GetHighlighter() const
void Flush() override
Flush the stream.
A pair of strings that should be placed around a certain token.
void Apply(Stream &s, llvm::StringRef value) const
Applies this style to the given value.
std::string FormatAnsiTerminalCodes(llvm::StringRef format, bool do_color=true)
virtual void Highlight(const HighlightStyle &options, llvm::StringRef line, llvm::Optional< size_t > cursor_pos, llvm::StringRef previous_lines, Stream &s) const =0
Highlights the given line.