Open christos-h opened 4 years ago
The deserialization should help, if it works. It's quite hard to deserialize a HCL data model into Rust's data model. I never really figured out a satisfactory way of doing so.
I would try to conform the parsing to HCL 2's parsing rules and data model. If you would like to take a stab, you could try to take a look at Hashicorp's repo: https://github.com/hashicorp/hcl
I would like to work on this again, but it's done as a hobby so time's a bit short. My plans/wishlist are:
Sorry, I can't be more helpful at this point.
Hey! Love this crate.
Is there any functionality to parse HCL files into a collection of structs?
I would assume that
some_type "some_label" { ... }
would deserialize into somestruct SomeType { labels: vec!["some_label"], ... }
I can see this project has not been worked on for a while, maybe you could point me in the right direction? (I realise you can already deserialize the body into a struct, but that doesn't really help me out.) I would love to contribute if you could point me in the right direction.