derpscfg 0.6.0

A brief, incomplete, and mostly wrong derive implementation for scfg
Documentation
//! Example using a `derpscfg::Directive` to allow for arbitrary data
#![allow(unused_crate_dependencies)]
use std::net::Ipv4Addr;

use derpscfg::{Directive, prelude::*};

#[derive(Debug, Derpscfg)]
pub struct Listen {
    pub address: Ipv4Addr,
    pub port: u16,
}

#[derive(Debug, Derpscfg)]
pub struct Config {
    pub listen: Listen,
    // Directive parses arbitrary data. It accepts any parameters and (nested)
    // child nodes.
    pub headers: Directive,
}

#[derive(Debug, Derpscfg)]
pub struct Wrapper {
    pub config: Config,
}

fn main() {
    static SCFG_DOC: &str = r#"
config {
	listen {
		address 127.0.0.1
		port 8080
	}

	headers param1 param2 {
		X-Custom-Header "some value"
        X-Other-Header "other value"
        nesting {
            is possible
        }
	}
}
"#;

    let demo = derpscfg::parse::<Wrapper>(SCFG_DOC).unwrap();
    println!("{demo:?}");
}