EYG IR
Work with the intermediate representation of the EYG language. The EYG language is “AST first”, there is no textual syntax. Instead the AST specification is the public interface of the language.
This means the language does not need a lexer parser. Writing interpreters or compilers is therefor much simpler.
This library defines:
- A Gleam data structure for working with EYG programs.
- Create immutable references for EYG programs using the dag-json codec.
gleam add eyg_ir@1
import eyg/ir/dag_json
pub fn main() {
let bytes = simplifile.read_bits("my_program.eyg.json")
let source = dag_json.from_block(bytes)
}
Further documentation can be found at https://hexdocs.pm/eyg_ir.
Development
gleam run # Run the project
gleam test # Run the tests