1 //===-- ClangHighlighter.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ClangHighlighter_h_
11 #define liblldb_ClangHighlighter_h_
13 #include "lldb/Utility/Stream.h"
14 #include "llvm/ADT/StringSet.h"
16 #include "lldb/Core/Highlighter.h"
18 namespace lldb_private {
20 class ClangHighlighter : public Highlighter {
21 llvm::StringSet<> keywords;
25 llvm::StringRef GetName() const override { return "clang"; }
27 void Highlight(const HighlightStyle &options, llvm::StringRef line,
28 llvm::Optional<size_t> cursor_pos,
29 llvm::StringRef previous_lines, Stream &s) const override;
31 /// Returns true if the given string represents a keywords in any Clang
32 /// supported language.
33 bool isKeyword(llvm::StringRef token) const;
36 } // namespace lldb_private
38 #endif // liblldb_ClangHighlighter_h_