Key difference to the existing Evaluate::evaluate method:
It mutably borrows the value and tries to evaluate all nested expressions in-place.
It returns all errors that it encounters, not just the first one.
This allows for partial expression evaluation, e.g. to support use cases where a HCL document contains variable references to other parts within the same document that themselves contain expressions that are not evaluated yet.
In this case one would:
Partially evaluate the document via evaluate_in_place.
Update the Context with newly discovered variables.
Repeat 1. and 2. until there are no more errors left.
Closes #184.
Key difference to the existing
Evaluate::evaluate
method:This allows for partial expression evaluation, e.g. to support use cases where a HCL document contains variable references to other parts within the same document that themselves contain expressions that are not evaluated yet.
In this case one would:
evaluate_in_place
.Context
with newly discovered variables.