polydat_grammar/lib.rs
1// Copyright 2024-2026 Jonathan Shook
2// SPDX-License-Identifier: Apache-2.0
3
4//! The Polydat language without its runtime.
5//!
6//! This crate holds what a reader of Polydat source needs and nothing
7//! a runner needs: the lexer and parser ([`lexer`], [`parser`]), the
8//! AST ([`ast`]) and its pretty-printer ([`pprint`]), the free-name
9//! collector ([`refs`]), pragmas, the diagnostic
10//! types ([`error`]), the tile template parsers ([`tile`],
11//! [`tile_structural`]), the comprehension sub-language with its
12//! algebra ([`comprehension`]), and the port type vocabulary
13//! ([`PortType`]). `polydat` depends on this crate, compiles what it
14//! parses, and re-exports every module here at the path it always
15//! had, so `polydat::dsl::ast` and `polydat::ast::PortType` are these.
16//!
17//! What a type means to a compiled buffer, what a comprehension
18//! evaluates to, and what a tile renders are all the runtime's: they
19//! live in `polydat`, as trait implementations and functions over the
20//! types defined here.
21
22pub mod ast;
23pub mod comprehension;
24pub mod error;
25pub mod lexer;
26pub mod parser;
27pub mod pprint;
28pub mod pragmas;
29pub mod refs;
30pub mod tile;
31pub mod tile_structural;
32pub mod viz;
33
34mod port_type;
35pub use port_type::PortType;