LLDB  mainline
Public Member Functions | Private Attributes | List of all members
lldb_private::HighlighterManager Class Reference

Manages the available highlighters. More...

#include <Highlighter.h>

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

Public Member Functions

const HighlightergetHighlighterFor (lldb::LanguageType language_type, llvm::StringRef path) const
 Queries all known highlighter for one that can highlight some source code. More...
 
const HighlightergetDefaultHighlighter () const
 

Private Attributes

DefaultHighlighter m_default
 

Detailed Description

Manages the available highlighters.

Definition at line 136 of file Highlighter.h.

Member Function Documentation

◆ getDefaultHighlighter()

const Highlighter& lldb_private::HighlighterManager::getDefaultHighlighter ( ) const
inline

Definition at line 151 of file Highlighter.h.

References m_default.

◆ getHighlighterFor()

const Highlighter & HighlighterManager::getHighlighterFor ( lldb::LanguageType  language_type,
llvm::StringRef  path 
) const

Queries all known highlighter for one that can highlight some source code.

Parameters
language_typeThe language type that the caller thinks the source code was given in.
pathThe path to the file the source code is from. Used as a fallback when the user can't provide a language.
Returns
The highlighter that wants to highlight the source code. Could be an empty highlighter that does nothing.

Definition at line 65 of file Highlighter.cpp.

References lldb_private::Language::FindPlugin(), and lldb_private::Language::GetHighlighter().

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

Member Data Documentation

◆ m_default

DefaultHighlighter lldb_private::HighlighterManager::m_default
private

Definition at line 137 of file Highlighter.h.

Referenced by getDefaultHighlighter().


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