hepts: enum types & alias
The graphical simulator hepts now support type aliasing.
This commit is contained in:
parent
2aed0f6537
commit
e9540a2159
1 changed files with 14 additions and 9 deletions
|
@ -269,15 +269,20 @@ let create_input v_name v_ty n (table:GPack.table) =
|
|||
| Tid{ qual = Pervasives; name = "bool" } ->
|
||||
new boolean_input table n
|
||||
| Tid(name) ->
|
||||
begin try
|
||||
let ty = find_type name in
|
||||
begin match ty with
|
||||
| Tenum(clist) -> new enum_input name.qual clist table n
|
||||
| _ -> new entry_input "" table n
|
||||
end
|
||||
with Not_found ->
|
||||
new entry_input "" table n
|
||||
end
|
||||
let rec input name =
|
||||
let _ = check_type name in
|
||||
begin try
|
||||
let ty = find_type name in
|
||||
begin
|
||||
match ty with
|
||||
| Tenum(clist) -> new enum_input name.qual clist table n
|
||||
| Talias(Tid name) -> input name
|
||||
| _ -> new entry_input "" table n
|
||||
end
|
||||
with Not_found ->
|
||||
new entry_input "" table n
|
||||
end in
|
||||
input name
|
||||
| _ -> failwith("Arrays and tuples not yet implemented")
|
||||
|
||||
let create_output v_name _v_ty n (table:GPack.table) =
|
||||
|
|
Loading…
Reference in a new issue