summaryrefslogtreecommitdiff
path: root/examples/simple.rs
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-10 12:11:01 -0400
committerpommicket <pommicket@gmail.com>2025-09-10 12:11:40 -0400
commit930bd7ad340dc61057cd1db1db9d1389aae569a5 (patch)
treef92de12d81885a7ee80a8fe0e025500551dc84d7 /examples/simple.rs
parentf1767908837d0e6a0da2aa73009ce11de6fb359d (diff)
More extensive example
Diffstat (limited to 'examples/simple.rs')
-rw-r--r--examples/simple.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/examples/simple.rs b/examples/simple.rs
deleted file mode 100644
index 72ccf1f..0000000
--- a/examples/simple.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-use pom_parser::Configuration;
-use std::process::ExitCode;
-
-fn try_main() -> Result<(), Box<dyn std::error::Error>> {
- let conf = Configuration::load_path("examples/conf.pom")?;
- println!("tab width is {}", conf.get_int_or_default("tab-size", 8)?);
- println!(
- "indenting with {}",
- conf.get_or_default("indentation-type", "tabs")
- );
- println!(
- "show line numbers: {}",
- conf.get_bool_or_default("show-line-numbers", false)?
- );
- println!(
- "edit-over-ssh plug-in path: {:?}",
- conf.get("plug-in.edit-over-ssh.path")
- );
- println!("C++ extensions: {:?}", conf.get_list("file-extensions.Cpp"));
- Ok(())
-}
-
-fn main() -> ExitCode {
- if let Err(e) = try_main() {
- eprintln!("Error: {e}");
- return ExitCode::FAILURE;
- }
- ExitCode::SUCCESS
-}