alterae / lang

(an attempt to build) a programming language, as a learning experience and for fun
MIT License
3 stars 0 forks source link

expression parsing #2

Closed alterae closed 2 years ago

alterae commented 2 years ago

the problem

we need to parse expressions

the solution

this will probably require an architecture a bit different from the rest of the parsing logic so far

the code

https://github.com/alterae/lang/blob/be17b69d0c88f0d3252e906d528ac7cef29de12a/src/parser.rs#L155-L172

the relevant reading

https://craftinginterpreters.com/compiling-expressions.html

the todo list

alterae commented 2 years ago

we might want to try out pratt parsing

I think I'm gonna follow through Crafting Interpreters again next week, get a better feel for the whole affair.

alterae commented 2 years ago

More relevant readings: