chumsky icon indicating copy to clipboard operation
chumsky copied to clipboard

Unclosed delimiter error should allow multiple char items

Open tailhook opened this issue 2 years ago • 0 comments

After fixing #52 there are couple of issues left:

  1. Error::unclosed_delimiters takes only single token (char if char stream is parsed)
  2. nested_delimiters strategy allows only single token

My use case is parsing nested comments /* .. */ and r#"..."#. So this isn't the case where tokenizer is very helpful (I mean comments are usually skipped by tokenizer and strings are usually single-token).

I can probably live without (2), because it might be too hard to implement, but fixing (1) should yield much better error messages with some simple custom code I think.

tailhook avatar Jan 02 '22 20:01 tailhook