helixbass / tree-sitter-grep

The Unlicense
4 stars 1 forks source link

Use OnceLock for capture index #42

Closed helixbass closed 1 year ago

helixbass commented 1 year ago

In this PR:

To test: Existing behavior should still work Per earlier PR if you want to more actively try and see that the capture index never "double-prints" an error then you can eg artificially add a long delay in the calculation of the capture index (ie .get_or_init()) and still see that passing an unknown capture name results in a single error message being printed

Based on extract-modules