Skip to content

bug: Incorrect HIGHLIGHT_QUERY in rust bindings #336

@mike-zaytsev

Description

@mike-zaytsev

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

HIGHLIGHT_QUERY in rust bindings for the library only contains content of file queries/highlights.scm, but not the highlights query of tree-sitter-c library which it extends. Therefore only C++-specific parts of code are highlighted when using the parser through rust bindings.

Steps To Reproduce/Bad Parse Tree

Not sure what kind of reproducibility is needed here, but a simple program like this:

fn main() {
    println!("{}", tree_sitter_cpp::HIGHLIGHT_QUERY);
}

Shows that the variable is wrong

Expected Behavior/Parse Tree

The HIGHLIGHT_QUERY variable should contain concatenated highlight queries from tree-sitter-c parser and queries/highlights.scm file

Repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions