LLDB mainline
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 25 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 33 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 80 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ colon

ColorStyle lldb_private::HighlightStyle::colon

Matches one colon: ':'.

Definition at line 73 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ comma

ColorStyle lldb_private::HighlightStyle::comma

Matches commas: ','.

Definition at line 71 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ comment

ColorStyle lldb_private::HighlightStyle::comment

Matches any comments in the language.

Definition at line 69 of file Highlighter.h.

Referenced by determineClangStyle(), lldb_private::TreeSitterHighlighter::GetStyleForCapture(), and MakeVimStyle().

◆ identifier

ColorStyle lldb_private::HighlightStyle::identifier

Matches identifiers to variable or functions.

Definition at line 61 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ keyword

ColorStyle lldb_private::HighlightStyle::keyword

Matches all reserved keywords in the language.

Definition at line 67 of file Highlighter.h.

Referenced by determineClangStyle(), lldb_private::TreeSitterHighlighter::GetStyleForCapture(), and MakeVimStyle().

◆ operators

ColorStyle lldb_private::HighlightStyle::operators

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

Definition at line 77 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ parentheses

ColorStyle lldb_private::HighlightStyle::parentheses

Matches '(' or ')'.

Definition at line 84 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ pp_directive

ColorStyle lldb_private::HighlightStyle::pp_directive

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

Definition at line 89 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ scalar_literal

ColorStyle lldb_private::HighlightStyle::scalar_literal

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

Definition at line 65 of file Highlighter.h.

Referenced by determineClangStyle(), lldb_private::TreeSitterHighlighter::GetStyleForCapture(), 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 58 of file Highlighter.h.

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

◆ semicolons

ColorStyle lldb_private::HighlightStyle::semicolons

Matches any semicolon: ';'.

Definition at line 75 of file Highlighter.h.

Referenced by lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ square_brackets

ColorStyle lldb_private::HighlightStyle::square_brackets

Matches '[' or ']'.

Definition at line 82 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().

◆ string_literal

ColorStyle lldb_private::HighlightStyle::string_literal

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

Definition at line 63 of file Highlighter.h.

Referenced by determineClangStyle(), and lldb_private::TreeSitterHighlighter::GetStyleForCapture().


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