Skip to main content

crepuscularity_core/
lib.rs

1//! Shared parser, evaluator, preprocessing, and analysis primitives for Crepuscularity.
2//!
3//! Backend crates use this crate as the source of truth for `.crepus` syntax. Keep changes here
4//! mirrored into macro-facing code when the same syntax should work at compile time and runtime.
5
6pub mod analysis;
7pub mod ast;
8pub mod build;
9pub mod cache;
10pub mod context;
11pub mod diagnostics;
12pub mod eval;
13pub mod include_paths;
14pub mod parser;
15pub mod preprocess;
16pub mod tailwind;
17mod util;
18pub mod virtual_files;
19
20pub use analysis::{analyze_template, classify_node, BindingMap, Fingerprint, Region};
21#[cfg(not(target_arch = "wasm32"))]
22pub use cache::DriverCache;
23pub use context::{TemplateContext, TemplateValue};
24pub use diagnostics::{diagnose_crepus_source, is_multi_component_file, CrepusDiagnostic};
25pub use include_paths::resolve_include_path;
26pub use parser::{
27    parse_component_file, parse_template, unescape_crepus_text_literal, ComponentDef,
28    ComponentFile, ComponentMeta,
29};
30pub use preprocess::{
31    google_fonts_head_markup, merge_unique_font_families, strip_indent_decorators, IndentDecorators,
32};
33pub use virtual_files::lookup_virtual_file;