3 ms·
But we have to jump through some hoops to convert expressions into statements/expressions (I work a bit on Hy[0] which does exactly this). [0] https://github.c
by agentultra 13y ago
But we have to jump through some hoops to convert expressions into statements/expressions (I work a bit on Hy[0] which does exactly this).
[0] https://github.com/hylang/hy https://github.com/hylang/hy
- mattfenwick 13y agoYes, that's typically how it works -- at some point, the concrete syntax tree has to be converted to abstract syntax. I wouldn't call it jumping through hoops though. Rather, for me, it's a natural consequence of separation of concerns. I try to build parsers that only know about concrete syntax. A later pass over the CST is responsible for building the AST, which prevents coupling of the parser to the abstract syntax. YMMV. There's more than one way to skin this cat.