Skip to main content

logicaffeine_language/lgx/
mod.rs

1//! LGX — the LOGOS web framework's template layer: real HTML with Jinja-style `{…}` tags,
2//! component-scoped CSS, and the structural checks a template needs before any LOGOS
3//! expression inside it is parsed.
4//!
5//! Three pure, grammar-agnostic stages, each locked on its own:
6//!
7//! - [`html`] — the flat tokenizer: tags, attributes, text, `{…}` brace groups, entities,
8//!   void elements, comments, and the refusals (`<script>`, `<style>`, a doctype);
9//! - [`template`] — the tree: nesting, `{if}`/`{for each}`/`{inspect}`/`{let}`/`{extends}`/
10//!   `{block}`/`{children}`/`{raw}`, holes with filters, components, directives, whitespace;
11//!   every LOGOS expression stays text + offset for the real expression parser;
12//! - [`css`] — component scoping by a real tokenizer (`.card h1` → `.card h1.lgx-todos`).
13//!
14//! The parser (`parser/component.rs`) turns a [`template::TNode`] tree into the view IR
15//! ([`crate::ast::view`]) by sub-lexing each expression at its recorded offset.
16
17pub mod check;
18pub mod css;
19pub mod deps;
20pub mod entities;
21pub mod html;
22pub mod raw;
23pub mod selector;
24pub mod template;