Zlox banner

Zlox

2 devlogs
17h 32m 38s

An implementation of the Lox language in Zig

ayo

Refactored the scanner a bit and switched to the Zig Build System. Then I modelled ASTs with tagged unions (so much better than how the book does them in Java) and wrote a simple pretty printer (outputs Lispish strings) before implementing the parser! (just for expressions currently.) I’ve never really worked with a language with manual memory management, it’s being fun and interesting but as you can see just as I was running it for to take a screenshot it broke. Onto debugging!

UPDATE: Fixed invalid free (check new attachment for working pretty printing)

Attachment
Attachment
0
ayo

Implemented the scanner! Zig is a really fun language to use and I’m enjoying it’s surprises.

Attachment
0