Skip to content

Comment on Ask HN: Testing AST or assembly output for a compiler

Comments

You can try creating an interpreter for the AST and other IR forms you use. This can also free you from testing for specific generated ASTs and IR, so long as they're equivalent (when executed will produce the same results). This will be more helpful once you start with things like adding in optimization passes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.