LLDB mainline
Classes | Static Public Member Functions | Public Attributes | List of all members
lldb_private::HighlightStyle Struct Reference

Represents style that the highlighter should apply to the given source code. More...

#include <Highlighter.h>

Classes

class  ColorStyle
 A pair of strings that should be placed around a certain token. More...
 

Static Public Member Functions

static HighlightStyle MakeVimStyle ()
 Returns a HighlightStyle that is based on vim's default highlight style.
 

Public Attributes

ColorStyle selected
 The style for the token which is below the cursor of the user.
 
ColorStyle identifier
 Matches identifiers to variable or functions.
 
ColorStyle string_literal
 Matches any string or character literals in the language: "foo" or 'f'.
 
ColorStyle scalar_literal
 Matches scalar value literals like '42' or '0.1'.
 
ColorStyle keyword
 Matches all reserved keywords in the language.
 
ColorStyle comment
 Matches any comments in the language.
 
ColorStyle comma
 Matches commas: ','.
 
ColorStyle colon
 Matches one colon: ':'.
 
ColorStyle semicolons
 Matches any semicolon: ';'.
 
ColorStyle operators
 Matches operators like '+', '-', '', '&', '='.
 
ColorStyle braces
 Matches '{' or '}'.
 
ColorStyle square_brackets
 Matches '[' or ']'.
 
ColorStyle parentheses
 Matches '(' or ')'.
 
ColorStyle pp_directive
 Matches directives to a preprocessor (if the language has any).
 

Detailed Description

Represents style that the highlighter should apply to the given source code.

Stores information about how every kind of token should be annotated.

Definition at line 24 of file Highlighter.h.

Member Function Documentation

◆ MakeVimStyle()

HighlightStyle HighlightStyle::MakeVimStyle ( )
static

Returns a HighlightStyle that is based on vim's default highlight style.

Definition at line 57 of file Highlighter.cpp.

References comment, GetColor(), keyword, and scalar_literal.

Referenced by lldb_private::SourceManager::File::DisplaySourceLines().

Member Data Documentation

◆ braces

ColorStyle lldb_private::HighlightStyle::braces

Matches '{' or '}'.

Definition at line 75 of file Highlighter.h.

Referenced by determineClangStyle().

◆ colon

ColorStyle lldb_private::HighlightStyle::colon

Matches one colon: ':'.

Definition at line 68 of file Highlighter.h.

Referenced by determineClangStyle().

◆ comma

ColorStyle lldb_private::HighlightStyle::comma

Matches commas: ','.

Definition at line 66 of file Highlighter.h.

Referenced by determineClangStyle().

◆ comment

ColorStyle lldb_private::HighlightStyle::comment

Matches any comments in the language.

Definition at line 64 of file Highlighter.h.

Referenced by determineClangStyle(), and MakeVimStyle().

◆ identifier

ColorStyle lldb_private::HighlightStyle::identifier

Matches identifiers to variable or functions.

Definition at line 56 of file Highlighter.h.

Referenced by determineClangStyle().

◆ keyword

ColorStyle lldb_private::HighlightStyle::keyword

Matches all reserved keywords in the language.

Definition at line 62 of file Highlighter.h.

Referenced by determineClangStyle(), and MakeVimStyle().

◆ operators

ColorStyle lldb_private::HighlightStyle::operators

Matches operators like '+', '-', '', '&', '='.

Definition at line 72 of file Highlighter.h.

Referenced by determineClangStyle().

◆ parentheses

ColorStyle lldb_private::HighlightStyle::parentheses

Matches '(' or ')'.

Definition at line 79 of file Highlighter.h.

Referenced by determineClangStyle().

◆ pp_directive

ColorStyle lldb_private::HighlightStyle::pp_directive

Matches directives to a preprocessor (if the language has any).

Definition at line 84 of file Highlighter.h.

Referenced by determineClangStyle().

◆ scalar_literal

ColorStyle lldb_private::HighlightStyle::scalar_literal

Matches scalar value literals like '42' or '0.1'.

Definition at line 60 of file Highlighter.h.

Referenced by determineClangStyle(), and MakeVimStyle().

◆ selected

ColorStyle lldb_private::HighlightStyle::selected

The style for the token which is below the cursor of the user.

Note that this style is overwritten by the SourceManager with the values of stop-show-column-ansi-prefix/stop-show-column-ansi-suffix.

Definition at line 53 of file Highlighter.h.

Referenced by lldb_private::SourceManager::File::DisplaySourceLines(), lldb_private::DefaultHighlighter::Highlight(), and lldb_private::ClangHighlighter::Highlight().

◆ semicolons

ColorStyle lldb_private::HighlightStyle::semicolons

Matches any semicolon: ';'.

Definition at line 70 of file Highlighter.h.

◆ square_brackets

ColorStyle lldb_private::HighlightStyle::square_brackets

Matches '[' or ']'.

Definition at line 77 of file Highlighter.h.

Referenced by determineClangStyle().

◆ string_literal

ColorStyle lldb_private::HighlightStyle::string_literal

Matches any string or character literals in the language: "foo" or 'f'.

Definition at line 58 of file Highlighter.h.

Referenced by determineClangStyle().


The documentation for this struct was generated from the following files: