qsp: A simple S-Expression parser for Rust TokenStreams
11 points by KnorrFG
11 points by KnorrFG
The thing that always fascinated me most about Lisps is how they are macro-first languages. Rust has a very powerful macro-system, and yet it's nowhere near as convenient as macros are in lisps. I thought about this for a while, and I think there are three reasons for it: in lisp, you don't need proc-macro crates. I can't change that, but there is hope (in-package-macros RFC). 2. In lisp, you don't need to parse the input, 3. You can traverse the AST with all the list-functions that are in lisp anyway.
So I tried to address the later points by providing a very simple S-Expression parsers, and a handful of convenience methods to make it as easy to access the relevant information as I could.