Skip to main content

oak_ini/ast/
mod.rs

1use core::range::Range;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
5pub struct IniRoot {
6    pub sections: Vec<Section>,
7    pub properties: Vec<Property>,
8}
9
10#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
11pub struct Section {
12    pub name: String,
13    pub properties: Vec<Property>,
14    #[serde(with = "oak_core::serde_range")]
15    pub span: Range<usize>,
16}
17
18#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
19pub struct Property {
20    pub key: String,
21    pub value: String,
22    #[serde(with = "oak_core::serde_range")]
23    pub span: Range<usize>,
24}