Skip to main content

treble_lang/
lib.rs

1//! Treble Live — a live-coding music DSL.
2//!
3//! This crate provides the parser and session engine for the Treble Live
4//! language.  See `LANGUAGE.md` for the full specification.
5
6pub mod ast;
7pub mod error;
8pub mod parser;
9pub mod piece;
10/// Lowering the language onto the engine, and rendering a piece offline.
11///
12/// Behind the `render` feature: the language itself has no engine dependency,
13/// and a consumer that only parses should not pay for one.
14#[cfg(feature = "render")]
15pub mod render;
16/// A language server and player for editors, over stdio (`treble-lang serve`).
17///
18/// Behind the `serve` feature, which brings the renderer and a sound card.
19#[cfg(feature = "serve")]
20pub mod serve;
21pub mod session;
22
23pub use ast::{MiniNotation, PatternDef, Program, SourceLine, Span};
24pub use error::{CompileError, CompileErrorKind, SourceLocation};
25pub use piece::{Piece, Section};
26pub use session::Session;