pub fn enum_to_value(defn: &EnumDef) -> ValueExpand description
Convert a SDML EnumDef into a context object, in the form shown as JSON below.
{
"__type": "enum",
"source_span": {}, // optional
"name": "Identifier",
"annotations": [],
"variants": [ // optional
{
"name": "Identifier",
"annotations": [] // optional
}
]
}