|
LLDB mainline
|
#include "ClangHighlighter.h"#include "lldb/Core/PluginManager.h"#include "lldb/Host/FileSystem.h"#include "lldb/Target/Language.h"#include "lldb/Utility/AnsiTerminal.h"#include "lldb/Utility/StreamString.h"#include "clang/Basic/FileManager.h"#include "clang/Basic/SourceManager.h"#include "clang/Lex/Lexer.h"#include "llvm/ADT/StringSet.h"#include "llvm/Support/MemoryBuffer.h"#include <optional>#include "clang/Basic/TokenKinds.def"Go to the source code of this file.
Macros | |
| #define | KEYWORD(X, N) |
Functions | |
| static HighlightStyle::ColorStyle | determineClangStyle (const ClangHighlighter &highlighter, const clang::Token &token, llvm::StringRef tok_str, const HighlightStyle &options, bool &in_pp_directive) |
| Determines which style should be applied to the given token. | |
|
static |
Determines which style should be applied to the given token.
| highlighter | The current highlighter that should use the style. |
| token | The current token. |
| tok_str | The string in the source code the token represents. |
| options | The style we use for coloring the source code. |
| in_pp_directive | If we are currently in a preprocessor directive. NOTE: This is passed by reference and will be updated if the current token starts or ends a preprocessor directive. |
Definition at line 53 of file ClangHighlighter.cpp.
References lldb_private::HighlightStyle::braces, lldb_private::HighlightStyle::colon, lldb_private::HighlightStyle::comma, lldb_private::HighlightStyle::comment, lldb_private::HighlightStyle::identifier, lldb_private::ClangHighlighter::isKeyword(), lldb_private::HighlightStyle::keyword, lldb_private::HighlightStyle::operators, lldb_private::HighlightStyle::parentheses, lldb_private::HighlightStyle::pp_directive, lldb_private::HighlightStyle::scalar_literal, lldb_private::HighlightStyle::square_brackets, and lldb_private::HighlightStyle::string_literal.
Referenced by lldb_private::ClangHighlighter::Highlight().