Valid-declor-option
Validate an optional declarator.
- Signature
(valid-declor-option declor? type table ienv)
→
(mv erp new-declor? new-type ident? return-types new-table)
- Arguments
- declor? — Guard (declor-optionp declor?).
- type — Guard (typep type).
- table — Guard (valid-tablep table).
- ienv — Guard (ienvp ienv).
- Returns
- erp — Type (maybe-msgp erp).
- new-declor? — Type (declor-optionp new-declor?).
- new-type — Type (typep new-type).
- ident? — Type (ident-optionp ident?).
- return-types — Type (type-setp return-types).
- new-table — Type (valid-tablep new-table).
If there is no declarator,
we return the type and validation table unchanged,
and no identifier.
Otherwise, we validate the declarator,
using a separate validation function.
This function does not take or return a fundef-params-p flag
because optional declarators are not used in function parameters.