Create top-level compiler API
toothbrush opened this issue · comments
paul david commented
Currently the test suite reaches into compiler internals. We should extract that, to unblock creating a CLI. The test suite & CLI can then use that API.
Brendan Zabarauskas commented
There might be more interesting ones, but here's some stuff that I know of:
- https://github.com/SomewhatML/sml-compiler/tree/master/crates/sml-driver
- https://github.com/lalrpop/lalrpop/blob/master/lalrpop/src/api/mod.rs
- https://github.com/ollef/sixty/blob/master/src/Driver.hs
- https://github.com/rust-lang/rust/tree/master/compiler/rustc_driver
- https://github.com/MLton/mlton/tree/master/mlton/main
- https://github.com/edwinb/Idris2/blob/master/src/Idris/Driver.idr
But yeah, probably makes sense to look at what the tests are doing, and maybe extract from there.