natefaubion / purescript-language-cst-parser

PureScript CST Parser written in PureScript
MIT License
49 stars 17 forks source link

Invalid Identifiers? #50

Closed m-bock closed 1 year ago

m-bock commented 1 year ago

Just out of curiosity... why are invalid Idents not ruled out with something like smart constructors?

ident = Ident "!@# "

I've noticed that the DSL in tidy-codegen captures this.

natefaubion commented 1 year ago

This is a parser, it's not intended to be a correct-by-construction AST. tidy-codegen indeed provides that functionality in a very opinionated way.