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

Manages the available highlighters. More...

#include <Highlighter.h>

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.
const HighlightergetDefaultHighlighter () const

Private Attributes

DefaultHighlighter m_default

Detailed Description

Manages the available highlighters.

Definition at line 137 of file Highlighter.h.

Member Function Documentation

◆ getDefaultHighlighter()

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

Definition at line 152 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.

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.
The highlighter that wants to highlight the source code. Could be an empty highlighter that does nothing.

Definition at line 66 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

Definition at line 138 of file Highlighter.h.

Referenced by getDefaultHighlighter().

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