martinohmann / hcl-rs

HCL parsing and encoding libraries for rust with serde support
Apache License 2.0
119 stars 14 forks source link

feat!: add support for namespaced functions #343

Closed martinohmann closed 2 months ago

martinohmann commented 2 months ago

Closes https://github.com/martinohmann/hcl-rs/issues/335

This adds support for namespaced HCL function calls. The PR includes updates to the HCL parser (hcl-edit), formatter (hcl-rs), evaluation context (hcl-rs), encoder (hcl-edit) and visitors (hcl-edit).

BREAKING CHANGE: The ident field of hcl_edit::expr::FuncCall was renamed to name. Its type changed from Decorated<Ident> to FuncName. The type of hcl::expr::FuncCall's name field changed from Identifier to FuncName. Various other places in the codebase that previously used bare identifiers as type now use FuncName to accommodate the change.