# Ludtwig-Parser ![GitHub](https://img.shields.io/github/license/MalteJanz/ludtwig-parser?color=blue&style=flat-square) ![Crates.io](https://img.shields.io/crates/v/ludtwig-parser?style=flat-square) ![Crates.io](https://img.shields.io/crates/d/ludtwig-parser?style=flat-square) Rust crate that parses Twig / HTML templating syntax into a lossless syntax tree. It does not conform to the official HTML spec and the input is required to be as idiomatic as possible (but the parser still tries to recover from errors / parse as much as possible). For example missing closing tags in HTML result in a parsing error (even if browsers can interpret the HTML and reconstruct the closing tag). This makes it possible to represent the template in a hierarchical untyped tree which is easy to navigate and contains both Twig and HTML syntax. ## Accepted syntax example ```twig {% block my_component %} {% set isActive = true %}