nervosnetwork / molecule

Another serialization system: minimalist and canonicalization.
MIT License
36 stars 23 forks source link

Some Interesting Properties of the Molecule Language #88

Open blckngm opened 8 months ago

blckngm commented 8 months ago

I have found some interesting properties of the molecule language. I'm not suggesting that you should change the language in any way immediately, just sharing my findings and maybe provide some info if you ever want to evolve the language or the parser.

(I noticed these because I was playing with lexers and was trying to build a lexer for the molecule language but find it really hard due to the above properties: it's hard to disallow whitespace between import path components if you are ignoring whitespace everywhere. And it's hard to distinguish identifiers and keywords if keywords are not reserved.)

zhangsoledad commented 2 months ago

https://github.com/nervosnetwork/molecule/pull/96