// pub struct Asset { // name: String, // smallest_fraction: Option, // asset_type: AssetType, // // namespace? // } // pub enum AssetType { // Currency(Currency), // Security(Security), // Commodity(Commodity), // } // pub struct Currency { // // TODO // code: String, // symbol: Option, // smallest_fraction: Option, // } // pub struct Commodity { // symbol: String, // } // pub struct Security { // symbol: String, // code: Option // } // struct Asset { // name: Option, // symbol: String, // short_symbol: Option, // smallest_fraction: Option, // // namespace? // } // struct Quantity {} pub mod core; pub mod queries; // pub mod parser; // pub mod create_ledger; pub mod document; pub mod output; mod parser; // pub struct Account { // // TODO // // type? // } // pub fn add(left: usize, right: usize) -> usize { // left + right // } // pub type Metadata = HashMap; // TODO // pub struct CommoditySymbol { // symbol: String, // is_prefix: bool, // } // pub struct Commodity { // symbols: Vec, // smallest_fraction: Option, // // date? // meta: Metadata, // } // pub struct Amount { // // TODO // } // pub struct Cost { // number: f32, // currency: String, // date: u32, // TODO // label: Option, // } // pub struct Flag { // // TODO // } // pub struct Posting { // account: String, // code? // value: Amount, // cost: Cost, // is_cost_total: bool, // price: Amount, // flag: Option, // meta: Metadata, // } // pub struct Transaction { // date: u32, // TODO // flag: Flag, // payee: Option, // narration: Option, // // tags/links? // postings: Vec, // meta: Metadata, // } // #[cfg(test)] // mod tests { // use super::*; // #[test] // fn it_works() { // let result = add(2, 2); // assert_eq!(result, 4); // } // } // fn test() { // // let a = parse_directives("abc"); // }