Invoke tree-sitter query using rust macro #1433
Unanswered
spacedragon
asked this question in
Ideas
Replies: 1 comment
-
a simple benchmark result shows there is 6x faster tree-sitter-query time: [8.2853 us 8.5272 us 8.8497 us] tree-sitter-macro time: [1.2078 us 1.2181 us 1.2309 us] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Tree-sitter query is a great tool!
Just come out with an idea that what if we could invoke queries directly using rust procedure macro?
The make_query! macro expands the query to rust code like follows.
work in progress repo https://github.com/spacedragon/tree-sitter-query-macro
Beta Was this translation helpful? Give feedback.
All reactions