Skip to main content

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`]), its pretty-printer ([`pprint`]) and visualizer
9//! ([`viz`]), the free-name collector ([`refs`]), pragmas
10//! ([`pragmas`]), the diagnostic types ([`error`]), the tile
11//! template parsers ([`tile`], [`tile_structural`]), the
12//! comprehension sub-language with its algebra ([`comprehension`]),
13//! and the port type vocabulary ([`PortType`]). `polydat-core`
14//! depends on this crate and compiles what it parses; the `polydat`
15//! facade re-exports every module here at the path it always had, so
16//! `polydat::dsl::ast` and `polydat::ast::PortType` are these.
17//!
18//! What a type means to a compiled buffer, what a comprehension
19//! evaluates to, and what a tile renders are all the runtime's: they
20//! live in `polydat-core` (reached through `polydat`), as trait
21//! implementations and functions over the types defined here.
22
23pub mod ast;
24pub mod comprehension;
25pub mod error;
26pub mod lexer;
27pub mod parser;
28pub mod pprint;
29pub mod pragmas;
30pub mod refs;
31pub mod tile;
32pub mod tile_structural;
33pub mod viz;
34
35mod port_type;
36pub use port_type::PortType;