A reference wrapper is a JavaScript object containing a ref property that points to another AST object. It makes a reference distinguishable from a contained encoded AST object. section 3.1.2
Use a wrapper when a setting refers to an existing AST object. The target is retrieved by evaluating the wrapper’s ref property; this operation is dereferencing. section 3.1.2
Rental-price reference
The initial value for rental price after discount refers to the rental price before discount attribute through { ref: rentalPriceBeforeDiscountAttribute }. The target is accessed as rentalPriceAfterDiscountInitialValue.settings["attribute"].ref. section 3.1.2
const rentalPriceAfterDiscountInitialValue = {
concept: "Attribute Reference",
settings: {
"attribute": {
ref: rentalPriceBeforeDiscountAttribute
}
}
}
Inspect the wrapper embedded in the Attribute Reference AST object. section 3.1.2
