haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

Builtin support for nested comments or a canonical way to handle them #133

Open vmchale opened 5 years ago

vmchale commented 5 years ago

Currently, I use an approach here, which is as far as I can tell the correct way to implement nested comments.

I'd also like to keep annotations which are kept in nested comments, which I imagine is possible but isn't straightforward to me. Ether a canonical example or builtin support would be wonderful.

Thanks!

simonmar commented 5 years ago

Good idea. Pull requests accepted :)