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>

Collaboration diagram for lldb_private::HighlightStyle:
Collaboration graph
[legend]

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. More...
 

Public Attributes

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

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 23 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 56 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 74 of file Highlighter.h.

Referenced by determineClangStyle().

◆ colon

ColorStyle lldb_private::HighlightStyle::colon

Matches one colon: ':'.

Definition at line 67 of file Highlighter.h.

Referenced by determineClangStyle().

◆ comma

ColorStyle lldb_private::HighlightStyle::comma

Matches commas: ','.

Definition at line 65 of file Highlighter.h.

Referenced by determineClangStyle().

◆ comment

ColorStyle lldb_private::HighlightStyle::comment

Matches any comments in the language.

Definition at line 63 of file Highlighter.h.

Referenced by determineClangStyle(), and MakeVimStyle().

◆ identifier

ColorStyle lldb_private::HighlightStyle::identifier

Matches identifiers to variable or functions.

Definition at line 55 of file Highlighter.h.

Referenced by determineClangStyle().

◆ keyword

ColorStyle lldb_private::HighlightStyle::keyword

Matches all reserved keywords in the language.

Definition at line 61 of file Highlighter.h.

Referenced by determineClangStyle(), and MakeVimStyle().

◆ operators

ColorStyle lldb_private::HighlightStyle::operators

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

Definition at line 71 of file Highlighter.h.

Referenced by determineClangStyle().

◆ parentheses

ColorStyle lldb_private::HighlightStyle::parentheses

Matches '(' or ')'.

Definition at line 78 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 83 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 59 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 52 of file Highlighter.h.

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

◆ semicolons

ColorStyle lldb_private::HighlightStyle::semicolons

Matches any semicolon: ';'.

Definition at line 69 of file Highlighter.h.

◆ square_brackets

ColorStyle lldb_private::HighlightStyle::square_brackets

Matches '[' or ']'.

Definition at line 76 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 57 of file Highlighter.h.

Referenced by determineClangStyle().


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