================ @@ -0,0 +1,206 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "RustTreeSitterHighlighter.h" +#include "lldb/Target/Language.h" + +LLDB_PLUGIN_DEFINE_ADV(RustTreeSitterHighlighter, HighlighterTreeSitterRust) + +extern "C" { +const TSLanguage *tree_sitter_rust(); +} + +using namespace lldb_private; + +const TSLanguage *RustTreeSitterHighlighter::GetLanguage() const { + return tree_sitter_rust(); +} + +llvm::StringRef RustTreeSitterHighlighter::GetHighlightQuery() const { + static constexpr const llvm::StringLiteral query = R"__( +; Identifiers + +(type_identifier) @type ---------------- Michael137 wrote:
Where does this come from? Is there some sort of repository of these? https://github.com/llvm/llvm-project/pull/181282 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
