summaryrefslogtreecommitdiff
path: root/examples/simple.rs
diff options
context:
space:
mode:
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
-}