#incremental #parser #hare

tree-sitter-hare

Hare grammar for the tree-sitter parsing library

1 unstable release

0.20.8 Jun 28, 2022
0.20.7 May 7, 2022
0.20.6 May 7, 2022

#183 in #parsing

Download history 95/week @ 2024-02-26 81/week @ 2024-03-04 63/week @ 2024-03-11 45/week @ 2024-03-18 59/week @ 2024-03-25 131/week @ 2024-04-01 61/week @ 2024-04-08 41/week @ 2024-04-15 57/week @ 2024-04-22 69/week @ 2024-04-29 65/week @ 2024-05-06 61/week @ 2024-05-13 40/week @ 2024-05-20 75/week @ 2024-05-27 78/week @ 2024-06-03 73/week @ 2024-06-10

272 downloads per month

MIT license

1MB
39K SLoC

C 38K SLoC JavaScript 650 SLoC // 0.0% comments Scheme 134 SLoC Rust 33 SLoC // 0.4% comments

tree-sitter-hare

Hare grammar for the popular incremental parser generator tree-sitter.

status: the majority of sources in examples (Hare stdlib) is recognized fine - sources containing \\ in strings fail, due to them getting parsed as comments as a consequence to tree-sitter precedence rules.

For a list of features offered by tree-sitter refer to their site. Summarily, one of the main features is context-aware highlight (e.g. local variables are highlighted differently than function parameters).

This grammar can be used in a number of editors and different situations (github uses it, for example) - at this stage it must be inserted manually into your editor. See, for example, nvim-treesitter.

References

Dependencies

~2.8–4MB
~72K SLoC