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

hornbeam_ir

Intermediate representation for the Hornbeam template language

2 releases

0.0.2 Nov 26, 2023
0.0.1 Oct 15, 2023

#358 in Template engine

Download history 2/week @ 2024-02-14 14/week @ 2024-02-21 15/week @ 2024-02-28 3/week @ 2024-03-06 5/week @ 2024-03-13 2/week @ 2024-03-20 21/week @ 2024-03-27 33/week @ 2024-04-03

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

AGPL-3.0-or-later

28KB
689 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
~85K SLoC