News for hackers. Stuff that matters.
Re:Chumsky: A Tutorial by jakearmitage on Tuesday April 12, 2022 @04:48PM (#31008047)
Now do indentation-based. All parser libraries tend to trip on this small, yet widely relevant, feature. To be honest, most parser libraries should at least include a Python sample as some sort of acid test.
Re:Chumsky: A Tutorial by codethief on Tuesday April 12, 2022 @07:09PM (#31009315)
I have never used Chumsky before but the tutorial has the following to say about whitespace:

> Whitespace is not automatically ignored. Chumsky is a general-purpose parsing library, and some languages care very much about the structure of whitespace, so Chumsky does too

Re:Chumsky: A Tutorial by zesterer on Wednesday April 13, 2022 @05:48AM (#31012785)
I have some thoughts about this: https://github.com/zesterer/chumsky/issues/20#issuecomment-9...

TL;DR: The best approach, in my view, is to detect whitespace in the lexer and emit fake delimiter tokens for the parser so that the parser-level syntax is still context-free.