LLDB mainline
RustTreeSitterHighlighter.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_TREESITTERCOMMON_RUSTTREESITTERHIGHLIGHTER_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGE_TREESITTERCOMMON_RUSTTREESITTERHIGHLIGHTER_H
11
13#include "llvm/ADT/StringRef.h"
14
15namespace lldb_private {
16
18public:
20 ~RustTreeSitterHighlighter() override = default;
21
22 llvm::StringRef GetName() const override { return "tree-sitter-rust"; }
23
25
26 static void Terminate();
27 static void Initialize();
28
29 static llvm::StringRef GetPluginNameStatic() {
30 return "Tree-sitter Rust Highlighter";
31 }
32 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
33
34protected:
35 const TSLanguage *GetLanguage() const override;
36 llvm::StringRef GetHighlightQuery() const override;
37};
38
39} // namespace lldb_private
40
41#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_TREESITTERCOMMON_RUSTTREESITTERHIGHLIGHTER_H
Annotates source code with color attributes.
Definition Highlighter.h:96
~RustTreeSitterHighlighter() override=default
static Highlighter * CreateInstance(lldb::LanguageType language)
llvm::StringRef GetHighlightQuery() const override
Returns the tree-sitter highlight query for this language.
llvm::StringRef GetName() const override
Returns a human readable name for the selected highlighter.
const TSLanguage * GetLanguage() const override
Returns the tree-sitter language for this highlighter.
A class that represents a running process on the host machine.
LanguageType
Programming language type.