mirror of
https://github.com/kristoferssolo/tree-sitter-bruno.git
synced 2026-02-04 06:22:07 +00:00
fix: query paths
This commit is contained in:
4
bindings/python/tests/test_binding.py
generated
4
bindings/python/tests/test_binding.py
generated
@@ -1,6 +1,8 @@
|
||||
from unittest import TestCase
|
||||
|
||||
import tree_sitter, tree_sitter_bruno
|
||||
import tree_sitter_bruno
|
||||
|
||||
import tree_sitter
|
||||
|
||||
|
||||
class TestLanguage(TestCase):
|
||||
|
||||
23
bindings/python/tree_sitter_bruno/__init__.py
generated
23
bindings/python/tree_sitter_bruno/__init__.py
generated
@@ -1,4 +1,4 @@
|
||||
""" Bruno grammar for tree-sitter"""
|
||||
"""Bruno grammar for tree-sitter"""
|
||||
|
||||
from importlib.resources import files as _files
|
||||
|
||||
@@ -6,7 +6,7 @@ from ._binding import language
|
||||
|
||||
|
||||
def _get_query(name, file):
|
||||
query = _files(f"{__package__}.queries") / file
|
||||
query = _files(f"{__package__}.queries") / "bruno" / file
|
||||
globals()[name] = query.read_text()
|
||||
return globals()[name]
|
||||
|
||||
@@ -36,7 +36,18 @@ __all__ = [
|
||||
|
||||
|
||||
def __dir__():
|
||||
return sorted(__all__ + [
|
||||
"__all__", "__builtins__", "__cached__", "__doc__", "__file__",
|
||||
"__loader__", "__name__", "__package__", "__path__", "__spec__",
|
||||
])
|
||||
return sorted(
|
||||
__all__
|
||||
+ [
|
||||
"__all__",
|
||||
"__builtins__",
|
||||
"__cached__",
|
||||
"__doc__",
|
||||
"__file__",
|
||||
"__loader__",
|
||||
"__name__",
|
||||
"__package__",
|
||||
"__path__",
|
||||
"__spec__",
|
||||
]
|
||||
)
|
||||
|
||||
8
bindings/rust/lib.rs
generated
8
bindings/rust/lib.rs
generated
@@ -36,10 +36,10 @@ pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");
|
||||
|
||||
// NOTE: uncomment these to include any queries that this grammar contains:
|
||||
|
||||
pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm");
|
||||
pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm");
|
||||
// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm");
|
||||
pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm");
|
||||
pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/bruno/highlights.scm");
|
||||
pub const INJECTIONS_QUERY: &str = include_str!("../../queries/bruno/injections.scm");
|
||||
// pub const LOCALS_QUERY: &str = include_str!("../../queries/bruno/locals.scm");
|
||||
pub const TAGS_QUERY: &str = include_str!("../../queries/bruno/tags.scm");
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
Reference in New Issue
Block a user