tree-sitter / tree-sitter/tree-sitter-cpp

bug: Injections query is not included in Rust bindings

Open
#340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
453
Forks
185
PR merge metrics
No merged PRs in 30d

Description

Did you check existing issues?
  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-cpp
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

There should be an INJECTIONS_QUERY in the Rust bindings, but there isn't one.

Steps To Reproduce/Bad Parse Tree
  1. Try to import INJECTIONS_QUERY with use tree_sitter_cpp::INJECTIONS_QUERY;.
Expected Behavior/Parse Tree

INJECTIONS_QUERY should be included in the Rust bindings.

/// The syntax highlighting query for languages injected into this one.
pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm");

It should be usable with:

use tree_sitter_cpp::INJECTIONS_QUERY;
Repro

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Rust bindings and the existing queries/injections.scm file, then compare how other query constants are exposed. Verify that tree_sitter_cpp::INJECTIONS_QUERY can be imported and refers to the injections query as described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.