You are browsing as a guest. Sign up (or log in) to start making projects!

4h 0m 47s logged

Started AST and parser
I’ve been referencing the parser guide for Easel. It’s been quite useful.

I started working on this last night, but I got tired and paused without writing a journal. I made a git commit with the broken changes this morning.

So far, I’ve implemented basic parsing for variable and function declarations, literals, tuples, and expressions.

I spent quite a while trying to settle on values for operator precedence. I lost track of time testing things in the JS console and on the Rust playground website to see what made sense for precedence. Apparently 1..5==1..5 evaluates to 1..(5==1)..5, and 1&1+1 evaluates to 1&(1+1).

Like JS, Rust treats += as an expression instead of a statement, but it evaluates to () every time. Looking at Go, it supports the ++ operator, but doesn’t allow it to be used inside an expression. Language design is odd, but I like how everything fits together.

0
1

Comments 0

No comments yet. Be the first!