From 8d5b16efda7c21fabd3cec655d143ed3e78ea5e6 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 7 Sep 2025 22:51:58 -0400 Subject: More parser --- examples/simple.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/simple.rs (limited to 'examples/simple.rs') diff --git a/examples/simple.rs b/examples/simple.rs new file mode 100644 index 0000000..161baac --- /dev/null +++ b/examples/simple.rs @@ -0,0 +1,16 @@ +use pom_parser::Configuration; +use std::process::ExitCode; + +fn try_main() -> Result<(), Box> { + let conf = Configuration::load_path("examples/conf.pom")?; + println!("{conf}"); + Ok(()) +} + +fn main() -> ExitCode { + if let Err(e) = try_main() { + eprintln!("Error: {e}"); + return ExitCode::FAILURE; + } + ExitCode::SUCCESS +} -- cgit v1.2.3