#intermediate-representation #ir #hornbeam

hornbeam_ir

Intermediate representation for the Hornbeam template language

4 releases

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

#233 in Template engine


Used in 3 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

~4MB
~84K SLoC