new command: check (like cargo)

This commit is contained in:
brevalferrari 2025-06-06 01:34:28 +02:00
parent b03b0ef5ee
commit f5448e0e78
2 changed files with 5 additions and 0 deletions

View file

@ -37,6 +37,8 @@ const DEFAULT_LENGTH: &str = "2^(2-log(2, l))*(60/T)";
pub(super) enum Cli {
/// Play a song
Play(PlayOpts),
/// Check for typos
Check(PlayOpts),
/// Export a song to an audio file or stdout
Export(ExportOpts),
/// Memo menu for examples and general help about syntax and supported audio formats

View file

@ -26,6 +26,9 @@ fn main() -> anyhow::Result<()> {
debug!("options: {cli:#?}");
use Cli::*;
match cli {
Check(opts) => {
parse_and_compile(&opts)?;
}
Play(opts) => {
let (_stream, stream_handle) = OutputStream::try_default()
.context("Failed to find (or use) default audio device")?;