Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.h
39642 views
//===-- ClangHighlighter.h --------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_CLANGCOMMON_CLANGHIGHLIGHTER_H9#define LLDB_SOURCE_PLUGINS_LANGUAGE_CLANGCOMMON_CLANGHIGHLIGHTER_H1011#include "lldb/Utility/Stream.h"12#include "llvm/ADT/StringSet.h"1314#include "lldb/Core/Highlighter.h"15#include <optional>1617namespace lldb_private {1819class ClangHighlighter : public Highlighter {20llvm::StringSet<> keywords;2122public:23ClangHighlighter();24llvm::StringRef GetName() const override { return "clang"; }2526void Highlight(const HighlightStyle &options, llvm::StringRef line,27std::optional<size_t> cursor_pos,28llvm::StringRef previous_lines, Stream &s) const override;2930/// Returns true if the given string represents a keywords in any Clang31/// supported language.32bool isKeyword(llvm::StringRef token) const;33};3435} // namespace lldb_private3637#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CLANGCOMMON_CLANGHIGHLIGHTER_H383940