From 723bef8f5e839f8baa8dde4007e8e9e9801176ff Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Tue, 17 Oct 2023 14:09:23 +0200 Subject: [PATCH] docs --- src/lib.rs | 2 ++ src/tokens_cfg.rs | 2 ++ 2 files changed, 4 insertions(+) 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,