diff --git a/src/lib.rs b/src/lib.rs index c57e141..3ef7cd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,6 +32,7 @@ bitflags! { } } +/// A configuration entry parsed from the header source file. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ConfigEntry { /// The description of this config entry. @@ -46,6 +47,7 @@ pub struct ConfigEntry { pub symbol: String, } +/// The type of the entry. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum EntryType { Str { diff --git a/src/tokens_cfg.rs b/src/tokens_cfg.rs index b5e36ed..1ff67c9 100644 --- a/src/tokens_cfg.rs +++ b/src/tokens_cfg.rs @@ -57,6 +57,7 @@ impl<'input> Iterator for ConfigLexer<'input> { } } +/// A value for the given config line. #[derive(Debug, Clone)] pub enum Value { Int(i64), @@ -65,6 +66,7 @@ pub enum Value { Key(String), } +/// A line from a teeworlds/ddnet config file. #[derive(Debug, Clone)] pub struct ConfigLine { pub name: String,