ajout Tuple et dereference
This commit is contained in:
parent
2961872f99
commit
7842d4dc14
1 changed files with 7 additions and 6 deletions
|
@ -381,9 +381,10 @@ and expression _pos environment _memory = function
|
|||
| Field _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Field)!"
|
||||
| Tuple _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Tuple)!"
|
||||
| Tuple([]) -> (* Cas pour le Tuple vide *)
|
||||
VUnit (* Un tuple vide ne contient rien (logique), donc on utilise un VUnit*)
|
||||
| Tuple(list_exp) ->
|
||||
VTuple(List.map (expression' environment _memory) list_exp)
|
||||
| Sequence _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Sequence)!"
|
||||
|
@ -396,9 +397,9 @@ and expression _pos environment _memory = function
|
|||
| Apply _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Apply)!"
|
||||
| Ref _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Ref)!"
|
||||
| Ref ref ->
|
||||
let dref = expression' environment _memory ref in
|
||||
VLocation(Memory.allocate _memory Mint.one dref)
|
||||
| Assign _ ->
|
||||
(* TODO *)
|
||||
failwith "Students! This is your job (Assign)!"
|
||||
|
|
Reference in a new issue