#include "ClangHighlighter.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.
|
#define | KEYWORD(X, N) keywords.insert(#X); |
|
◆ KEYWORD
#define KEYWORD |
( |
|
X, |
|
|
|
N |
|
) |
| keywords.insert(#X); |
◆ determineClangStyle()
Determines which style should be applied to the given token.
- Parameters
-
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. |
- Returns
- The ColorStyle that should be applied to the token.
Definition at line 50 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().