use std::collections::HashMap; mod tokenizer; mod parser; pub use parser::Parser; pub type Props = Vec<(String, String)>; #[derive(Debug, PartialEq)] pub struct Object { pub name: String, pub content: HashMap, } impl Object { pub fn get(&self, key: &'_ str) -> Option<&str> { self.content.get(key) .map(|(props, value)| value.as_ref()) } }