Skip to content

Commit

Permalink
docs: Write docs for bms module (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina authored Jan 14, 2025
1 parent 15facc9 commit 013b040
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/bms.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
//! The parser module of BMS(.bms/.bme/.bml/.pms) file.
//!
//! This module consists of two phases: lexical analyzing and token parsing.
//!
//! `lex` module provides definitions of BMS tokens and a translator from string into them. It supports major commands as possible, because the BMS specification is not standardized yet. If you found a lack of definition, please tell me by opening an issue (only if not open yet).
//!
//! `parse` module provides definitions of BMS semantic objects and managers of BMS score data. The notes are serializable, but parsed result can't bring back into the BMS format text because of there are randomized syntax in BMS.
//!
//! `time` module provides definition of timing for notes as [`time::Track`] and [`time::ObjTime`].
//!
//! In detail, our policies are:
//!
//! - Support only UTF-8 (as required `String` to input).
//! - Do not support editing BMS source text.
//! - Do not support commands having ambiguous semantics.
//! - Do not support syntax came from typo (such as `#RONDOM` or `#END IF`).
pub mod lex;
pub mod parse;
Expand Down
2 changes: 1 addition & 1 deletion src/bmson/pulse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
time::{ObjTime, Track},
};

/// Note position for the chart [`Bmson`].
/// Note position for the chart [`super::Bmson`].
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub struct PulseNumber(pub u32);

Expand Down

0 comments on commit 013b040

Please sign in to comment.