This commit is contained in:
Edgar 2023-07-06 14:24:17 +02:00
parent f1674bdd97
commit bf1d464934
No known key found for this signature in database
GPG key ID: 70ADAE8F35904387
2 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "teeconfig" name = "teeconfig"
version = "0.1.0-alpha.1" version = "0.1.0-alpha.2"
edition = "2021" edition = "2021"
authors = ["Edgar <git@edgarluque.com>"] authors = ["Edgar <git@edgarluque.com>"]
description = "A teeworlds/ddnet config parser." description = "A teeworlds/ddnet config parser."

View file

@ -10,9 +10,10 @@ mod tokens_cfg;
mod tokens_cpp; mod tokens_cpp;
bitflags! { bitflags! {
/// Config option flags.
#[rustfmt::skip] #[rustfmt::skip]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
struct CFGFlags: u16 { pub struct CFGFlags: u16 {
const SAVE = 1 << 0; const SAVE = 1 << 0;
const CLIENT = 1 << 1; const CLIENT = 1 << 1;
const SERVER = 1 << 2; const SERVER = 1 << 2;
@ -28,15 +29,15 @@ bitflags! {
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ConfigEntry { pub struct ConfigEntry {
/// The description of this config entry. /// The description of this config entry.
description: String, pub description: String,
/// The type of the entry. /// The type of the entry.
entry_type: EntryType, pub entry_type: EntryType,
/// The flags of the entry. /// The flags of the entry.
flags: CFGFlags, pub flags: CFGFlags,
/// The name of the entry, used in the config file. /// The name of the entry, used in the config file.
name: String, pub name: String,
/// The symbol of the entry as used in the source code. /// The symbol of the entry as used in the source code.
symbol: String, pub symbol: String,
} }
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]