rust-hosted-langs / book

Writing Interpreters in Rust: a Guide
https://rust-hosted-langs.github.io/book/
Creative Commons Attribution 4.0 International
479 stars 27 forks source link

Refactor parsing and compiler around List type #28

Open pliniker opened 4 years ago

pliniker commented 4 years ago

I originally wrote the parser to generate a nested Pair tree data structure, just like Lisp uses cons cells. I did this to simplify bootstrapping into a compiler when I didn't have more complex data structures (like the Array types) available yet.

Since this Lisp-style cons cell data structure is archaic, is it worth refactoring the parser and compiler around the List type?