stsewd / tree-sitter-rst

reStructuredText grammar for tree-sitter
https://stsewd.dev/tree-sitter-rst/
MIT License
50 stars 7 forks source link

Test case for #32 #33

Closed Carreau closed 2 years ago

Carreau commented 2 years ago

I'm still trying to understand how Tree-sitter-rst works.

I've tried to do

  _underline_section: $ => seq(
+    optional(seq($._numeric_bullet, ' ')),
     alias($._line, $.title),
     alias($._underline, 'adornment'),
  )

But unfortunately that seem to affect enumerated list parsing as well, and it's unclear to me how to either tweak a precedence, or try to have the parser backtracks