Hacker News new | ask | show | jobs
by tomp 3985 days ago
> I really wish more languages picked up S-expressions, because they're easy to machine-generate.

This could easily be solved using a well-defined AST and a simple s-expression based AST printer/parser. That not many languages do that (one notable exception is Julia) is a shame!

1 comments

If the language has a large enough community, someone's bound to come up with an AST format and parser/generator themselves.

JavaScript has https://github.com/estree/estree for example. I've written a (very experimental) S-expression syntax for JavaScript around it here https://github.com/anko/eslisp