#intermediate-representation #ir #hornbeam #language #ast #node

hornbeam_ir

Intermediate representation for the Hornbeam template language

3 releases

0.0.3 May 2, 2024
0.0.2 Nov 26, 2023
0.0.1 Oct 15, 2023

#226 in Template engine

21 downloads per month
Used in 2 crates (via hornbeam_interpreter)

AGPL-3.0-or-later

30KB
724 lines

The Hornbeam IR crate contains a definition for an Intermediate Representation for templates. The crate also contains a facility to take AST nodes from the grammar and convert them to IR, as well as to (lightly) optimise the IR.

The IR has roughly the same control flow structures as available in Rust since Rust is intended to be a compilation target eventually.

For using the IR, see hornbeam_interpreter (dynamic) or hornbeam_macros (code gen).

Dependencies

~4.5MB
~87K SLoC