LLDB mainline
SwiftTreeSitterHighlighter.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#ifndef LLDB_SOURCE_PLUGINS_HIGHLIGHTER_TREESITTER_SWIFT_SWIFTTREESITTERHIGHLIGHTER_H
9#define LLDB_SOURCE_PLUGINS_HIGHLIGHTER_TREESITTER_SWIFT_SWIFTTREESITTERHIGHLIGHTER_H
10
12#include "llvm/ADT/StringRef.h"
13
14namespace lldb_private {
15
17public:
19 ~SwiftTreeSitterHighlighter() override = default;
20
21 llvm::StringRef GetName() const override { return "tree-sitter-swift"; }
22
24
25 static void Terminate();
26 static void Initialize();
27
28 static llvm::StringRef GetPluginNameStatic() {
29 return "Tree-sitter Swift Highlighter";
30 }
31 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
32
33protected:
34 const TSLanguage *GetLanguage() const override;
35 llvm::StringRef GetHighlightQuery() const override;
36};
37
38} // namespace lldb_private
39
40#endif // LLDB_SOURCE_PLUGINS_HIGHLIGHTER_TREESITTER_SWIFT_SWIFTTREESITTERHIGHLIGHTER_H
Annotates source code with color attributes.
Definition Highlighter.h:96
llvm::StringRef GetHighlightQuery() const override
Returns the tree-sitter highlight query for this language.
~SwiftTreeSitterHighlighter() override=default
static Highlighter * CreateInstance(lldb::LanguageType 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.