Handle `when' operators for non-Boolean expressions in Controllable-Nbac backend.
This commit is contained in:
parent
808b9772f3
commit
934c9f9a85
1 changed files with 2 additions and 0 deletions
|
@ -126,11 +126,13 @@ let rec translate_ext_bexp ~pref : _ -> bexp = function
|
|||
and translate_ext_eexp ~pref : _ -> eexp = function
|
||||
| Wconst se -> translate_static_eexp se
|
||||
| Wvar id -> `Ref (pref & mk_var & name id)
|
||||
| Wwhen (ev, _, _) -> translate_ext_eexp ~pref ev.w_desc
|
||||
| _ -> failwith "TODO Unsupported Enum expression!"
|
||||
|
||||
and translate_ext_nexp ~pref : _ -> nexp = function
|
||||
| Wconst se -> translate_static_nexp se
|
||||
| Wvar id -> `Ref (pref & mk_var & name id)
|
||||
| Wwhen (ev, _, _) -> translate_ext_nexp ~pref ev.w_desc
|
||||
| _ -> failwith "TODO Unsupported Numerical expression!"
|
||||
|
||||
let translate_ext ~pref ext = match translate_typ ext.w_ty with
|
||||
|
|
Loading…
Reference in a new issue